
18 Mar
2009
18 Mar
'09
4:03 p.m.
Trying again 'cos I mucked up the code last time! This code #include <iostream> #include <boost/lexical_cast.hpp> int main() { using namespace std; try { unsigned int u=boost::lexical_cast<unsigned int>("-1"); cout << u << '\n'; } catch(const std::exception&) { cout << "Exception" << '\n'; } } produces 4294967295 on MSVC7 & 8 rather than an exception. Is it supposed to do this? Rob.