libstdc++
localefwd.h
Go to the documentation of this file.
1// <locale> Forward declarations -*- C++ -*-
2
3// Copyright (C) 1997-2025 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#ifdef _GLIBCXX_SYSHDR
38#pragma GCC system_header
39#endif
40
41#include <bits/c++config.h>
42#include <bits/c++locale.h> // Defines __c_locale, config-specific include
43#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
44#include <cctype>
45
46namespace std _GLIBCXX_VISIBILITY(default)
47{
48_GLIBCXX_BEGIN_NAMESPACE_VERSION
49
50 /**
51 * @defgroup locales Locales
52 *
53 * Classes and functions for internationalization and localization.
54 */
55
56 // 22.1.1 Locale
57 class locale;
58
59 template<typename _Facet>
60 bool
61 has_facet(const locale&) throw();
62
63 template<typename _Facet>
64 const _Facet&
65 use_facet(const locale&);
66
67 // 22.1.3 Convenience interfaces
68 template<typename _CharT>
69 bool
70 isspace(_CharT, const locale&);
71
72 template<typename _CharT>
73 bool
74 isprint(_CharT, const locale&);
75
76 template<typename _CharT>
77 bool
78 iscntrl(_CharT, const locale&);
79
80 template<typename _CharT>
81 bool
82 isupper(_CharT, const locale&);
83
84 template<typename _CharT>
85 bool
86 islower(_CharT, const locale&);
87
88 template<typename _CharT>
89 bool
90 isalpha(_CharT, const locale&);
91
92 template<typename _CharT>
93 bool
94 isdigit(_CharT, const locale&);
95
96 template<typename _CharT>
97 bool
98 ispunct(_CharT, const locale&);
99
100 template<typename _CharT>
101 bool
102 isxdigit(_CharT, const locale&);
103
104 template<typename _CharT>
105 bool
106 isalnum(_CharT, const locale&);
107
108 template<typename _CharT>
109 bool
110 isgraph(_CharT, const locale&);
111
112#if __cplusplus >= 201103L
113 template<typename _CharT>
114 bool
115 isblank(_CharT, const locale&);
116#endif
117
118 template<typename _CharT>
119 _CharT
120 toupper(_CharT, const locale&);
121
122 template<typename _CharT>
123 _CharT
124 tolower(_CharT, const locale&);
125
126 // 22.2.1 and 22.2.1.3 ctype
127 struct ctype_base;
128 template<typename _CharT>
129 class ctype;
130 template<> class ctype<char>;
131#ifdef _GLIBCXX_USE_WCHAR_T
132 template<> class ctype<wchar_t>;
133#endif
134 template<typename _CharT>
135 class ctype_byname;
136 // NB: Specialized for char and wchar_t in locale_facets.h.
137
138 class codecvt_base;
139 template<typename _InternT, typename _ExternT, typename _StateT>
140 class codecvt;
141 template<> class codecvt<char, char, mbstate_t>;
142#ifdef _GLIBCXX_USE_WCHAR_T
143 template<> class codecvt<wchar_t, char, mbstate_t>;
144#endif
145#if __cplusplus >= 201103L
146 template<> class codecvt<char16_t, char, mbstate_t>;
147 template<> class codecvt<char32_t, char, mbstate_t>;
148#ifdef _GLIBCXX_USE_CHAR8_T
149 template<> class codecvt<char16_t, char8_t, mbstate_t>;
150 template<> class codecvt<char32_t, char8_t, mbstate_t>;
151#endif
152#endif
153 template<typename _InternT, typename _ExternT, typename _StateT>
154 class codecvt_byname;
155
156 // 22.2.2 and 22.2.3 numeric
157_GLIBCXX_BEGIN_NAMESPACE_LDBL
158 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
159 class num_get;
160 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
161 class num_put;
162_GLIBCXX_END_NAMESPACE_LDBL
163_GLIBCXX_BEGIN_NAMESPACE_CXX11
164 template<typename _CharT> class numpunct;
165 template<typename _CharT> class numpunct_byname;
166_GLIBCXX_END_NAMESPACE_CXX11
167
168_GLIBCXX_BEGIN_NAMESPACE_CXX11
169 // 22.2.4 collation
170 template<typename _CharT>
171 class collate;
172 template<typename _CharT>
173 class collate_byname;
174_GLIBCXX_END_NAMESPACE_CXX11
175
176 // 22.2.5 date and time
177 class time_base;
178_GLIBCXX_BEGIN_NAMESPACE_CXX11
179 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
180 class time_get;
181 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
182 class time_get_byname;
183_GLIBCXX_END_NAMESPACE_CXX11
184 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
185 class time_put;
186 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
187 class time_put_byname;
188
189 // 22.2.6 money
190 class money_base;
191_GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
192 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
193 class money_get;
194 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
195 class money_put;
196_GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
197_GLIBCXX_BEGIN_NAMESPACE_CXX11
198 template<typename _CharT, bool _Intl = false>
199 class moneypunct;
200 template<typename _CharT, bool _Intl = false>
201 class moneypunct_byname;
202_GLIBCXX_END_NAMESPACE_CXX11
203
204 // 22.2.7 message retrieval
205 struct messages_base;
206_GLIBCXX_BEGIN_NAMESPACE_CXX11
207 template<typename _CharT>
208 class messages;
209 template<typename _CharT>
210 class messages_byname;
211_GLIBCXX_END_NAMESPACE_CXX11
212
213_GLIBCXX_END_NAMESPACE_VERSION
214} // namespace std
215
216#endif
bool has_facet(const locale &__loc) noexcept
Test for the presence of a facet.
const _Facet & use_facet(const locale &__loc)
Return a facet.
ISO C++ entities toplevel namespace is std.
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
Empty base class for codecvt facet [22.2.1.5].
Definition codecvt.h:55
Primary class template codecvt.
Definition codecvt.h:284
class codecvt_byname [22.2.1.6].
Definition codecvt.h:705
Container class for localization functionality.
Primary class template ctype facet.
class ctype_byname [22.2.1.2].
Primary class template numpunct.
class numpunct_byname [22.2.3.2].
Primary class template num_get.
Primary class template num_put.
Time format ordering data.
Primary class template time_get.
class time_get_byname [22.2.5.2].
Primary class template time_put.
class time_put_byname [22.2.5.4].
Money format ordering data.
Primary class template moneypunct.
class moneypunct_byname [22.2.6.4].
Primary class template money_get.
Primary class template money_put.
Messages facet base class providing catalog typedef.
Primary class template messages.
class messages_byname [22.2.7.2].
Base class for ctype.
Definition ctype_base.h:42