Opened 10 years ago
Closed 10 years ago
#7228 closed Bugs (fixed)
Bugs: #warning in lexical_cast.hpp causes MSVC compile error
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.52.0 | Component: | lexical_cast |
Version: | Boost 1.50.0 | Severity: | Cosmetic |
Keywords: | Cc: | antoshkka@… |
Description
In lexical_cast.hpp # warning "Unable to use <locale> header. boost::lexical_cast will use the 'C' locale." is not portable and doesn't compile on MSVC. This is quite similar to https://svn.boost.org/trac/boost/ticket/3629
boost/chrono/config.hpp likely suffers from the same issue.
Change History (3)
comment:1 by , 10 years ago
Cc: | added |
---|---|
Milestone: | To Be Determined → Boost 1.52.0 |
Severity: | Regression → Cosmetic |
Status: | new → assigned |
comment:2 by , 10 years ago
(In [80409]) Merge from trunk: 1) #warning replaced with #error (refs #7228) 2) Pavel Korzh added to thanks list (refs #7157) 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 CharType* chars, std::size_t count) function overload (refs #6430 and refs #6663) 8) Fixed GCC warning in numeric_cast_test.cpp 9) Fix compilation of lexical cast with MSVC 2003 (refs #7255)
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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.
I`ll add some documentation for this workaround via comments in lexical_cast.hpp header.