Ok,
 
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@readsoft.com> wrote in message news:E6EE2E266803D5118EF400A024A66C310126D66A@CHEWIE...

From: Stéphane Bronsart [mailto:stephane.bronsart@bea.be]
> 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