27 #ifndef MLN_METAL_MATH_POW_HH
28 # define MLN_METAL_MATH_POW_HH
35 # include <mln/metal/bool.hh>
36 # include <mln/metal/int.hh>
39 # define mlc_pow(X, N) typename mln::metal::math::pow< X, N >::ret
40 # define mlc_pow_int(x, n) mln::metal::math::pow_int< x, n >::value
58 template <
int x,
int n>
65 struct pow_int_< x, 0 >
67 static const int value = 1;
71 struct pow_int_< 0, 0 >;
76 template <
int x,
int n,
bool b>
77 struct pow_int_if_ : pow_int_<x, n>
81 template <
int x,
int n>
82 struct pow_int_if_< x, n, false >
88 template <
int x,
int n>
89 struct pow_int : impl::pow_int_if_< x, n,
90 (n >= 0 && ! (x == 0 && n == 0)) >
97 template <
typename X,
typename N>
100 template <
int x,
int n>
101 struct pow< int_<x>, int_<n> >
114 #endif // ! MLN_METAL_MATH_POW_HH