You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // <string> Forward declarations -*- C++ -*-
  2. // Copyright (C) 2001-2020 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/stringfwd.h
  21. * This is an internal header file, included by other library headers.
  22. * Do not attempt to use it directly. @headername{string}
  23. */
  24. //
  25. // ISO C++ 14882: 21 Strings library
  26. //
  27. #ifndef _STRINGFWD_H
  28. #define _STRINGFWD_H 1
  29. #pragma GCC system_header
  30. #include <bits/c++config.h>
  31. #include <bits/memoryfwd.h>
  32. namespace std _GLIBCXX_VISIBILITY(default)
  33. {
  34. _GLIBCXX_BEGIN_NAMESPACE_VERSION
  35. /**
  36. * @defgroup strings Strings
  37. *
  38. * @{
  39. */
  40. template<class _CharT>
  41. struct char_traits;
  42. template<> struct char_traits<char>;
  43. #ifdef _GLIBCXX_USE_WCHAR_T
  44. template<> struct char_traits<wchar_t>;
  45. #endif
  46. #ifdef _GLIBCXX_USE_CHAR8_T
  47. template<> struct char_traits<char8_t>;
  48. #endif
  49. #if __cplusplus >= 201103L
  50. template<> struct char_traits<char16_t>;
  51. template<> struct char_traits<char32_t>;
  52. #endif
  53. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  54. template<typename _CharT, typename _Traits = char_traits<_CharT>,
  55. typename _Alloc = allocator<_CharT> >
  56. class basic_string;
  57. _GLIBCXX_END_NAMESPACE_CXX11
  58. /// A string of @c char
  59. typedef basic_string<char> string;
  60. #ifdef _GLIBCXX_USE_WCHAR_T
  61. /// A string of @c wchar_t
  62. typedef basic_string<wchar_t> wstring;
  63. #endif
  64. #ifdef _GLIBCXX_USE_CHAR8_T
  65. /// A string of @c char8_t
  66. typedef basic_string<char8_t> u8string;
  67. #endif
  68. #if __cplusplus >= 201103L
  69. /// A string of @c char16_t
  70. typedef basic_string<char16_t> u16string;
  71. /// A string of @c char32_t
  72. typedef basic_string<char32_t> u32string;
  73. #endif
  74. /** @} */
  75. _GLIBCXX_END_NAMESPACE_VERSION
  76. } // namespace std
  77. #endif // _STRINGFWD_H