Boost logo

Boost :

Subject: Re: [boost] [lexical_cast] broken for std::vector<char> since last updates
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-07-25 05:39:04

> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Jürgen
> Hunold
> Sent: Monday, July 25, 2011 6:25 AM
> To: boost_at_[hidden]
> 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
> 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

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 A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204

Boost list run by bdawes at, gregod at, cpdaniel at, john at