|
Boost Users : |
Subject: Re: [Boost-users] [lexical_cast] Canonical representation for numbers?
From: Francesco Biscani (bluescarni_at_[hidden])
Date: 2010-09-21 06:28:25
Thanks all for the feedback!
I was hoping I could exploit lexical_cast's knowledge of floating
point types without having to write specific code, but it seems this
is not the case.
Didn't know about Boost.Format before, and I had no idea Spirit could
be used for this. I'm going to start digging into the docs.
Cheers,
Francesco.
On Tue, Sep 21, 2010 at 3:58 AM, Bryce Lelbach aka wash
<admin_at_[hidden]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/20/2010 12:56 PM, Francesco Biscani wrote:
>> I'm asking because I need to pass a lexical representation of integers
>> and floats to the constructors of some 3rd party class that expects as
>> input strings containing a certain representation of numbers. E.g., a
>> float represented as string must be either in decimal or scientific
>> notation, with "." as separator, "e" or "E" preceding the exponent,
>> leading sign only in case of negative numbers and so on.
>
>
> Have you looked into Boost.Spirit?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkyYETAACgkQO/fqqIuE2t41iACgwQ6D3T0Stbm7DAWc5aPvsQnW
> dkkAmgOZWoiknIpgIjG0XqTYY0LMZ/DX
> =+P9b
> -----END PGP SIGNATURE-----
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net