* mln/metal/math/pow.hh (mln::metal::math::impl::pow_int_): Use static const integers instead of enums. --- milena/ChangeLog | 7 +++++++ milena/mln/metal/math/pow.hh | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog index 111f0d7..63ecfc1 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,12 @@ 2013-02-06 Roland Levillain roland@lrde.epita.fr
+ Disambiguate operator- overload resolution with a pow_int_ operand. + + * mln/metal/math/pow.hh (mln::metal::math::impl::pow_int_): + Use static const integers instead of enums. + +2013-02-06 Roland Levillain roland@lrde.epita.fr + Revive tests/value/graylevel.cc.
* mln/value/graylevel.hh: Aesthetic changes in comments. diff --git a/milena/mln/metal/math/pow.hh b/milena/mln/metal/math/pow.hh index eb70852..4f54e10 100644 --- a/milena/mln/metal/math/pow.hh +++ b/milena/mln/metal/math/pow.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -57,13 +58,13 @@ namespace mln template <int x, int n> struct pow_int_ { - enum res_ { value = x * pow_int_<x, n-1>::value }; + static const int value = x * pow_int_<x, n-1>::value; };
template <int x> struct pow_int_< x, 0 > { - enum res_ { value = 1 }; + static const int value = 1; };
template <>