1 // <locale> Forward declarations -*- C++ -*-
3 // Copyright (C) 1997-2020 Free Software Foundation, Inc.
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)
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.
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.
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/>.
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}
31 // ISO C++ 14882: 22.1 Locales
35 #define _LOCALE_FWD_H 1
37 #pragma GCC system_header
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
44 namespace std
_GLIBCXX_VISIBILITY(default)
46 _GLIBCXX_BEGIN_NAMESPACE_VERSION
49 * @defgroup locales Locales
51 * Classes and functions for internationalization and localization.
57 template<typename _Facet
>
59 has_facet(const locale
&) throw();
61 template<typename _Facet
>
63 use_facet(const locale
&);
65 // 22.1.3 Convenience interfaces
66 template<typename _CharT
>
68 isspace(_CharT
, const locale
&);
70 template<typename _CharT
>
72 isprint(_CharT
, const locale
&);
74 template<typename _CharT
>
76 iscntrl(_CharT
, const locale
&);
78 template<typename _CharT
>
80 isupper(_CharT
, const locale
&);
82 template<typename _CharT
>
84 islower(_CharT
, const locale
&);
86 template<typename _CharT
>
88 isalpha(_CharT
, const locale
&);
90 template<typename _CharT
>
92 isdigit(_CharT
, const locale
&);
94 template<typename _CharT
>
96 ispunct(_CharT
, const locale
&);
98 template<typename _CharT
>
100 isxdigit(_CharT
, const locale
&);
102 template<typename _CharT
>
104 isalnum(_CharT
, const locale
&);
106 template<typename _CharT
>
108 isgraph(_CharT
, const locale
&);
110 #if __cplusplus >= 201103L
111 template<typename _CharT
>
113 isblank(_CharT
, const locale
&);
116 template<typename _CharT
>
118 toupper(_CharT
, const locale
&);
120 template<typename _CharT
>
122 tolower(_CharT
, const locale
&);
124 // 22.2.1 and 22.2.1.3 ctype
126 template<typename _CharT
>
128 template<> class ctype
<char>;
129 #ifdef _GLIBCXX_USE_WCHAR_T
130 template<> class ctype
<wchar_t>;
132 template<typename _CharT
>
134 // NB: Specialized for char and wchar_t in locale_facets.h.
137 template<typename _InternT
, typename _ExternT
, typename _StateT
>
139 template<> class codecvt
<char, char, mbstate_t>;
140 #ifdef _GLIBCXX_USE_WCHAR_T
141 template<> class codecvt
<wchar_t, char, mbstate_t>;
143 #if __cplusplus >= 201103L
144 template<> class codecvt
<char16_t
, char, mbstate_t>;
145 template<> class codecvt
<char32_t
, char, mbstate_t>;
146 #ifdef _GLIBCXX_USE_CHAR8_T
147 template<> class codecvt
<char16_t
, char8_t
, mbstate_t>;
148 template<> class codecvt
<char32_t
, char8_t
, mbstate_t>;
151 template<typename _InternT
, typename _ExternT
, typename _StateT
>
152 class codecvt_byname
;
154 // 22.2.2 and 22.2.3 numeric
155 _GLIBCXX_BEGIN_NAMESPACE_LDBL
156 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
158 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
160 _GLIBCXX_END_NAMESPACE_LDBL
161 _GLIBCXX_BEGIN_NAMESPACE_CXX11
162 template<typename _CharT
> class numpunct
;
163 template<typename _CharT
> class numpunct_byname
;
164 _GLIBCXX_END_NAMESPACE_CXX11
166 _GLIBCXX_BEGIN_NAMESPACE_CXX11
168 template<typename _CharT
>
170 template<typename _CharT
>
171 class collate_byname
;
172 _GLIBCXX_END_NAMESPACE_CXX11
174 // 22.2.5 date and time
176 _GLIBCXX_BEGIN_NAMESPACE_CXX11
177 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
179 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
180 class time_get_byname
;
181 _GLIBCXX_END_NAMESPACE_CXX11
182 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
184 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
185 class time_put_byname
;
189 _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
190 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
192 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
194 _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
195 _GLIBCXX_BEGIN_NAMESPACE_CXX11
196 template<typename _CharT
, bool _Intl
= false>
198 template<typename _CharT
, bool _Intl
= false>
199 class moneypunct_byname
;
200 _GLIBCXX_END_NAMESPACE_CXX11
202 // 22.2.7 message retrieval
204 _GLIBCXX_BEGIN_NAMESPACE_CXX11
205 template<typename _CharT
>
207 template<typename _CharT
>
208 class messages_byname
;
209 _GLIBCXX_END_NAMESPACE_CXX11
211 _GLIBCXX_END_NAMESPACE_VERSION