Boost logo

Boost :

From: John Moeller (fishcorn_at_[hidden])
Date: 2008-05-22 18:42:26


Bruno Lalande <bruno.lalande <at> gmail.com> writes:

>
> Hi,
>
> > I think that you'll need a specialization for positive_power<1> *and*
> > positive_power<2> with this. In fact, both of these otherwise generate a 4-
> > deep infinitely-recursive function call at runtime. Starting at
> > positive_power<2>:
> >
> > positive_power<2>::result
> > even_positive_power<2>::result
> > positive_power<1>::result
> > odd_positive_power<1>::result
> > positive_power<2>::result
>
> Actually I had those specializations in my code but didn't put them in
> the mail since their presence is almost obvious now (or, at least; I
> try at each new implementation to remove each of them and see the
> effect). I will put all them I my next mails to be explicit.

No need. I just wanted to make sure that it was caught. Honestly, even if you
hadn't thought of it, you'd probably have caught it on testing anyway. :-)
Sorry for the noise.

John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk