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 #define BOOST_LOCALE_SOURCE 9 #include <boost/locale/boundary.hpp> 10 #include <boost/locale/collator.hpp> 11 #include <boost/locale/conversion.hpp> 12 #include <boost/locale/date_time_facet.hpp> 13 #include <boost/locale/message.hpp> 14 #include <boost/locale/info.hpp> 15 16 namespace boost { 17 namespace locale { 18 19 std::locale::id info::id; 20 std::locale::id calendar_facet::id; 21 22 std::locale::id converter<char>::id; 23 std::locale::id base_message_format<char>::id; 24 25 std::locale::id converter<wchar_t>::id; 26 std::locale::id base_message_format<wchar_t>::id; 27 28 #ifdef BOOST_LOCALE_ENABLE_CHAR16_T 29 30 std::locale::id converter<char16_t>::id; 31 std::locale::id base_message_format<char16_t>::id; 32 33 #endif 34 35 #ifdef BOOST_LOCALE_ENABLE_CHAR32_T 36 37 std::locale::id converter<char32_t>::id; 38 std::locale::id base_message_format<char32_t>::id; 39 40 #endif 41 42 namespace boundary { 43 44 std::locale::id boundary_indexing<char>::id; 45 46 std::locale::id boundary_indexing<wchar_t>::id; 47 48 #ifdef BOOST_LOCALE_ENABLE_CHAR16_T 49 std::locale::id boundary_indexing<char16_t>::id; 50 #endif 51 52 #ifdef BOOST_LOCALE_ENABLE_CHAR32_T 53 std::locale::id boundary_indexing<char32_t>::id; 54 #endif 55 } 56 57 namespace { 58 struct install_all { install_allboost::locale::__anon0f9fba980111::install_all59 install_all() 60 { 61 std::locale l = std::locale::classic(); 62 install_by<char>(); 63 install_by<wchar_t>(); 64 #ifdef BOOST_LOCALE_ENABLE_CHAR16_T 65 install_by<char16_t>(); 66 #endif 67 #ifdef BOOST_LOCALE_ENABLE_CHAR32_T 68 install_by<char32_t>(); 69 #endif 70 71 std::has_facet<info>(l); 72 std::has_facet<calendar_facet>(l); 73 } 74 template<typename Char> install_byboost::locale::__anon0f9fba980111::install_all75 void install_by() 76 { 77 std::locale l = std::locale::classic(); 78 std::has_facet<boundary::boundary_indexing<Char> >(l); 79 std::has_facet<converter<Char> >(l); 80 std::has_facet<base_message_format<Char> >(l); 81 } 82 } installer; 83 } 84 85 } 86 } 87 88 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 89