1// <locale> Forward declarations -*- C++ -*-
2
3// Copyright (C) 1997-2015 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file bits/localefwd.h
26 * This is an internal header file, included by other library headers.
27 * Do not attempt to use it directly. @headername{locale}
28 */
29
30//
31// ISO C++ 14882: 22.1 Locales
32//
33
34#ifndef _LOCALE_FWD_H
35#define _LOCALE_FWD_H 1
36
37#pragma GCC system_header
38
39#include <bits/c++config.h>
40#include <bits/c++locale.h> // Defines __c_locale, config-specific include
41#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
42#include <cctype>
43
44namespace std _GLIBCXX_VISIBILITY(default)
45{
46_GLIBCXX_BEGIN_NAMESPACE_VERSION
47
48 /**
49 * @defgroup locales Locales
50 *
51 * Classes and functions for internationalization and localization.
52 */
53
54 // 22.1.1 Locale
55 class locale;
56
57 template<typename _Facet>
58 bool
59 has_facet(const locale&) throw();
60
61 template<typename _Facet>
62 const _Facet&
63 use_facet(const locale&);
64
65 // 22.1.3 Convenience interfaces
66 template<typename _CharT>
67 bool
68 isspace(_CharT, const locale&);
69
70 template<typename _CharT>
71 bool
72 isprint(_CharT, const locale&);
73
74 template<typename _CharT>
75 bool
76 iscntrl(_CharT, const locale&);
77
78 template<typename _CharT>
79 bool
80 isupper(_CharT, const locale&);
81
82 template<typename _CharT>
83 bool
84 islower(_CharT, const locale&);
85
86 template<typename _CharT>
87 bool
88 isalpha(_CharT, const locale&);
89
90 template<typename _CharT>
91 bool
92 isdigit(_CharT, const locale&);
93
94 template<typename _CharT>
95 bool
96 ispunct(_CharT, const locale&);
97
98 template<typename _CharT>
99 bool
100 isxdigit(_CharT, const locale&);
101
102 template<typename _CharT>
103 bool
104 isalnum(_CharT, const locale&);
105
106 template<typename _CharT>
107 bool
108 isgraph(_CharT, const locale&);
109
110#if __cplusplus >= 201103L
111 template<typename _CharT>
112 bool
113 isblank(_CharT, const locale&);
114#endif
115
116 template<typename _CharT>
117 _CharT
118 toupper(_CharT, const locale&);
119
120 template<typename _CharT>
121 _CharT
122 tolower(_CharT, const locale&);
123
124 // 22.2.1 and 22.2.1.3 ctype
125 class ctype_base;
126 template<typename _CharT>
127 class ctype;
128 template<> class ctype<char>;
129#ifdef _GLIBCXX_USE_WCHAR_T
130 template<> class ctype<wchar_t>;
131#endif
132 template<typename _CharT>
133 class ctype_byname;
134 // NB: Specialized for char and wchar_t in locale_facets.h.
135
136 class codecvt_base;
137 template<typename _InternT, typename _ExternT, typename _StateT>
138 class codecvt;
139 template<> class codecvt<char, char, mbstate_t>;
140#ifdef _GLIBCXX_USE_WCHAR_T
141 template<> class codecvt<wchar_t, char, mbstate_t>;
142#endif
143 template<typename _InternT, typename _ExternT, typename _StateT>
144 class codecvt_byname;
145
146 // 22.2.2 and 22.2.3 numeric
147_GLIBCXX_BEGIN_NAMESPACE_LDBL
148 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
149 class num_get;
150 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
151 class num_put;
152_GLIBCXX_END_NAMESPACE_LDBL
153_GLIBCXX_BEGIN_NAMESPACE_CXX11
154 template<typename _CharT> class numpunct;
155 template<typename _CharT> class numpunct_byname;
156_GLIBCXX_END_NAMESPACE_CXX11
157
158_GLIBCXX_BEGIN_NAMESPACE_CXX11
159 // 22.2.4 collation
160 template<typename _CharT>
161 class collate;
162 template<typename _CharT>
163 class collate_byname;
164_GLIBCXX_END_NAMESPACE_CXX11
165
166 // 22.2.5 date and time
167 class time_base;
168_GLIBCXX_BEGIN_NAMESPACE_CXX11
169 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
170 class time_get;
171 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
172 class time_get_byname;
173_GLIBCXX_END_NAMESPACE_CXX11
174 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
175 class time_put;
176 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
177 class time_put_byname;
178
179 // 22.2.6 money
180 class money_base;
181_GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
182 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
183 class money_get;
184 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
185 class money_put;
186_GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
187_GLIBCXX_BEGIN_NAMESPACE_CXX11
188 template<typename _CharT, bool _Intl = false>
189 class moneypunct;
190 template<typename _CharT, bool _Intl = false>
191 class moneypunct_byname;
192_GLIBCXX_END_NAMESPACE_CXX11
193
194 // 22.2.7 message retrieval
195 class messages_base;
196_GLIBCXX_BEGIN_NAMESPACE_CXX11
197 template<typename _CharT>
198 class messages;
199 template<typename _CharT>
200 class messages_byname;
201_GLIBCXX_END_NAMESPACE_CXX11
202
203_GLIBCXX_END_NAMESPACE_VERSION
204} // namespace std
205
206#endif
207