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