Boost logo

Boost :

From: Stéphane Bronsart (stephane.bronsart_at_[hidden])
Date: 2002-07-02 08:00:16


RE: [boost] Re: prob using lexical_castOk,

Stupid Error : "1000" is a char*, not a string !!!
with lexical_cast<short>( string("1000") ) (my modified version), I can throw an exception if the signed type is not take correctly in account.

Next step : have the signed type taking in account (I'll work on it at home...)

Bye.
(sorry)

Steph.
  <Bjorn.Karlsson_at_[hidden]> wrote in message news:E6EE2E266803D5118EF400A024A66C310126D66A_at_CHEWIE...
  From: Stéphane Bronsart [mailto:stephane.bronsart_at_[hidden]]
> z = lexical_cast<short>("1000"); // throw 3 (Why ? if example above don't throw ?)
> Under dbg, the copy_of_arg and arg are show the same, but the test if( copy_of_arg != arg ) fail
> !!! Why ?

  Because you're not comparing strings, like in the example above. You're comparing (different) pointers, not values.

  Bjorn



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk