libstdc++: localefwd.h Source File

libstdc++

localefwd.h
Go to the documentation of this file.
1// <locale> Forward declarations -*- C++ -*-
2
3// Copyright (C) 1997-2026 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 <bits/iosfwd.h> // 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
cctype
c++locale.h
c++config.h
std::has_facet
bool has_facet(const locale &__loc) noexcept
Test for the presence of a facet.
Definition locale_classes.tcc:190
std::use_facet
const _Facet & use_facet(const locale &__loc)
Return a facet.
Definition locale_classes.tcc:220
std
ISO C++ entities toplevel namespace is std.
std::isgraph
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
Definition locale_facets.h:2673
std::isspace
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
Definition locale_facets.h:2613
std::isxdigit
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
Definition locale_facets.h:2661
std::islower
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
Definition locale_facets.h:2637
std::isdigit
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
Definition locale_facets.h:2649
std::isblank
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
Definition locale_facets.h:2680
std::toupper
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
Definition locale_facets.h:2687
std::isupper
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
Definition locale_facets.h:2631
std::isalnum
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
Definition locale_facets.h:2667
std::ispunct
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
Definition locale_facets.h:2655
std::tolower
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
Definition locale_facets.h:2693
std::isprint
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
Definition locale_facets.h:2619
std::isalpha
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
Definition locale_facets.h:2643
std::iscntrl
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
Definition locale_facets.h:2625
std::codecvt_base
Empty base class for codecvt facet [22.2.1.5].
Definition codecvt.h:55
std::codecvt
Primary class template codecvt.
Definition codecvt.h:284
std::codecvt_byname
class codecvt_byname [22.2.1.6].
Definition codecvt.h:705
std::locale
Container class for localization functionality.
Definition locale_classes.h:70
std::ctype
Primary class template ctype facet.
Definition locale_facets.h:616
std::ctype_byname
class ctype_byname [22.2.1.2].
Definition locale_facets.h:1487
std::numpunct
Primary class template numpunct.
Definition locale_facets.h:1679
std::numpunct_byname
class numpunct_byname [22.2.3.2].
Definition locale_facets.h:1912
std::num_get
Primary class template num_get.
Definition locale_facets.h:1961
std::num_put
Primary class template num_put.
Definition locale_facets.h:2325
std::time_base
Time format ordering data.
Definition locale_facets_nonio.h:55
std::time_get
Primary class template time_get.
Definition locale_facets_nonio.h:401
std::time_get_byname
class time_get_byname [22.2.5.2].
Definition locale_facets_nonio.h:801
std::time_put
Primary class template time_put.
Definition locale_facets_nonio.h:838
std::time_put_byname
class time_put_byname [22.2.5.4].
Definition locale_facets_nonio.h:934
std::money_base
Money format ordering data.
Definition locale_facets_nonio.h:969
std::moneypunct
Primary class template moneypunct.
Definition locale_facets_nonio.h:1065
std::moneypunct_byname
class moneypunct_byname [22.2.6.4].
Definition locale_facets_nonio.h:1455
std::money_get
Primary class template money_get.
Definition locale_facets_nonio.h:1509
std::money_put
Primary class template money_put.
Definition locale_facets_nonio.h:1670
std::messages_base
Messages facet base class providing catalog typedef.
Definition locale_facets_nonio.h:1827
std::messages
Primary class template messages.
Definition locale_facets_nonio.h:1856
std::messages_byname
class messages_byname [22.2.7.2].
Definition locale_facets_nonio.h:2040
std::ctype_base
Base class for ctype.
Definition ctype_base.h:42