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