Boost C++ Libraries: Ticket #343: Swapped source and target in exception https://svn.boost.org/trac10/ticket/343 <pre class="wiki">When lexical_cast&lt;&gt; throws exception, the source and target parameters are swapped (source_type() return target and wise versa). The reason, that when exception is thrown, the parameters to exception's contructor passed in wrong order. The line 190 in "boost/lexical_cast.hpp" reads: throw_exception(bad_lexical_cast(typeid(Target), typeid(Source))); instead of: throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); (the constructor's first parameter is the type id of the source) Boost Version: 1.32.0 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/343 Trac 1.4.3 tslettebo Sat, 29 Jan 2005 23:22:57 GMT <link>https://svn.boost.org/trac10/ticket/343#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/343#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=516536 This has been fixed, and will be committed soon among with some other fixes: Using source value as "3 " didn't used to throw but " 3" did. Now, both throws. Also, there's been a suggestion to let lexical_cast use const reference, rather than pass by value: This requires some changes to lexical_cast, as it doesn't work with const reference as it is. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>kevlin</dc:creator> <pubDate>Fri, 07 Oct 2005 19:05:37 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/343#comment:2 https://svn.boost.org/trac10/ticket/343#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket