stringfwd.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // String support -*- C++ -*-
  2. // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
  3. // Free Software Foundation, Inc.
  4. //
  5. // This file is part of the GNU ISO C++ Library. This library is free
  6. // software; you can redistribute it and/or modify it under the
  7. // terms of the GNU General Public License as published by the
  8. // Free Software Foundation; either version 3, or (at your option)
  9. // any later version.
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. // Under Section 7 of GPL version 3, you are granted additional
  15. // permissions described in the GCC Runtime Library Exception, version
  16. // 3.1, as published by the Free Software Foundation.
  17. // You should have received a copy of the GNU General Public License and
  18. // a copy of the GCC Runtime Library Exception along with this program;
  19. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  20. // <http://www.gnu.org/licenses/>.
  21. /** @file stringfwd.h
  22. * This is an internal header file, included by other library headers.
  23. * You should not attempt to use it directly.
  24. */
  25. //
  26. // ISO C++ 14882: 21 Strings library
  27. //
  28. #ifndef _STRINGFWD_H
  29. #define _STRINGFWD_H 1
  30. #pragma GCC system_header
  31. #include <bits/c++config.h>
  32. _GLIBCXX_BEGIN_NAMESPACE(std)
  33. template<typename _Alloc>
  34. class allocator;
  35. template<class _CharT>
  36. struct char_traits;
  37. template<typename _CharT, typename _Traits = char_traits<_CharT>,
  38. typename _Alloc = allocator<_CharT> >
  39. class basic_string;
  40. template<> struct char_traits<char>;
  41. typedef basic_string<char> string;
  42. #ifdef _GLIBCXX_USE_WCHAR_T
  43. template<> struct char_traits<wchar_t>;
  44. typedef basic_string<wchar_t> wstring;
  45. #endif
  46. #if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
  47. && defined(_GLIBCXX_USE_C99_STDINT_TR1))
  48. template<> struct char_traits<char16_t>;
  49. template<> struct char_traits<char32_t>;
  50. typedef basic_string<char16_t> u16string;
  51. typedef basic_string<char32_t> u32string;
  52. #endif
  53. _GLIBCXX_END_NAMESPACE
  54. #endif // _STRINGFWD_H