OSDN Git Service

2008-08-20 Paolo Carlini <paolo.carlini@oracle.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / stringfwd.h
1 // String support -*- C++ -*-
2
3 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
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 2, 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 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING.  If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
21
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction.  Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License.  This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
30
31 /** @file stringfwd.h
32  *  This is an internal header file, included by other library headers.
33  *  You should not attempt to use it directly.
34  */
35
36 //
37 // ISO C++ 14882: 21 Strings library
38 //
39
40 #ifndef _STRINGFWD_H
41 #define _STRINGFWD_H 1
42
43 #pragma GCC system_header
44
45 #include <bits/c++config.h>
46
47 _GLIBCXX_BEGIN_NAMESPACE(std)
48
49   template<typename _Alloc>
50     class allocator;
51
52   template<class _CharT>
53     struct char_traits;
54
55   template<typename _CharT, typename _Traits = char_traits<_CharT>,
56            typename _Alloc = allocator<_CharT> >
57     class basic_string;
58
59   template<> struct char_traits<char>;
60
61   typedef basic_string<char>    string;
62
63 #ifdef _GLIBCXX_USE_WCHAR_T
64   template<> struct char_traits<wchar_t>;
65
66   typedef basic_string<wchar_t> wstring;
67 #endif
68
69 #if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
70      && defined(_GLIBCXX_USE_C99_STDINT_TR1))
71
72   template<> struct char_traits<char16_t>;
73   template<> struct char_traits<char32_t>;
74
75   typedef basic_string<char16_t> u16string;
76   typedef basic_string<char32_t> u32string;
77
78 #endif
79
80 _GLIBCXX_END_NAMESPACE
81
82 #endif  // _STRINGFWD_H