]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // |
2 | // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) | |
3 | // | |
4 | // Distributed under the Boost Software License, Version 1.0. (See | |
5 | // accompanying file LICENSE_1_0.txt or copy at | |
6 | // http://www.boost.org/LICENSE_1_0.txt) | |
7 | // | |
8 | ||
9 | // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen | |
10 | /*! | |
11 | \page status_of_cpp0x_characters_support Status of C++11 char16_t/char32_t support | |
12 | ||
13 | The support of C++11 \c char16_t and \c char32_t is experimental, mostly does not work and not | |
14 | intended to be used in production with current latest compilers: GCC-4.5, MSVC10 till major | |
15 | compiler's flaws would be fixed. | |
16 | ||
17 | \section status_of_cpp0x_characters_support_gnu GNU GCC 4.5/C++11 Status | |
18 | ||
19 | GNU C++ compiler provides decent support of C++11 characters however: | |
20 | ||
21 | -# Standard library does not install any std::locale::facets for this support so any attempt | |
22 | to format numbers using \c char16_t or \c char32_t streams would just fail. | |
23 | -# Standard library misses specialization for required \c char16_t/char32_t locale facets, | |
24 | so "std" backends is not build-able as essential symbols missing, also \c codecvt facet | |
25 | can't be created as well. | |
26 | ||
27 | \section status_of_cpp0x_characters_support_msvc Visual Studio 2010 (MSVC10)/C++11 Status | |
28 | ||
29 | MSVC provides all required facets however: | |
30 | ||
31 | -# Standard library does not provide installations of std::locale::id for these facets | |
32 | in DLL so it is not usable with \c /MD, \c /MDd compiler flags and requires static link of the runtime | |
33 | library. | |
34 | -# \c char16_t and \c char32_t are not distinct types but rather aliases of unsigned short and unsigned | |
35 | types which contradicts to C++11 requirements making it impossible to write \c char16_t/char32_t to stream | |
36 | and causing multiple faults. | |
37 | ||
38 | If you want to build or test Boost.Locale with C++11 char16_t and char32_t support you should pass `cxxflags="-DBOOST_LOCALE_ENABLE_CHAR32_T -DBOOST_LOCALE_ENABLE_CHAR16_T"` to `b2` during build and define `BOOST_LOCALE_ENABLE_CHAR32_T` and `BOOST_LOCALE_ENABLE_CHAR32_T` when using Boost.Locale | |
39 | ||
40 | */ | |
41 |