$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Jason Fischl (yg-boost-users_at_[hidden])
Date: 2002-05-20 19:21:07
I'm seeing a problem with lexical_cast. The following code when trying to
convert from string to
string fails when passed an empty string. The library code that is doing
this lexical_cast does
not and can not know that the input and output types are the same.
I believe that this code should not throw.
#include <iostream>
#include <boost/lexical_cast.hpp>
main()
{
std::string input("");
try
{
boost::lexical_cast<std::string>(input);
}
catch (boost::bad_lexical_cast& e)
{
std::cout << "Failed" << std::endl;
}
}