localefwd.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. // <locale> Forward declarations -*- C++ -*-
  2. // Copyright (C) 1997-2022 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file bits/localefwd.h
  21. * This is an internal header file, included by other library headers.
  22. * Do not attempt to use it directly. @headername{locale}
  23. */
  24. //
  25. // ISO C++ 14882: 22.1 Locales
  26. //
  27. #ifndef _LOCALE_FWD_H
  28. #define _LOCALE_FWD_H 1
  29. #pragma GCC system_header
  30. #include <bits/c++config.h>
  31. #include <bits/c++locale.h> // Defines __c_locale, config-specific include
  32. #include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
  33. #include <cctype>
  34. namespace std _GLIBCXX_VISIBILITY(default)
  35. {
  36. _GLIBCXX_BEGIN_NAMESPACE_VERSION
  37. /**
  38. * @defgroup locales Locales
  39. *
  40. * Classes and functions for internationalization and localization.
  41. */
  42. // 22.1.1 Locale
  43. class locale;
  44. template<typename _Facet>
  45. bool
  46. has_facet(const locale&) throw();
  47. template<typename _Facet>
  48. const _Facet&
  49. use_facet(const locale&);
  50. // 22.1.3 Convenience interfaces
  51. template<typename _CharT>
  52. bool
  53. isspace(_CharT, const locale&);
  54. template<typename _CharT>
  55. bool
  56. isprint(_CharT, const locale&);
  57. template<typename _CharT>
  58. bool
  59. iscntrl(_CharT, const locale&);
  60. template<typename _CharT>
  61. bool
  62. isupper(_CharT, const locale&);
  63. template<typename _CharT>
  64. bool
  65. islower(_CharT, const locale&);
  66. template<typename _CharT>
  67. bool
  68. isalpha(_CharT, const locale&);
  69. template<typename _CharT>
  70. bool
  71. isdigit(_CharT, const locale&);
  72. template<typename _CharT>
  73. bool
  74. ispunct(_CharT, const locale&);
  75. template<typename _CharT>
  76. bool
  77. isxdigit(_CharT, const locale&);
  78. template<typename _CharT>
  79. bool
  80. isalnum(_CharT, const locale&);
  81. template<typename _CharT>
  82. bool
  83. isgraph(_CharT, const locale&);
  84. #if __cplusplus >= 201103L
  85. template<typename _CharT>
  86. bool
  87. isblank(_CharT, const locale&);
  88. #endif
  89. template<typename _CharT>
  90. _CharT
  91. toupper(_CharT, const locale&);
  92. template<typename _CharT>
  93. _CharT
  94. tolower(_CharT, const locale&);
  95. // 22.2.1 and 22.2.1.3 ctype
  96. struct ctype_base;
  97. template<typename _CharT>
  98. class ctype;
  99. template<> class ctype<char>;
  100. #ifdef _GLIBCXX_USE_WCHAR_T
  101. template<> class ctype<wchar_t>;
  102. #endif
  103. template<typename _CharT>
  104. class ctype_byname;
  105. // NB: Specialized for char and wchar_t in locale_facets.h.
  106. class codecvt_base;
  107. template<typename _InternT, typename _ExternT, typename _StateT>
  108. class codecvt;
  109. template<> class codecvt<char, char, mbstate_t>;
  110. #ifdef _GLIBCXX_USE_WCHAR_T
  111. template<> class codecvt<wchar_t, char, mbstate_t>;
  112. #endif
  113. #if __cplusplus >= 201103L
  114. template<> class codecvt<char16_t, char, mbstate_t>;
  115. template<> class codecvt<char32_t, char, mbstate_t>;
  116. #ifdef _GLIBCXX_USE_CHAR8_T
  117. template<> class codecvt<char16_t, char8_t, mbstate_t>;
  118. template<> class codecvt<char32_t, char8_t, mbstate_t>;
  119. #endif
  120. #endif
  121. template<typename _InternT, typename _ExternT, typename _StateT>
  122. class codecvt_byname;
  123. // 22.2.2 and 22.2.3 numeric
  124. _GLIBCXX_BEGIN_NAMESPACE_LDBL
  125. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  126. class num_get;
  127. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  128. class num_put;
  129. _GLIBCXX_END_NAMESPACE_LDBL
  130. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  131. template<typename _CharT> class numpunct;
  132. template<typename _CharT> class numpunct_byname;
  133. _GLIBCXX_END_NAMESPACE_CXX11
  134. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  135. // 22.2.4 collation
  136. template<typename _CharT>
  137. class collate;
  138. template<typename _CharT>
  139. class collate_byname;
  140. _GLIBCXX_END_NAMESPACE_CXX11
  141. // 22.2.5 date and time
  142. class time_base;
  143. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  144. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  145. class time_get;
  146. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  147. class time_get_byname;
  148. _GLIBCXX_END_NAMESPACE_CXX11
  149. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  150. class time_put;
  151. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  152. class time_put_byname;
  153. // 22.2.6 money
  154. class money_base;
  155. _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
  156. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  157. class money_get;
  158. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  159. class money_put;
  160. _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
  161. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  162. template<typename _CharT, bool _Intl = false>
  163. class moneypunct;
  164. template<typename _CharT, bool _Intl = false>
  165. class moneypunct_byname;
  166. _GLIBCXX_END_NAMESPACE_CXX11
  167. // 22.2.7 message retrieval
  168. struct messages_base;
  169. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  170. template<typename _CharT>
  171. class messages;
  172. template<typename _CharT>
  173. class messages_byname;
  174. _GLIBCXX_END_NAMESPACE_CXX11
  175. _GLIBCXX_END_NAMESPACE_VERSION
  176. } // namespace std
  177. #endif