blob: 952fa85a5235174725fac0746861fb4a1fb361c6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
//
// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#define BOOST_LOCALE_SOURCE
#include <boost/locale/boundary.hpp>
#include <boost/locale/collator.hpp>
#include <boost/locale/conversion.hpp>
#include <boost/locale/date_time_facet.hpp>
#include <boost/locale/message.hpp>
#include <boost/locale/info.hpp>
namespace boost {
namespace locale {
std::locale::id info::id;
std::locale::id calendar_facet::id;
std::locale::id converter<char>::id;
std::locale::id base_message_format<char>::id;
std::locale::id converter<wchar_t>::id;
std::locale::id base_message_format<wchar_t>::id;
#ifdef BOOST_LOCALE_ENABLE_CHAR16_T
std::locale::id converter<char16_t>::id;
std::locale::id base_message_format<char16_t>::id;
#endif
#ifdef BOOST_LOCALE_ENABLE_CHAR32_T
std::locale::id converter<char32_t>::id;
std::locale::id base_message_format<char32_t>::id;
#endif
namespace boundary {
std::locale::id boundary_indexing<char>::id;
std::locale::id boundary_indexing<wchar_t>::id;
#ifdef BOOST_LOCALE_ENABLE_CHAR16_T
std::locale::id boundary_indexing<char16_t>::id;
#endif
#ifdef BOOST_LOCALE_ENABLE_CHAR32_T
std::locale::id boundary_indexing<char32_t>::id;
#endif
}
namespace {
struct install_all {
install_all()
{
std::locale l = std::locale::classic();
install_by<char>();
install_by<wchar_t>();
#ifdef BOOST_LOCALE_ENABLE_CHAR16_T
install_by<char16_t>();
#endif
#ifdef BOOST_LOCALE_ENABLE_CHAR32_T
install_by<char32_t>();
#endif
std::has_facet<info>(l);
std::has_facet<calendar_facet>(l);
}
template<typename Char>
void install_by()
{
std::locale l = std::locale::classic();
std::has_facet<boundary::boundary_indexing<Char> >(l);
std::has_facet<converter<Char> >(l);
std::has_facet<base_message_format<Char> >(l);
}
} installer;
}
}
}
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
|