
27 Feb
2005
27 Feb
'05
12:58 p.m.
Is the documentation for numeric/conversion finalized yet ? It seems that at least the code sample in numeric/conversion/doc/numeric_cast.html hasn't been kept up-to-date. This sample 1/ includes inexistent header 2/ uses boost::bad_numeric_cast instead of boost::numeric::bad_numeric_conversion and same for the other exception classes and most of all : 3/ // This works, because unsigned integral types cannot cause overflow. unsigned char c=numeric_cast<unsigned char>(l); But this line does raise an overflow exception (as it should, I guess). I guess the comment was about unsigned types implementing modulo-arithmetics, but in the end does numeric_cast check for unsigned overflows, or not ?? -- Samuel