13 #ifndef TINYMPL_PLUS_HPP
14 #define TINYMPL_PLUS_HPP
16 #include <type_traits>
26 template<
class ... Args>
struct plus;
27 template<
class Head,
class ... Tail>
struct plus<Head,Tail...> :
plus<Head, typename plus<Tail...>::type> {};
29 template<
class A,
class B>
struct plus<A,B> :
30 std::integral_constant<
31 typename std::common_type<
32 typename A::value_type,
33 typename B::value_type
34 >::type, A::value + B::value>
37 template<
class Head>
struct plus<Head> : std::integral_constant<typename Head::value_type,Head::value> {};
41 #endif // TINYMPL_PLUS_HPP
Sums its arguments.
Definition: plus.hpp:26