Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-02-14 13:30:11


Paul A Bristow wrote:
> So on balance, I think following the rules used in Math Toolkit
> sounds the best compromise.
>
> "These rules are chosen to be compatible with the behaviour of
> ISO/IEC 9899:1999 Programming languages - C and with the Draft
> Technical Report on C++ Library Extensions, 2005-06-24, section
> 5.2.1, paragraph 5.
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf
> "

Right the idea is to be compatible with what C99 and C++0x do when an
integer argument is passed to a math function.

The other issue is that if:

pow<-3>(2)

returned an integer, then presumably it can only return 0, which isn't
exactly right :-)

John.


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