diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index b629c6a..0b47ee3 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -6,9 +6,9 @@ using quickbook ; import boostbook : boostbook ; xml lexical_cast : lexical_cast.qbk ; -boostbook standalone - : - lexical_cast +boostbook standalone + : + lexical_cast : boost.root=../../../.. pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html diff --git a/doc/lexical_cast.qbk b/doc/lexical_cast.qbk index c786fbc..b856594 100644 --- a/doc/lexical_cast.qbk +++ b/doc/lexical_cast.qbk @@ -34,7 +34,7 @@ The standard C++ library offers `stringstream` for the kind of in-core formattin The `lexical_cast` function template offers a convenient and consistent form for supporting common conversions to and from arbitrary types when they are represented as text. The simplification it offers is in expression-level convenience for such conversions. For more involved conversions, such as where precision or formatting need tighter control than is offered by the default behavior of `lexical_cast`, the conventional `std::stringstream` approach is recommended. Where the conversions are numeric to numeric, __numericcast__ may offer more reasonable behavior than `lexical_cast`. -For a good discussion of the options and issues involved in string-based formatting, including comparison of `stringstream`, `lexical_cast`, and others, see Herb Sutter's article, [@http://www.gotw.ca/publications/mill19.htm The String Formatters of Manor Farm]. Also, take a look at the [link boost_lexical_cast.performance Performance] section. +For a good discussion of the options and issues involved in string-based formatting, including comparison of `stringstream`, `lexical_cast`, and others, see Herb Sutter's article, [@http://www.gotw.ca/publications/mill19.htm The String Formatters of Manor Farm]. Also, take a look at the [link boost_lexical_cast.performance Performance] section. [endsect] [section Examples] @@ -105,8 +105,8 @@ The character type of the underlying stream is assumed to be `char` unless eithe * `boost::iterator_range`, where `WideCharPtr` is a pointer to wide-character or pointer to const wide-character [important Many compilers and runtime libraries fail to make conversions using new Unicode characters. Make shure that the following code compiles and outputs nonzero values, before using new types: -`` - std::cout +`` + std::cout << booat::lexical_cast(1.0).size() << " " << booat::lexical_cast(1.0).size(); @@ -151,13 +151,13 @@ Consider the following example: return data_length; } }; - + inline std::ostream& operator << (std::ostream& ostr, const example_class& rhs) { return ostr << boost::make_iterator_range(rhs.data(), rhs.data() + rhs.size()); } `` -This is a good generic solution for most use cases. +This is a good generic solution for most use cases. But we can make it even faster for some performance critical applications. During conversion, we loose speed at: * `std::ostream` construction (it makes some heap allocations) @@ -182,35 +182,35 @@ Now `boost::lexical_cast(example_class_instance)` conversions won't c [section Frequently Asked Questions] * [*Question:] Why does `lexical_cast("127")` throw `bad_lexical_cast`? - * [*Answer:] The type `int8_t` is a `typedef` to `char` or `signed char`. Lexical conversion to these types is simply reading a byte from source but since the source has more than one byte, the exception is thrown. -Please use other integer types such as `int` or `short int`. If bounds checking is important, you can also -call __numericcast__: + * [*Answer:] The type `int8_t` is a `typedef` to `char` or `signed char`. Lexical conversion to these types is simply reading a byte from source but since the source has more than one byte, the exception is thrown. +Please use other integer types such as `int` or `short int`. If bounds checking is important, you can also +call __numericcast__: `numeric_cast(lexical_cast("127"));` [pre ] * [*Question:] Why does `lexical_cast("127")` throw `bad_lexical_cast`? - * [*Answer:] Lexical conversion to any char type is simply reading a byte from source. But since the source has more than one byte, the exception is thrown. -Please use other integer types such as `int` or `short int`. If bounds checking is important, you can also -call __numericcast__: + * [*Answer:] Lexical conversion to any char type is simply reading a byte from source. But since the source has more than one byte, the exception is thrown. +Please use other integer types such as `int` or `short int`. If bounds checking is important, you can also +call __numericcast__: `numeric_cast(lexical_cast("127"));` [pre ] * [*Question:] What does `lexical_cast` of an `int8_t` or `uint8_t` not do what I expect? - * [*Answer:] As above, note that int8_t and uint8_t are actually chars and are formatted as such. To avoid + * [*Answer:] As above, note that int8_t and uint8_t are actually chars and are formatted as such. To avoid this, cast to an integer type first: `lexical_cast(static_cast(n));` [pre ] -* [*Question:] The implementation always resets the `ios_base::skipws` flag of an underlying stream object. +* [*Question:] The implementation always resets the `ios_base::skipws` flag of an underlying stream object. It breaks my `operator>>` that works only in presence of this flag. Can you remove code that resets the flag? - * [*Answer:] May be in a future version. There is no requirement in -__proposallong__ to reset the flag but -remember that __proposalshort__ is not yet accepted by the committee. By the way, it's a great opportunity to + * [*Answer:] May be in a future version. There is no requirement in +__proposallong__ to reset the flag but +remember that __proposalshort__ is not yet accepted by the committee. By the way, it's a great opportunity to make your `operator>>` conform to the standard. Read a good C++ book, study `std::sentry` and [@boost:libs/io/doc/ios_state.html `ios_state_saver`]. @@ -218,17 +218,17 @@ Read a good C++ book, study `std::sentry` and [@boost:libs/io/doc/ios_state.html ] * [*Question:] Why `std::cout << boost::lexical_cast("-1");` does not throw, but outputs 4294967295? - * [*Answer:] `boost::lexical_cast` has the behavior of `std::stringstream`, which uses `num_get` functions of -`std::locale` to convert numbers. If we look at the Programming languages — C++, we'll see, that `num_get` uses -the rules of `scanf` for conversions. And in the C99 standard for unsigned input value minus sign is optional, so + * [*Answer:] `boost::lexical_cast` has the behavior of `std::stringstream`, which uses `num_get` functions of +`std::locale` to convert numbers. If we look at the Programming languages — C++, we'll see, that `num_get` uses +the rules of `scanf` for conversions. And in the C99 standard for unsigned input value minus sign is optional, so if a negative number is read, no errors will arise and the result will be the two's complement. [pre ] * [*Question:] Why `boost::lexical_cast(L'A');` outputs 65 and `boost::lexical_cast(L"65");` does not throw? - * [*Answer:] If you are using an old version of Visual Studio or compile code with /Zc:wchar_t- flag, -`boost::lexical_cast` sees single `wchar_t` character as `unsigned short`. It is not a `boost::lexical_cast` mistake, but a + * [*Answer:] If you are using an old version of Visual Studio or compile code with /Zc:wchar_t- flag, +`boost::lexical_cast` sees single `wchar_t` character as `unsigned short`. It is not a `boost::lexical_cast` mistake, but a limitation of compiler options that you use. [pre @@ -236,7 +236,7 @@ limitation of compiler options that you use. * [*Question:] Why `boost::lexical_cast("-1.#IND");` throws `boost::bad_lexical_cast`? * [*Answer:] `"-1.#IND"` is a compiler extension, that violates standard. You shall input `"-nan"`, `"nan"`, `"inf"` -, `"-inf"` (case insensitive) strings to get NaN and Inf values. `boost::lexical_cast` outputs `"-nan"`, `"nan"`, +, `"-inf"` (case insensitive) strings to get NaN and Inf values. `boost::lexical_cast` outputs `"-nan"`, `"nan"`, `"inf"`, `"-inf"` strings, when has NaN or Inf input values. * [*Question:] What is the fastest way to convert a non zero terminated string or a substring using `boost::lexical_cast`? @@ -246,21 +246,21 @@ limitation of compiler options that you use. [section Changes] * [*boost 1.50.0 :] - + * `boost::bad_lexical_cast` exception is now globaly visible and can be catched even if code is compiled with -fvisibility=hidden. * Now it is possible to compile library with disabled exceptions. * Better performance, less memory usage and bugfixes for `boost::iterator_range` conversions. * [*boost 1.49.0 :] - - * Restored work with typedefed wchar_t (compilation flag /Zc:wchar_t- for Visual Studio). + + * Restored work with typedefed wchar_t (compilation flag /Zc:wchar_t- for Visual Studio). * Better performance and less memory usage for `boost::container::basic_string` conversions. - + * [*boost 1.48.0 :] - - * Added code to work with Inf and NaN on any platform. + + * Added code to work with Inf and NaN on any platform. * Better performance and less memory usage for conversions to float type (and to double type, if `sizeof(double) < sizeof(long double)`). - + * [*boost 1.47.0 :] * Optimizations for "C" and other locales without number grouping. @@ -283,7 +283,7 @@ limitation of compiler options that you use. * The previous version of lexical_cast used the default stream precision for reading and writing floating-point numbers. For numerics that have a corresponding specialization of `std::numeric_limits`, the current version now chooses a precision to match. * The previous version of lexical_cast did not support conversion to or from any wide-character-based types. For compilers with full language and library support for wide characters, `lexical_cast` now supports conversions from `wchar_t`, `wchar_t *`, and `std::wstring` and to `wchar_t` and `std::wstring`. * The previous version of `lexical_cast` assumed that the conventional stream extractor operators were sufficient for reading values. However, string I/O is asymmetric, with the result that spaces play the role of I/O separators rather than string content. The current version fixes this error for `std::string` and, where supported, `std::wstring`: `lexical_cast("Hello, World")` succeeds instead of failing with a `bad_lexical_cast` exception. - * The previous version of `lexical_cast` allowed unsafe and meaningless conversions to pointers. The current version now throws a `bad_lexical_cast` for conversions to pointers: `lexical_cast("Goodbye, World")` now throws an exception instead of causing undefined behavior. + * The previous version of `lexical_cast` allowed unsafe and meaningless conversions to pointers. The current version now throws a `bad_lexical_cast` for conversions to pointers: `lexical_cast("Goodbye, World")` now throws an exception instead of causing undefined behavior. [endsect] @@ -328,7 +328,7 @@ All the tests measure execution speed in milliseconds for 10000 iterations of th ``] ] ] -Fastest results are highlitened with "!!! *x* !!!". +Fastest results are highlitened with "!!! *x* !!!". Do not use this results to compare compilers, because tests were taken on different hardware. [endsect] diff --git a/include/boost/lexical_cast.hpp b/include/boost/lexical_cast.hpp index c2580ec..3e2e53f 100644 --- a/include/boost/lexical_cast.hpp +++ b/include/boost/lexical_cast.hpp @@ -69,12 +69,12 @@ namespace boost { // exception used to indicate runtime lexical_cast failure class BOOST_SYMBOL_VISIBLE bad_lexical_cast : - // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 -#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS - public std::exception -#else - public std::bad_cast -#endif + // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 +#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS + public std::exception +#else + public std::bad_cast +#endif #if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 ) // under bcc32 5.5.1 bad_cast doesn't derive from exception @@ -134,7 +134,7 @@ namespace boost } } // namespace boost -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__SUNPRO_CC) #include #include @@ -147,9 +147,7 @@ namespace boost #include #include #include -#if !defined(__SUNPRO_CC) #include -#endif // !defined(__SUNPRO_CC) #ifndef BOOST_NO_CWCHAR # include #endif @@ -170,13 +168,13 @@ namespace boost { { typedef CharT type; }; - + template <> struct widest_char< not_a_character_type, not_a_character_type > { typedef char type; }; - } + } namespace detail // is_char_or_wchar<...> and stream_char<...> templates { @@ -243,7 +241,7 @@ namespace boost { { typedef BOOST_DEDUCED_TYPENAME stream_char::type type; }; - + template struct stream_char > { @@ -256,13 +254,11 @@ namespace boost { typedef CharT type; }; -#if !defined(__SUNPRO_CC) template struct stream_char< ::boost::container::basic_string > { typedef CharT type; }; -#endif // !defined(__SUNPRO_CC) #if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T) template<> @@ -312,7 +308,6 @@ namespace boost { typedef Traits type; }; -#if !defined(__SUNPRO_CC) template struct deduce_char_traits< CharT , ::boost::container::basic_string @@ -366,7 +361,6 @@ namespace boost { { typedef Traits type; }; -#endif // !defined(__SUNPRO_CC) } namespace detail // lcast_src_length @@ -436,7 +430,7 @@ namespace boost { // -1.23456789e-123456 // ^ sign // ^ leading digit - // ^ decimal point + // ^ decimal point // ^^^^^^^^ lcast_precision::value // ^ "e" // ^ exponent sign @@ -1389,7 +1383,6 @@ namespace boost { return true; } -#if !defined(__SUNPRO_CC) template bool operator<<(::boost::container::basic_string const& str) { @@ -1397,7 +1390,7 @@ namespace boost { finish = start + str.length(); return true; } -#endif // !defined(__SUNPRO_CC) + bool operator<<(bool value) { CharT const czero = lcast_char_constants::zero; @@ -1410,14 +1403,14 @@ namespace boost { { start = rng.begin(); finish = rng.end(); - return true; + return true; } - + bool operator<<(const iterator_range& rng) { start = const_cast(rng.begin()); finish = const_cast(rng.end()); - return true; + return true; } bool operator<<(const iterator_range& rng) @@ -1677,10 +1670,9 @@ namespace boost { #endif template bool operator>>(std::basic_string& str) { str.assign(start, finish); return true; } -#if !defined(__SUNPRO_CC) + template bool operator>>(::boost::container::basic_string& str) { str.assign(start, finish); return true; } -#endif // !defined(__SUNPRO_CC) /* * case "-0" || "0" || "+0" : output = false; return true; @@ -1812,13 +1804,12 @@ namespace boost { { BOOST_STATIC_CONSTANT(bool, value = true ); }; -#if !defined(__SUNPRO_CC) + template struct is_stdstring< ::boost::container::basic_string > { BOOST_STATIC_CONSTANT(bool, value = true ); }; -#endif // !defined(__SUNPRO_CC) template struct is_arithmetic_and_not_xchars @@ -1866,11 +1857,11 @@ namespace boost { }; - // this metafunction evaluates to true, if we have optimized comnversion - // from Float type to Char array. + // this metafunction evaluates to true, if we have optimized comnversion + // from Float type to Char array. // Must be in sync with lexical_stream_limited_src::shl_real_type(...) template - struct is_this_float_conversion_optimized + struct is_this_float_conversion_optimized { typedef ::boost::type_traits::ice_and< ::boost::is_float::value, @@ -1904,7 +1895,7 @@ namespace boost { { BOOST_STATIC_CONSTANT(bool, value = true ); }; -#if !defined(__SUNPRO_CC) + template struct is_char_array_to_stdstring< ::boost::container::basic_string, CharT* > { @@ -1916,7 +1907,6 @@ namespace boost { { BOOST_STATIC_CONSTANT(bool, value = true ); }; -#endif // !defined(__SUNPRO_CC) #if (defined _MSC_VER) # pragma warning( push ) @@ -2262,10 +2252,10 @@ namespace boost { template Target lexical_cast(Source arg) { - typedef typename detail::widest_char< - BOOST_DEDUCED_TYPENAME detail::stream_char::type - , BOOST_DEDUCED_TYPENAME detail::stream_char::type - >::type char_type; + typedef typename detail::widest_char< + BOOST_DEDUCED_TYPENAME detail::stream_char::type + , BOOST_DEDUCED_TYPENAME detail::stream_char::type + >::type char_type; typedef std::char_traits traits; detail::lexical_stream interpreter; diff --git a/perf/Jamfile.v2 b/perf/Jamfile.v2 index 78176be..6f03fe1 100644 --- a/perf/Jamfile.v2 +++ b/perf/Jamfile.v2 @@ -13,17 +13,17 @@ path-constant TEST_DIR : . ; project performance/test : source-location ./ - : requirements -# /boost/chrono//boost_chrono + : requirements +# /boost/chrono//boost_chrono # /boost/system//boost_system static - freebsd:"-lrt" + freebsd:"-lrt" linux:"-lrt" gcc:-fvisibility=hidden intel-linux:-fvisibility=hidden sun:-xldscope=hidden : default-build release ; - + run performance_test.cpp : $(TEST_DIR) ; - + diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 6edd59b..f8ee0d3 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -11,20 +11,20 @@ import feature ; project : requirements /boost/test//boost_unit_test_framework - static + static gcc-4.8:BOOST_STL_SUPPORTS_NEW_UNICODE_LOCALES ; -# Thanks to Steven Watanabe for helping with feature +# Thanks to Steven Watanabe for helping with feature feature.feature nowchar : on : composite optional propagated link-incompatible ; feature.compose on : /Zc:wchar_t- ; - + test-suite conversion : [ run implicit_cast.cpp ] [ compile-fail implicit_cast_fail.cpp ] [ run ../cast_test.cpp ] - [ run ../numeric_cast_test.cpp ] + [ run ../numeric_cast_test.cpp ] [ run ../lexical_cast_test.cpp ] [ run lexical_cast_loopback_test.cpp ] [ run lexical_cast_abstract_test.cpp ] @@ -39,7 +39,7 @@ test-suite conversion [ compile lexical_cast_typedefed_wchar_test.cpp : msvc:on ] [ run lexical_cast_typedefed_wchar_test_runtime.cpp : : : msvc:on msvc,stlport:no ] [ run lexical_cast_no_locale_test.cpp : : : BOOST_NO_STD_LOCALE BOOST_LEXICAL_CAST_ASSUME_C_LOCALE ] - [ run lexical_cast_no_exceptions_test.cpp : : : BOOST_NO_EXCEPTIONS + [ run lexical_cast_no_exceptions_test.cpp : : : BOOST_NO_EXCEPTIONS gcc-4.3:-fno-exceptions gcc-4.4:-fno-exceptions gcc-4.5:-fno-exceptions diff --git a/test/lexical_cast_containers_test.cpp b/test/lexical_cast_containers_test.cpp index e6c544a..bb13f31 100644 --- a/test/lexical_cast_containers_test.cpp +++ b/test/lexical_cast_containers_test.cpp @@ -31,7 +31,7 @@ boost::unit_test::test_suite *init_unit_test_suite(int, char *[]) } void testing_boost_containers_basic_string() -{ +{ BOOST_CHECK("100" == lexical_cast("100")); BOOST_CHECK(L"100" == lexical_cast(L"100")); diff --git a/test/lexical_cast_float_types_test.cpp b/test/lexical_cast_float_types_test.cpp index 60db0e1..827b6ec 100755 --- a/test/lexical_cast_float_types_test.cpp +++ b/test/lexical_cast_float_types_test.cpp @@ -237,7 +237,7 @@ void test_converion_to_float_types() CHECK_CLOSE_ABS_DIFF(-10101.0E-011, test_t); CHECK_CLOSE_ABS_DIFF(-10101093, test_t); CHECK_CLOSE_ABS_DIFF(10101093, test_t); - + CHECK_CLOSE_ABS_DIFF(-.34, test_t); CHECK_CLOSE_ABS_DIFF(.34, test_t); CHECK_CLOSE_ABS_DIFF(.34e10, test_t); diff --git a/test/lexical_cast_iterator_range_test.cpp b/test/lexical_cast_iterator_range_test.cpp index d54de7a..50b86ff 100644 --- a/test/lexical_cast_iterator_range_test.cpp +++ b/test/lexical_cast_iterator_range_test.cpp @@ -138,7 +138,7 @@ void test_it_range_using_char(CharT* one, CharT* eleven) #endif } -void test_char_iterator_ranges() +void test_char_iterator_ranges() { typedef char test_char_type; test_char_type data1[] = "1"; @@ -149,7 +149,7 @@ void test_char_iterator_ranges() -void test_unsigned_char_iterator_ranges() +void test_unsigned_char_iterator_ranges() { typedef unsigned char test_char_type; test_char_type data1[] = "1"; @@ -158,7 +158,7 @@ void test_unsigned_char_iterator_ranges() test_it_range_using_char(data1, data2); } -void test_signed_char_iterator_ranges() +void test_signed_char_iterator_ranges() { typedef signed char test_char_type; test_char_type data1[] = "1"; @@ -167,7 +167,7 @@ void test_signed_char_iterator_ranges() test_it_range_using_char(data1, data2); } -void test_wchar_iterator_ranges() +void test_wchar_iterator_ranges() { #ifndef BOOST_LCAST_NO_WCHAR_T typedef wchar_t test_char_type; @@ -179,7 +179,7 @@ void test_wchar_iterator_ranges() BOOST_CHECK(true); } -void test_char16_iterator_ranges() +void test_char16_iterator_ranges() { #if !defined(BOOST_NO_CHAR16_T) && !defined(BOOST_NO_UNICODE_LITERALS) typedef char16_t test_char_type; @@ -191,7 +191,7 @@ void test_char16_iterator_ranges() BOOST_CHECK(true); } -void test_char32_iterator_ranges() +void test_char32_iterator_ranges() { #if !defined(BOOST_NO_CHAR32_T) && !defined(BOOST_NO_UNICODE_LITERALS) typedef char32_t test_char_type; diff --git a/test/lexical_cast_no_exceptions_test.cpp b/test/lexical_cast_no_exceptions_test.cpp index dbec8ea..c470eda 100755 --- a/test/lexical_cast_no_exceptions_test.cpp +++ b/test/lexical_cast_no_exceptions_test.cpp @@ -22,7 +22,7 @@ #ifndef BOOST_NO_EXCEPTIONS #error "This test must be compiled with -DBOOST_NO_EXCEPTIONS" -#endif +#endif bool g_was_exception = false; @@ -60,25 +60,25 @@ inline std::istream& operator>> (std::istream& i, Escape& rhs) void test_exceptions_off() { Escape v(""); - - g_was_exception = false; + + g_was_exception = false; lexical_cast(v); BOOST_CHECK(g_was_exception); - + g_was_exception = false; lexical_cast(v); BOOST_CHECK(g_was_exception); - + v = lexical_cast(100); BOOST_CHECK_EQUAL(lexical_cast(v), 100); BOOST_CHECK_EQUAL(lexical_cast(v), 100u); - + v = lexical_cast(0.0); BOOST_CHECK_EQUAL(lexical_cast(v), 0.0); BOOST_CHECK_EQUAL(lexical_cast(100), 100); BOOST_CHECK_EQUAL(lexical_cast(0.0), 0.0); - + g_was_exception = false; lexical_cast(700000); BOOST_CHECK(g_was_exception); diff --git a/test/lexical_cast_no_locale_test.cpp b/test/lexical_cast_no_locale_test.cpp index f3defb3..2a5120b 100755 --- a/test/lexical_cast_no_locale_test.cpp +++ b/test/lexical_cast_no_locale_test.cpp @@ -23,12 +23,12 @@ using namespace boost; // Testing compilation and some basic usage with BOOST_NO_STD_LOCALE -// Tests are mainly copyied from lexical_cast_empty_input_test.cpp (something +// Tests are mainly copyied from lexical_cast_empty_input_test.cpp (something // new added to test_empty_3) #ifndef BOOST_NO_STD_LOCALE #error "This test must be compiled with -DBOOST_NO_STD_LOCALE" -#endif +#endif template @@ -106,15 +106,15 @@ void test_empty_3() { Escape v(""); do_test_on_empty_input(v); - + BOOST_CHECK_THROW(lexical_cast(v), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast(v), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast(v), bad_lexical_cast); - + v = lexical_cast(100); BOOST_CHECK_EQUAL(lexical_cast(v), 100); BOOST_CHECK_EQUAL(lexical_cast(v), 100u); - + v = lexical_cast(0.0); BOOST_CHECK_EQUAL(lexical_cast(v), 0.0); } diff --git a/test/lexical_cast_typedefed_wchar_test_runtime.cpp b/test/lexical_cast_typedefed_wchar_test_runtime.cpp index d01700a..adb024e 100755 --- a/test/lexical_cast_typedefed_wchar_test_runtime.cpp +++ b/test/lexical_cast_typedefed_wchar_test_runtime.cpp @@ -30,7 +30,7 @@ void test_typedefed_wchar_t_runtime() BOOST_CHECK_EQUAL(boost::lexical_cast(L'A'), 65); BOOST_CHECK_EQUAL(boost::lexical_cast(L'B'), 66); - + BOOST_CHECK_EQUAL(boost::lexical_cast(L"65"), 65); BOOST_CHECK_EQUAL(boost::lexical_cast(L"66"), 66); #endif