Boost logo

Boost :

Subject: [boost] [lexical_cast] broken for std::vector<char> since last updates
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2011-07-25 01:25:13


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_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !



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