From 808f210c0d396d9c209b4a98ada1eb2ae64973c5 Mon Sep 17 00:00:00 2001 From: Alexander Nasonov Date: Tue, 4 Dec 2007 21:49:51 +0000 Subject: [PATCH] Link to html version of [Tuning] and BOOST_LEXICAL_CAST_ASSUME_C_LOCALE synopsis [SVN r41703] --- lexical_cast.htm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lexical_cast.htm b/lexical_cast.htm index 2a08541..6e38014 100644 --- a/lexical_cast.htm +++ b/lexical_cast.htm @@ -194,7 +194,18 @@ public: Exception used to indicate runtime lexical_cast failure. -
+ +
+

BOOST_LEXICAL_CAST_ASSUME_C_LOCALE

+
#define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+
+or,
+
+g++ -DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE ...  (gcc on Linux/Unix)
+cl.exe /DBOOST_LEXICAL_CAST_ASSUME_C_LOCALE ... (Visual C++ on Windows)
+
+Eliminate an overhead of std::locale if your program runs in the "C" locale. If the option is set but a program runs in other locale, lexical_cast result is unspecified. +

Frequently Asked Questions

Q: Why does lexical_cast<int8_t>("127") throw bad_lexical_cast? @@ -219,7 +230,7 @@ public:

  • [N1973] Kevlin Henney, Beman Dawes, Lexical Conversion Library Proposal for TR2, N1973.
  • [Tuning] Alexander Nasonov, Fine Tuning for lexical_cast, - Overload #74, + Overload #74 (PDF), August 2006.
  • Changes