Boost logo

Boost :

From: Dan Day (coolmandan_at_[hidden])
Date: 2007-05-09 00:02:39


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/8/07, Mathias Gaunard wrote:
>Dean Michael Berris wrote:
>> I still think the
>> semantics of `lexical_cast("127")` should allow for the
>> conversion to happen -- either convert to a 'short int' then assign to
>> a char, if that makes any sense.

>There is no way to distinguish int8_t and char. They are both aliases to
>the same type.
>Welcome to the wonderful world of typedefs.

Maybe I'm just short-sighted, but it seems to me this really isn't a
problem. A lexical_cast conversion from char * -> char doesn't make much
practical sense in my mind except for grabbing the first character in the
string, which can be done numerous other ways. AFAICS, lexical_cast could be
specialized for char * -> char for such conversions as the OP desires. To
me, that would be far more useful than the current behavior.

- - --
- - -------------------------------------------
Dan Day
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: http://firegpg.tuxfamily.org

iD8DBQFGQUf5kXCf8XmmG+kRAgUbAJ0WoGOPLzF7REfWwDOxQzJBMGkBRwCffzmy
Deh76uiFftcU++XnSRirmIg=
=Tpgl
-----END PGP SIGNATURE-----


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