Boost C++ Libraries: Ticket #18: lexical_cast fails in some cases https://svn.boost.org/trac10/ticket/18 <pre class="wiki">The following code causes a bad_lexical_cast exception std::string x=boost::lexical_cast&lt;std::string&gt;(""); Is this how lexical_cast should perform? An empty standard string also causes an exception std::string x=boost::lexical_cast&lt;std::string&gt;(std::string()); I understand that the underlying stringstream causes this behavior but it does not seem to be intuitive. Calls like the ones above can occur when using member templates like the following class A { public: template&lt;typename T&gt; std::string f(const T&amp; value) { return boost::lexical_cast&lt;std::string&gt;(value); } } Solutions to this problem are welcome. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/18 Trac 1.4.3 kevlin Fri, 07 Oct 2005 19:41:38 GMT status changed https://svn.boost.org/trac10/ticket/18#comment:1 https://svn.boost.org/trac10/ticket/18#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket