1 // Locale support -*- C++ -*-
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
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 * This is an internal header file, included by other library headers.
33 * You should not attempt to use it directly.
37 // ISO C++ 14882: 22.1 Locales
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>
50 _GLIBCXX_BEGIN_NAMESPACE(std)
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 _GLIBCXX_BEGIN_LDBL_NAMESPACE
133 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
135 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
137 _GLIBCXX_END_LDBL_NAMESPACE
138 template<typename _CharT> class numpunct;
139 template<typename _CharT> class numpunct_byname;
142 template<typename _CharT>
144 template<typename _CharT> class
147 // 22.2.5 date and time
149 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
151 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
152 class time_get_byname;
153 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
155 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
156 class time_put_byname;
160 _GLIBCXX_BEGIN_LDBL_NAMESPACE
161 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
163 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
165 _GLIBCXX_END_LDBL_NAMESPACE
166 template<typename _CharT, bool _Intl = false>
168 template<typename _CharT, bool _Intl = false>
169 class moneypunct_byname;
171 // 22.2.7 message retrieval
173 template<typename _CharT>
175 template<typename _CharT>
176 class messages_byname;
178 template<typename _Facet>
180 has_facet(const locale& __loc) throw();
182 template<typename _Facet>
184 use_facet(const locale& __loc);
186 template<typename _Facet>
188 __check_facet(const _Facet* __f)
195 _GLIBCXX_END_NAMESPACE