From: Samuel Krempp (krempp_at_[hidden])
Date: 2005-02-27 07:58:43
Is the documentation for numeric/conversion finalized yet ?
It seems that at least the code sample in
hasn't been kept up-to-date.
1/ includes inexistent header
2/ uses boost::bad_numeric_cast instead of
and same for the other exception classes
and most of all :
// 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 ??