localefwd.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. // <locale> Forward declarations -*- C++ -*-
  2. // Copyright (C) 1997-2015 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. class 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. template<typename _InternT, typename _ExternT, typename _StateT>
  114. class codecvt_byname;
  115. // 22.2.2 and 22.2.3 numeric
  116. _GLIBCXX_BEGIN_NAMESPACE_LDBL
  117. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  118. class num_get;
  119. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  120. class num_put;
  121. _GLIBCXX_END_NAMESPACE_LDBL
  122. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  123. template<typename _CharT> class numpunct;
  124. template<typename _CharT> class numpunct_byname;
  125. _GLIBCXX_END_NAMESPACE_CXX11
  126. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  127. // 22.2.4 collation
  128. template<typename _CharT>
  129. class collate;
  130. template<typename _CharT>
  131. class collate_byname;
  132. _GLIBCXX_END_NAMESPACE_CXX11
  133. // 22.2.5 date and time
  134. class time_base;
  135. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  136. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  137. class time_get;
  138. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  139. class time_get_byname;
  140. _GLIBCXX_END_NAMESPACE_CXX11
  141. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  142. class time_put;
  143. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  144. class time_put_byname;
  145. // 22.2.6 money
  146. class money_base;
  147. _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11
  148. template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
  149. class money_get;
  150. template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
  151. class money_put;
  152. _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11
  153. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  154. template<typename _CharT, bool _Intl = false>
  155. class moneypunct;
  156. template<typename _CharT, bool _Intl = false>
  157. class moneypunct_byname;
  158. _GLIBCXX_END_NAMESPACE_CXX11
  159. // 22.2.7 message retrieval
  160. class messages_base;
  161. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  162. template<typename _CharT>
  163. class messages;
  164. template<typename _CharT>
  165. class messages_byname;
  166. _GLIBCXX_END_NAMESPACE_CXX11
  167. _GLIBCXX_END_NAMESPACE_VERSION
  168. } // namespace std
  169. #endif