Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-05-14 13:42:14

Steven Watanabe wrote:
> I just looked at the implementation of pow<N> in
> boost/math/special_function.hpp.
> Line 54:
> return (N%2) ? base*positive_power<N-1>::result(base)
> in positive_power causes positive_power to be instantiated with all
> the integers from N down to 0. I think that this should use template
> specialization instead of ?: to keep the number of instantiations
> down,
> even though this probably won't affect the runtime cost.

Good catch: will fix shortly.

Cheers, John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at