1 // Locale support -*- C++ -*-
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 // Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction. Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License. This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
32 // ISO C++ 14882: 22.1 Locales
36 * This is an internal header file, included by other library headers.
37 * You should not attempt to use it directly.
41 #define _LOCALE_FWD_H 1
43 #pragma GCC system_header
45 #include <bits/c++config.h>
46 #include <bits/c++locale.h> // Defines __c_locale, config-specific includes
47 #include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
48 #include <bits/functexcept.h>
55 // 22.1.3 Convenience interfaces
56 template<typename _CharT
>
58 isspace(_CharT
, const locale
&);
60 template<typename _CharT
>
62 isprint(_CharT
, const locale
&);
64 template<typename _CharT
>
66 iscntrl(_CharT
, const locale
&);
68 template<typename _CharT
>
70 isupper(_CharT
, const locale
&);
72 template<typename _CharT
>
74 islower(_CharT
, const locale
&);
76 template<typename _CharT
>
78 isalpha(_CharT
, const locale
&);
80 template<typename _CharT
>
82 isdigit(_CharT
, const locale
&);
84 template<typename _CharT
>
86 ispunct(_CharT
, const locale
&);
88 template<typename _CharT
>
90 isxdigit(_CharT
, const locale
&);
92 template<typename _CharT
>
94 isalnum(_CharT
, const locale
&);
96 template<typename _CharT
>
98 isgraph(_CharT
, const locale
&);
100 template<typename _CharT
>
102 toupper(_CharT
, const locale
&);
104 template<typename _CharT
>
106 tolower(_CharT
, const locale
&);
108 // 22.2.1 and 22.2.1.3 ctype
110 template<typename _CharT
>
112 template<> class ctype
<char>;
113 #ifdef _GLIBCXX_USE_WCHAR_T
114 template<> class ctype
<wchar_t>;
116 template<typename _CharT
>
118 // NB: Specialized for char and wchar_t in locale_facets.h.
122 template<typename _InternT
, typename _ExternT
, typename _StateT
>
124 template<> class codecvt
<char, char, mbstate_t>;
125 #ifdef _GLIBCXX_USE_WCHAR_T
126 template<> class codecvt
<wchar_t, char, mbstate_t>;
128 template<typename _InternT
, typename _ExternT
, typename _StateT
>
129 class codecvt_byname
;
131 // 22.2.2 and 22.2.3 numeric
132 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
134 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
136 template<typename _CharT
> class numpunct
;
137 template<typename _CharT
> class numpunct_byname
;
140 template<typename _CharT
>
142 template<typename _CharT
> class
145 // 22.2.5 date and time
147 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
149 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
150 class time_get_byname
;
151 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
153 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
154 class time_put_byname
;
158 template<typename _CharT
, typename _InIter
= istreambuf_iterator
<_CharT
> >
160 template<typename _CharT
, typename _OutIter
= ostreambuf_iterator
<_CharT
> >
162 template<typename _CharT
, bool _Intl
= false>
164 template<typename _CharT
, bool _Intl
= false>
165 class moneypunct_byname
;
167 // 22.2.7 message retrieval
169 template<typename _CharT
>
171 template<typename _CharT
>
172 class messages_byname
;
174 template<typename _Facet
>
176 has_facet(const locale
& __loc
) throw();
178 template<typename _Facet
>
180 use_facet(const locale
& __loc
);
182 template<typename _Facet
>
184 __check_facet(const _Facet
* __f
)