
5 Feb
2008
5 Feb
'08
5:30 p.m.
AMDG John Maddock wrote:
I'm a bit concerned about this interface: my guess is that 90% or more of users would just want integer exponents, and these should be very easy to use, preferably simply:
pow<2>(val)
Hmmm, I wonder if we can define an overload such that:
pow<2,3>(val)
is also valid?
Regards, John.
Ok. How about: template<class N, class T> ... pow(T t); template<int N, class T> ... pow(T t) { return(pow<mpl::int_<N> >(t)); } In Christ, Steven Watanabe