Boost C++ Libraries: Ticket #7228: Bugs: #warning in lexical_cast.hpp causes MSVC compile error https://svn.boost.org/trac10/ticket/7228 <p> In lexical_cast.hpp # warning "Unable to use &lt;locale&gt; header. boost::lexical_cast will use the 'C' locale." is not portable and doesn't compile on MSVC. This is quite similar to <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/3629"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/3629</a> </p> <p> boost/chrono/config.hpp likely suffers from the same issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7228 Trac 1.4.3 Antony Polukhin Tue, 14 Aug 2012 10:41:51 GMT status, severity, milestone changed; cc set https://svn.boost.org/trac10/ticket/7228#comment:1 https://svn.boost.org/trac10/ticket/7228#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">antoshkka@…</span> added </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Regression</span> → <span class="trac-field-new">Cosmetic</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.52.0</span> </li> </ul> <p> This error can appear only if you are using invalid/lame version of STL library. As a fast workaround, you can define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE. </p> <p> I`ll add some documentation for this workaround via comments in lexical_cast.hpp header. </p> Ticket Antony Polukhin Wed, 05 Sep 2012 18:23:43 GMT <link>https://svn.boost.org/trac10/ticket/7228#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7228#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/80409" title="Merge from trunk: 1) #warning replaced with #error (refs #7228) 2) ...">[80409]</a>) Merge from trunk: 1) #warning replaced with #error (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7228" title="#7228: Bugs: Bugs: #warning in lexical_cast.hpp causes MSVC compile error (closed: fixed)">#7228</a>) 2) Pavel Korzh added to thanks list (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7157" title="#7157: Bugs: [lexical_cast] convert volatile int to string cause Run-Time Check ... (closed: fixed)">#7157</a>) 3) BOOST_NOEXCEPT modifiers added where possible 4) better support for c++11 Unicode characters 5) fixed compilation with MSVC+STLPort 6) more agressive usage of Traits template parameter 7) Added lexical_cast(const <a class="missing wiki">CharType</a>* chars, std::size_t count) function overload (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6430" title="#6430: Feature Requests: Optimized code for `boost::iterator_range&lt;std::string::iterator&gt;` (closed: wontfix)">#6430</a> and refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6663" title="#6663: Feature Requests: Avoiding input copying (closed: fixed)">#6663</a>) 8) Fixed GCC warning in numeric_cast_test.cpp 9) Fix compilation of lexical cast with MSVC 2003 (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7255" title="#7255: Bugs: lexical_cast is broken on MSVC .NET 2003 (closed: fixed)">#7255</a>) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Sat, 15 Sep 2012 07:31:17 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7228#comment:3 https://svn.boost.org/trac10/ticket/7228#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket