Boost logo

Boost :

From: Stéphane Bronsart (stephane.bronsart_at_[hidden])
Date: 2002-07-02 06:10:22


RE: [boost] Re: prob using lexical_castSorry,

But I don't understand.
arg and copy_of_arg are of "Source" type (string in that case).
These are not "pointer" ?#!

The syntax if( *arg != *copy_of_arg ) is rejected (normaly for me) by my compiler ?

Can you please explain more and/or give a solution.

NB : some other people seems to work on a new version of lexical_cast :
Terje Sletteb, Gennadiy Rozenthal, ...
I'm not at the level of these guys... I'm play with STL since 1 month only. So excuse me.

Thank.
  <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