Boost logo

Boost :

Subject: Re: [boost] [lexical_cast] Strange behaviour
From: raindog_at_[hidden]
Date: 2009-03-18 12:12:31

What exactly do you think -1 is as an unsigned int?
------Original Message------
From: Robert Jones
Sender: boost-bounces_at_[hidden]
To: boost_at_[hidden]
ReplyTo: boost_at_[hidden]
Sent: Mar 18, 2009 9:03 AM
Subject: [boost] [lexical_cast] Strange behaviour

Trying again 'cos I mucked up the code last time!

This code

#include <iostream>
#include <boost/lexical_cast.hpp>

int main()
  using namespace std;

    unsigned int u=boost::lexical_cast<unsigned int>("-1");
    cout << u << '\n';
  catch(const std::exception&)
    cout << "Exception" << '\n';



on MSVC7 & 8

rather than an exception. Is it supposed to do this?

Unsubscribe & other changes:

Sent from my Verizon Wireless BlackBerry

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