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