libstdc++
|
00001 // <string> Forward declarations -*- C++ -*- 00002 00003 // Copyright (C) 2001-2019 Free Software Foundation, Inc. 00004 // 00005 // This file is part of the GNU ISO C++ Library. This library is free 00006 // software; you can redistribute it and/or modify it under the 00007 // terms of the GNU General Public License as published by the 00008 // Free Software Foundation; either version 3, or (at your option) 00009 // any later version. 00010 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 00016 // Under Section 7 of GPL version 3, you are granted additional 00017 // permissions described in the GCC Runtime Library Exception, version 00018 // 3.1, as published by the Free Software Foundation. 00019 00020 // You should have received a copy of the GNU General Public License and 00021 // a copy of the GCC Runtime Library Exception along with this program; 00022 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 00023 // <http://www.gnu.org/licenses/>. 00024 00025 /** @file bits/stringfwd.h 00026 * This is an internal header file, included by other library headers. 00027 * Do not attempt to use it directly. @headername{string} 00028 */ 00029 00030 // 00031 // ISO C++ 14882: 21 Strings library 00032 // 00033 00034 #ifndef _STRINGFWD_H 00035 #define _STRINGFWD_H 1 00036 00037 #pragma GCC system_header 00038 00039 #include <bits/c++config.h> 00040 #include <bits/memoryfwd.h> 00041 00042 namespace std _GLIBCXX_VISIBILITY(default) 00043 { 00044 _GLIBCXX_BEGIN_NAMESPACE_VERSION 00045 00046 /** 00047 * @defgroup strings Strings 00048 * 00049 * @{ 00050 */ 00051 00052 template<class _CharT> 00053 struct char_traits; 00054 00055 template<> struct char_traits<char>; 00056 00057 #ifdef _GLIBCXX_USE_WCHAR_T 00058 template<> struct char_traits<wchar_t>; 00059 #endif 00060 00061 #ifdef _GLIBCXX_USE_CHAR8_T 00062 template<> struct char_traits<char8_t>; 00063 #endif 00064 00065 #if __cplusplus >= 201103L 00066 template<> struct char_traits<char16_t>; 00067 template<> struct char_traits<char32_t>; 00068 #endif 00069 00070 _GLIBCXX_BEGIN_NAMESPACE_CXX11 00071 00072 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00073 typename _Alloc = allocator<_CharT> > 00074 class basic_string; 00075 00076 _GLIBCXX_END_NAMESPACE_CXX11 00077 00078 /// A string of @c char 00079 typedef basic_string<char> string; 00080 00081 #ifdef _GLIBCXX_USE_WCHAR_T 00082 /// A string of @c wchar_t 00083 typedef basic_string<wchar_t> wstring; 00084 #endif 00085 00086 #ifdef _GLIBCXX_USE_CHAR8_T 00087 /// A string of @c char8_t 00088 typedef basic_string<char8_t> u8string; 00089 #endif 00090 00091 #if __cplusplus >= 201103L 00092 /// A string of @c char16_t 00093 typedef basic_string<char16_t> u16string; 00094 00095 /// A string of @c char32_t 00096 typedef basic_string<char32_t> u32string; 00097 #endif 00098 00099 /** @} */ 00100 00101 _GLIBCXX_END_NAMESPACE_VERSION 00102 } // namespace std 00103 00104 #endif // _STRINGFWD_H