Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-05-14 12:42:21


I just looked at the implementation of pow<N> in
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.

In Christ,
Steven Watanabe

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