Boost C++ Libraries: Ticket #922: Lexical cast and wide characters https://svn.boost.org/trac10/ticket/922 <pre class="wiki">It would be nice to make lexical_cast be handle to translate through means other than a char-width string. One way to address this is follows: template&lt;typename Target, typename Source, typename E = char&gt; Target lexical_cast(Source arg) { std::basic_stringstream&lt;E&gt; interpreter; ... Other options, such as using traits to try to deduce E from the target type automatically, would be fine, too. Think of the above suggestion as a starting point; however, it would plug what it currently a hole. This feature request is derived from: http://groups.yahoo.com/group/boost/message/10937 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/922 Trac 1.4.3 Dave Abrahams Fri, 06 Jul 2007 12:35:20 GMT description changed; cc, severity set https://svn.boost.org/trac10/ticket/922#comment:1 https://svn.boost.org/trac10/ticket/922#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">kevlin@…</span> added </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/922?action=diff&amp;version=1">diff</a>) </li> <li><strong>severity</strong> → <span class="trac-field-new">Showstopper</span> </li> </ul> <p> Can't reassign this to Kevlin until he enters his email as described at <a class="wiki" href="https://svn.boost.org/trac10/wiki/TicketWorkflow">TicketWorkflow</a> </p> Ticket Peter Dimov Sun, 22 Jul 2007 00:26:21 GMT component, severity changed https://svn.boost.org/trac10/ticket/922#comment:2 https://svn.boost.org/trac10/ticket/922#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">lexical_cast</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Optimization</span> </li> </ul> Ticket Marshall Clow Wed, 29 Aug 2007 13:22:23 GMT owner, status changed https://svn.boost.org/trac10/ticket/922#comment:3 https://svn.boost.org/trac10/ticket/922#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">nobody</span> to <span class="trac-author">nasonov</span> </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket anonymous Sun, 13 Sep 2009 20:57:10 GMT status, resolution changed https://svn.boost.org/trac10/ticket/922#comment:4 https://svn.boost.org/trac10/ticket/922#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> <blockquote class="citation"> <p> It would be nice to make lexical_cast be handle to </p> </blockquote> <p> translate through means other than a char-width string. lexical_cast supports wchar_t. </p> <blockquote class="citation"> <p> Other options, such as using traits to try to deduce E </p> </blockquote> <p> from the target type automatically, would be fine, too. lexical_cast deduces E from both target and source types. </p> Ticket nasonov Sun, 13 Sep 2009 22:16:56 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/922#comment:5 https://svn.boost.org/trac10/ticket/922#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> Ticket nasonov Sun, 13 Sep 2009 22:21:08 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/922#comment:6 https://svn.boost.org/trac10/ticket/922#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (closing it properly this time, unanonymously and with a better formatting) </p> <blockquote class="citation"> <p> It would be nice to make lexical_cast be handle to translate through means other than a char-width string. </p> </blockquote> <p> lexical_cast supports wchar_t. </p> <blockquote class="citation"> <p> Other options, such as using traits to try to deduce E from the target type automatically, would be fine, too. </p> </blockquote> <p> lexical_cast deduces E from both target and source types. </p> Ticket