Boost logo

Boost :

From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2008-05-14 18:07:17


> 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.

Yep you're right. At that moment I was a bit disturbed by this runtime
evaluation but I didn't think precisely about this issue so I left it
like that.

Adding a second integral template argument receiving N%2 to specialize
on it works (see attachment) but I feel there's a more elegant
solution. Maybe using enable_if?


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