[lexical_cast] broken for std::vector<char> since last updates

Hi, the last patches to lexical_cast broke some of my code which uses lexical_cast to parse values from std::vector<char> Something as simple as std::vector<char> buffer; return boost::lexical_cast<int>(&buffer[0]); fails with BOOST_ROOT/boost/lexical_cast.hpp:1091:43: error: no matching constructor for initialization of 'std::basic_ostream<char>' std::basic_ostream<CharT> stream(&stringbuffer); ^ ~~~~~~~~~~~~~ this is the start of the clang diagnostic. Both gcc (Ubuntu 4.6.0-3~ppa1) 4.6.1 20110409 (prerelease) and clang version 3.0 (trunk 135897) output contained in attached testcase. Btw. are there any lexical tests in Boost? Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jürgen Hunold Sent: Monday, July 25, 2011 6:25 AM To: boost@lists.boost.org Subject: [boost] [lexical_cast] broken for std::vector<char> since last updates
Hi,
the last patches to lexical_cast broke some of my code which uses lexical_cast to parse values from std::vector<char>
Something as simple as
std::vector<char> buffer; return boost::lexical_cast<int>(&buffer[0]);
fails with
BOOST_ROOT/boost/lexical_cast.hpp:1091:43: error: no matching constructor for initialization of 'std::basic_ostream<char>' std::basic_ostream<CharT> stream(&stringbuffer); ^ ~~~~~~~~~~~~~ this is the start of the clang diagnostic.
Both gcc (Ubuntu 4.6.0-3~ppa1) 4.6.1 20110409 (prerelease) and clang version 3.0 (trunk 135897)
output contained in attached testcase.
Btw. are there any lexical tests in Boost?
Some tests of the recently added non_finite_num facet and C99 NaN and inf handling from Johna Rade are in http://svn.boost.org/svn/boost/trunk/libs/math/example/lexical_cast_nonfinit... http://svn.boost.org/svn/boost/trunk/libs/math/test/test_lexical_cast.cpp and these pass on main platforms in trunk. It *might* be fallout from the changes made to support NaN and infinities? But the current maintainer Antony Polukhin is the man you need. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com Paul

Hi Paul, On Monday, 25. July 2011 11:39:04 Paul A. Bristow wrote:
[mailto:boost-bounces@lists.boost.org] On Behalf Of Jürgen Hunold Btw. are there any lexical tests in Boost?
Some tests of the recently added non_finite_num facet and C99 NaN and inf handling from Johna Rade are in
http://svn.boost.org/svn/boost/trunk/libs/math/example/lexical_cast_nonfini te_facets.cpp
http://svn.boost.org/svn/boost/trunk/libs/math/test/test_lexical_cast.cpp
and these pass on main platforms in trunk.
Okay. I was looking for the canonical "libs/lexical_cast/test" directory. Should have invoked "find"...
It might be fallout from the changes made to support NaN and infinities?
And "minor bugfixes". Yes, definetely.
But the current maintainer Antony Polukhin is the man you need.
Yes, found ticket #5732 and commented there, too. Thanks for the pointers to the tests. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

2011/7/25 Jürgen Hunold <juergen.hunold@ivembh.de>:
On Monday, 25. July 2011 11:39:04 Paul A. Bristow wrote:
But the current maintainer Antony Polukhin is the man you need.
Yes, found ticket #5732 and commented there, too.
Thanks for the pointers to the tests.
Fixed in revision 73357. Added some tests for described case. Great thanks for testing and reporting bugs! Best regards, Antony Polukhin

Hi Anthony, On Monday, 25. July 2011 17:20:49 Antony Polukhin wrote:
2011/7/25 Jürgen Hunold <juergen.hunold@ivembh.de>:
Fixed in revision 73357. Added some tests for described case.
Thanks. Works again ;-))
Great thanks for testing and reporting bugs!
You are welcome. I know why I compile our sources against trunk. This helps catching bugs while they are fresh. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !
participants (3)
-
Antony Polukhin
-
Jürgen Hunold
-
Paul A. Bristow