libstdc++
stringfwd.h
Go to the documentation of this file.
00001 // <string> Forward declarations -*- C++ -*-
00002 
00003 // Copyright (C) 2001-2013 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<typename _CharT, typename _Traits = char_traits<_CharT>,
00056            typename _Alloc = allocator<_CharT> >
00057     class basic_string;
00058 
00059   template<> struct char_traits<char>;
00060 
00061   /// A string of @c char
00062   typedef basic_string<char>    string;   
00063 
00064 #ifdef _GLIBCXX_USE_WCHAR_T
00065   template<> struct char_traits<wchar_t>;
00066 
00067   /// A string of @c wchar_t
00068   typedef basic_string<wchar_t> wstring;   
00069 #endif
00070 
00071 #if ((__cplusplus >= 201103L) \
00072      && defined(_GLIBCXX_USE_C99_STDINT_TR1))
00073 
00074   template<> struct char_traits<char16_t>;
00075   template<> struct char_traits<char32_t>;
00076 
00077   /// A string of @c char16_t
00078   typedef basic_string<char16_t> u16string; 
00079 
00080   /// A string of @c char32_t
00081   typedef basic_string<char32_t> u32string; 
00082 
00083 #endif
00084   /** @}  */
00085 
00086 _GLIBCXX_END_NAMESPACE_VERSION
00087 } // namespace std
00088 
00089 #endif  // _STRINGFWD_H