Subject: [Boost-bugs] [Boost C++ Libraries] #6452: lexical_cast fails when src inserts 0 chars into stream.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-26 17:22:04
#6452: lexical_cast fails when src inserts 0 chars into stream.
--------------------------+-------------------------------------------------
Reporter: eric_niebler | Owner: apolukhin
Type: Bugs | Status: new
Milestone: Boost 1.49.0 | Component: lexical_cast
Version: Boost 1.48.0 | Severity: Regression
Keywords: |
--------------------------+-------------------------------------------------
The following code works with 1.46.1 but fails with a `bad_lexical_cast`
exception on 1.48.
{{{#!cpp
#include <string>
#include <iostream>
#include <boost/lexical_cast.hpp>
struct my_string
{
friend std::ostream &operator<<(std::ostream& sout, my_string
const& st)
{
return sout << "";
}
};
int main()
{
try
{
my_string st;
std::string st2 = boost::lexical_cast<std::string>(st);
}
catch(boost::bad_lexical_cast const &e)
{
std::cout << e.what() << std::endl;
}
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6452> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC