stringfwd.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // <string> Forward declarations -*- C++ -*-
  2. // Copyright (C) 2001-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/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. #if ((__cplusplus >= 201103L) \
  47. && defined(_GLIBCXX_USE_C99_STDINT_TR1))
  48. template<> struct char_traits<char16_t>;
  49. template<> struct char_traits<char32_t>;
  50. #endif
  51. _GLIBCXX_BEGIN_NAMESPACE_CXX11
  52. template<typename _CharT, typename _Traits = char_traits<_CharT>,
  53. typename _Alloc = allocator<_CharT> >
  54. class basic_string;
  55. /// A string of @c char
  56. typedef basic_string<char> string;
  57. #ifdef _GLIBCXX_USE_WCHAR_T
  58. /// A string of @c wchar_t
  59. typedef basic_string<wchar_t> wstring;
  60. #endif
  61. #if ((__cplusplus >= 201103L) \
  62. && defined(_GLIBCXX_USE_C99_STDINT_TR1))
  63. /// A string of @c char16_t
  64. typedef basic_string<char16_t> u16string;
  65. /// A string of @c char32_t
  66. typedef basic_string<char32_t> u32string;
  67. #endif
  68. _GLIBCXX_END_NAMESPACE_CXX11
  69. /** @} */
  70. _GLIBCXX_END_NAMESPACE_VERSION
  71. } // namespace std
  72. #endif // _STRINGFWD_H