Opened 5 years ago

Closed 5 years ago

#7228 closed Bugs (fixed)

Bugs: #warning in lexical_cast.hpp causes MSVC compile error

Reported by: ldc@… Owned by: Antony Polukhin
Milestone: Boost 1.52.0 Component: lexical_cast
Version: Boost 1.50.0 Severity: Cosmetic
Keywords: Cc: antoshkka@…


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

boost/chrono/config.hpp likely suffers from the same issue.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by Antony Polukhin

Cc: antoshkka@… added
Milestone: To Be DeterminedBoost 1.52.0
Severity: RegressionCosmetic
Status: newassigned

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.

comment:2 Changed 5 years ago by Antony Polukhin

(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 Changed 5 years ago by Antony Polukhin

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Antony Polukhin.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.