
14 May
2008
14 May
'08
10:07 p.m.
Hi,
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? Regards Bruno