Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2005-04-19 12:56:48

"Toon Knapen" <toon.knapen_at_[hidden]> escribió en el mensaje
> Currently following situation does not generate a bad_numeric_cast.
> <test>
> unsigned int ui = std::numeric_limits< unsigned int >::max() ;
> int i = boost::numeric_cast< int >( ui ) ;
> </test>
> Nevertheless 'i' is -1 instead of some very big number. To catch this
> kind of error, I propose to apply following patch to boost/cast.hpp (in
> attachment).
Take a look at the current replacement of _that_ numeric_cast<>:


Fernando Cacciola

Boost list run by bdawes at, gregod at, cpdaniel at, john at