gccxml_gem 0.9.2-universal-darwin-10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. data/Rakefile +79 -0
  2. data/bin/gccxml +0 -0
  3. data/bin/gccxml_cc1plus +0 -0
  4. data/gccxml.rb +57 -0
  5. data/share/doc/gccxml-0.9/Copyright.txt +55 -0
  6. data/share/doc/gccxml-0.9/gccxml.html +168 -0
  7. data/share/doc/gccxml-0.9/gccxml.txt +293 -0
  8. data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
  9. data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
  10. data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
  11. data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
  12. data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
  13. data/share/gccxml-0.9/GCC/2.95/complex +38 -0
  14. data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
  15. data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
  16. data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
  17. data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
  18. data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
  19. data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
  20. data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
  21. data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
  22. data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
  23. data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
  24. data/share/gccxml-0.9/GCC/2.95/deque +19 -0
  25. data/share/gccxml-0.9/GCC/2.95/exception +20 -0
  26. data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
  27. data/share/gccxml-0.9/GCC/2.95/functional +64 -0
  28. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
  29. data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
  30. data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
  31. data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
  32. data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
  33. data/share/gccxml-0.9/GCC/2.95/list +19 -0
  34. data/share/gccxml-0.9/GCC/2.95/map +20 -0
  35. data/share/gccxml-0.9/GCC/2.95/memory +21 -0
  36. data/share/gccxml-0.9/GCC/2.95/new +13 -0
  37. data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
  38. data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
  39. data/share/gccxml-0.9/GCC/2.95/queue +20 -0
  40. data/share/gccxml-0.9/GCC/2.95/set +20 -0
  41. data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
  42. data/share/gccxml-0.9/GCC/2.95/stack +19 -0
  43. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
  44. data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
  45. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
  46. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
  47. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
  48. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
  49. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
  50. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
  51. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
  52. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
  53. data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
  54. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
  55. data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
  56. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
  57. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
  58. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
  59. data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
  60. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
  61. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
  62. data/share/gccxml-0.9/GCC/2.95/string +26 -0
  63. data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
  64. data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
  65. data/share/gccxml-0.9/GCC/2.95/utility +25 -0
  66. data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
  67. data/share/gccxml-0.9/GCC/2.95/vector +19 -0
  68. data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
  69. data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
  70. data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
  71. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
  72. data/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h +581 -0
  73. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
  74. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
  75. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
  76. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
  77. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
  78. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
  79. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
  80. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
  81. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
  82. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
  83. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
  84. data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
  85. data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
  86. data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
  87. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
  88. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
  89. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
  90. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
  91. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
  92. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
  93. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
  94. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
  95. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
  96. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
  97. data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
  98. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
  99. data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
  100. data/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h +664 -0
  101. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
  102. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
  103. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
  104. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
  105. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
  106. data/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h +182 -0
  107. data/share/gccxml-0.9/IBM/8.0/adapt_headers.sh +34 -0
  108. data/share/gccxml-0.9/IBM/8.0/stdlib.h.patch +27 -0
  109. data/share/gccxml-0.9/IBM/8.0/xstring.patch +19 -0
  110. data/share/gccxml-0.9/IBM/README +8 -0
  111. data/share/gccxml-0.9/IBM/find_flags +51 -0
  112. data/share/gccxml-0.9/IBM/find_flags_common +48 -0
  113. data/share/gccxml-0.9/Intel/find_flags +56 -0
  114. data/share/gccxml-0.9/Intel/pthread.h +16 -0
  115. data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
  116. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
  117. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
  118. data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
  119. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
  120. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
  121. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
  122. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
  123. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
  124. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
  125. data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
  126. data/share/gccxml-0.9/MIPSpro/find_flags +70 -0
  127. data/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx +63 -0
  128. data/share/gccxml-0.9/Sun/5.8/Cstd.patch +156 -0
  129. data/share/gccxml-0.9/Sun/5.8/adapt_headers.sh +32 -0
  130. data/share/gccxml-0.9/Sun/5.8/std-5.10.patch +22 -0
  131. data/share/gccxml-0.9/Sun/README +8 -0
  132. data/share/gccxml-0.9/Sun/find_flags +51 -0
  133. data/share/gccxml-0.9/Sun/find_flags_common +42 -0
  134. data/share/gccxml-0.9/gccxml_config +2 -0
  135. data/share/gccxml-0.9/gccxml_identify_compiler.cc +13 -0
  136. data/share/man/man1/gccxml.1 +246 -0
  137. metadata +194 -0
@@ -0,0 +1,384 @@
1
+ // String based streams -*- C++ -*-
2
+
3
+ // Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
4
+ //
5
+ // This file is part of the GNU ISO C++ Library. This library is free
6
+ // software; you can redistribute it and/or modify it under the
7
+ // terms of the GNU General Public License as published by the
8
+ // Free Software Foundation; either version 2, or (at your option)
9
+ // any later version.
10
+
11
+ // This library is distributed in the hope that it will be useful,
12
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ // GNU General Public License for more details.
15
+
16
+ // You should have received a copy of the GNU General Public License along
17
+ // with this library; see the file COPYING. If not, write to the Free
18
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19
+ // USA.
20
+
21
+ // As a special exception, you may use this file as part of a free software
22
+ // library without restriction. Specifically, if other files instantiate
23
+ // templates or use macros or inline functions from this file, or you compile
24
+ // this file and link it with other files to produce an executable, this
25
+ // file does not by itself cause the resulting executable to be covered by
26
+ // the GNU General Public License. This exception does not however
27
+ // invalidate any other reasons why the executable file might be covered by
28
+ // the GNU General Public License.
29
+
30
+ //
31
+ // ISO C++ 14882: 27.7 String-based streams
32
+ //
33
+
34
+ /** @file sstream
35
+ * This is a Standard C++ Library header. You should @c #include this header
36
+ * in your programs, rather than any of the "st[dl]_*.h" implementation files.
37
+ */
38
+
39
+ #ifndef _CPP_SSTREAM
40
+ #define _CPP_SSTREAM 1
41
+
42
+ #pragma GCC system_header
43
+
44
+ #include <istream>
45
+ #include <ostream>
46
+
47
+ namespace std
48
+ {
49
+ template<typename _CharT, typename _Traits, typename _Alloc>
50
+ class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
51
+ {
52
+ public:
53
+ // Types:
54
+ typedef _CharT char_type;
55
+ typedef _Traits traits_type;
56
+ #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
57
+ // 251. basic_stringbuf missing allocator_type
58
+ typedef _Alloc allocator_type;
59
+ #endif
60
+ typedef typename traits_type::int_type int_type;
61
+ typedef typename traits_type::pos_type pos_type;
62
+ typedef typename traits_type::off_type off_type;
63
+
64
+ // Non-standard Types:
65
+ typedef basic_streambuf<char_type, traits_type> __streambuf_type;
66
+ typedef basic_string<char_type, _Traits, _Alloc> __string_type;
67
+ typedef typename __string_type::size_type __size_type;
68
+
69
+ protected:
70
+ // Data Members:
71
+ __string_type _M_string;
72
+
73
+ using __streambuf_type::_M_mode;
74
+ using __streambuf_type::_M_out_cur_move;
75
+ using __streambuf_type::_M_out_cur;
76
+ using __streambuf_type::_M_out_beg;
77
+ using __streambuf_type::_M_out_end;
78
+ using __streambuf_type::_M_buf_size;
79
+ using __streambuf_type::_M_buf_size_opt;
80
+ using __streambuf_type::_M_in_cur;
81
+ using __streambuf_type::_M_in_beg;
82
+ using __streambuf_type::_M_in_end;
83
+ using __streambuf_type::_M_buf;
84
+ using __streambuf_type::gptr;
85
+
86
+ public:
87
+ // Constructors:
88
+ explicit
89
+ basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
90
+ : __streambuf_type(), _M_string()
91
+ { _M_stringbuf_init(__mode); }
92
+
93
+ explicit
94
+ basic_stringbuf(const __string_type& __str,
95
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
96
+ : __streambuf_type(), _M_string(__str.data(), __str.size())
97
+ { _M_stringbuf_init(__mode); }
98
+
99
+ // Get and set:
100
+ __string_type
101
+ str() const
102
+ {
103
+ if (_M_mode & ios_base::out)
104
+ {
105
+ // This is the deal: _M_string.size() is a value that
106
+ // represents the size of the initial string that makes
107
+ // _M_string, and may not be the correct size of the
108
+ // current stringbuf internal buffer.
109
+ __size_type __len = _M_string.size();
110
+ if (_M_out_cur > _M_out_beg)
111
+ __len = max(__size_type(_M_out_end - _M_out_beg), __len);
112
+ return __string_type(_M_out_beg, _M_out_beg + __len);
113
+ }
114
+ else
115
+ return _M_string;
116
+ }
117
+
118
+ void
119
+ str(const __string_type& __s)
120
+ {
121
+ // Cannot use _M_string = __s, since v3 strings are COW.
122
+ _M_string.assign(__s.data(), __s.size());
123
+ _M_stringbuf_init(_M_mode);
124
+ }
125
+
126
+ protected:
127
+ // Common initialization code for both ctors goes here.
128
+ void
129
+ _M_stringbuf_init(ios_base::openmode __mode)
130
+ {
131
+ // _M_buf_size is a convenient alias for "what the streambuf
132
+ // thinks the allocated size of the string really is." This is
133
+ // necessary as ostringstreams are implemented with the
134
+ // streambufs having control of the allocation and
135
+ // re-allocation of the internal string object, _M_string.
136
+ _M_buf_size = _M_string.size();
137
+
138
+ // NB: Start ostringstream buffers at 512 bytes. This is an
139
+ // experimental value (pronounced "arbitrary" in some of the
140
+ // hipper english-speaking countries), and can be changed to
141
+ // suit particular needs.
142
+ _M_buf_size_opt = 512;
143
+ _M_mode = __mode;
144
+ if (_M_mode & (ios_base::ate | ios_base::app))
145
+ _M_really_sync(0, _M_buf_size);
146
+ else
147
+ _M_really_sync(0, 0);
148
+ }
149
+
150
+ // Overridden virtual functions:
151
+ virtual int_type
152
+ underflow()
153
+ {
154
+ if (_M_in_cur && _M_in_cur < _M_in_end)
155
+ return traits_type::to_int_type(*gptr());
156
+ else
157
+ return traits_type::eof();
158
+ }
159
+
160
+ virtual int_type
161
+ pbackfail(int_type __c = traits_type::eof());
162
+
163
+ virtual int_type
164
+ overflow(int_type __c = traits_type::eof());
165
+
166
+ virtual __streambuf_type*
167
+ setbuf(char_type* __s, streamsize __n)
168
+ {
169
+ if (__s && __n)
170
+ {
171
+ _M_string = __string_type(__s, __n);
172
+ _M_really_sync(0, 0);
173
+ }
174
+ return this;
175
+ }
176
+
177
+ virtual pos_type
178
+ seekoff(off_type __off, ios_base::seekdir __way,
179
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
180
+
181
+ virtual pos_type
182
+ seekpos(pos_type __sp,
183
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
184
+
185
+ // Internal function for correctly updating the internal buffer
186
+ // for a particular _M_string, due to initialization or
187
+ // re-sizing of an existing _M_string.
188
+ // Assumes: contents of _M_string and internal buffer match exactly.
189
+ // __i == _M_in_cur - _M_in_beg
190
+ // __o == _M_out_cur - _M_out_beg
191
+ virtual int
192
+ _M_really_sync(__size_type __i, __size_type __o)
193
+ {
194
+ char_type* __base = const_cast<char_type*>(_M_string.data());
195
+ bool __testin = _M_mode & ios_base::in;
196
+ bool __testout = _M_mode & ios_base::out;
197
+ __size_type __len = _M_string.size();
198
+
199
+ _M_buf = __base;
200
+ if (__testin)
201
+ this->setg(__base, __base + __i, __base + __len);
202
+ if (__testout)
203
+ {
204
+ this->setp(__base, __base + __len);
205
+ _M_out_cur += __o;
206
+ }
207
+ return 0;
208
+ }
209
+ };
210
+
211
+
212
+ // 27.7.2 Template class basic_istringstream
213
+ template<typename _CharT, typename _Traits, typename _Alloc>
214
+ class basic_istringstream : public basic_istream<_CharT, _Traits>
215
+ {
216
+ public:
217
+ // Types:
218
+ typedef _CharT char_type;
219
+ typedef _Traits traits_type;
220
+ #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
221
+ // 251. basic_stringbuf missing allocator_type
222
+ typedef _Alloc allocator_type;
223
+ #endif
224
+ typedef typename traits_type::int_type int_type;
225
+ typedef typename traits_type::pos_type pos_type;
226
+ typedef typename traits_type::off_type off_type;
227
+
228
+ // Non-standard types:
229
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
230
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
231
+ typedef basic_istream<char_type, traits_type> __istream_type;
232
+
233
+ private:
234
+ __stringbuf_type _M_stringbuf;
235
+
236
+ public:
237
+ // Constructors:
238
+ explicit
239
+ basic_istringstream(ios_base::openmode __mode = ios_base::in)
240
+ : __istream_type(NULL), _M_stringbuf(__mode | ios_base::in)
241
+ { this->init(&_M_stringbuf); }
242
+
243
+ explicit
244
+ basic_istringstream(const __string_type& __str,
245
+ ios_base::openmode __mode = ios_base::in)
246
+ : __istream_type(NULL), _M_stringbuf(__str, __mode | ios_base::in)
247
+ { this->init(&_M_stringbuf); }
248
+
249
+ ~basic_istringstream()
250
+ { }
251
+
252
+ // Members:
253
+ __stringbuf_type*
254
+ rdbuf() const
255
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
256
+
257
+ __string_type
258
+ str() const
259
+ { return _M_stringbuf.str(); }
260
+
261
+ void
262
+ str(const __string_type& __s)
263
+ { _M_stringbuf.str(__s); }
264
+ };
265
+
266
+
267
+ // 27.7.3 Template class basic_ostringstream
268
+ template <typename _CharT, typename _Traits, typename _Alloc>
269
+ class basic_ostringstream : public basic_ostream<_CharT, _Traits>
270
+ {
271
+ public:
272
+ // Types:
273
+ typedef _CharT char_type;
274
+ typedef _Traits traits_type;
275
+ #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
276
+ // 251. basic_stringbuf missing allocator_type
277
+ typedef _Alloc allocator_type;
278
+ #endif
279
+ typedef typename traits_type::int_type int_type;
280
+ typedef typename traits_type::pos_type pos_type;
281
+ typedef typename traits_type::off_type off_type;
282
+
283
+ // Non-standard types:
284
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
285
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
286
+ typedef basic_ostream<char_type, traits_type> __ostream_type;
287
+
288
+ private:
289
+ __stringbuf_type _M_stringbuf;
290
+
291
+ public:
292
+ // Constructors/destructor:
293
+ explicit
294
+ basic_ostringstream(ios_base::openmode __mode = ios_base::out)
295
+ : __ostream_type(NULL), _M_stringbuf(__mode | ios_base::out)
296
+ { this->init(&_M_stringbuf); }
297
+
298
+ explicit
299
+ basic_ostringstream(const __string_type& __str,
300
+ ios_base::openmode __mode = ios_base::out)
301
+ : __ostream_type(NULL), _M_stringbuf(__str, __mode | ios_base::out)
302
+ { this->init(&_M_stringbuf); }
303
+
304
+ ~basic_ostringstream()
305
+ { }
306
+
307
+ // Members:
308
+ __stringbuf_type*
309
+ rdbuf() const
310
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
311
+
312
+ __string_type
313
+ str() const
314
+ { return _M_stringbuf.str(); }
315
+
316
+ void
317
+ str(const __string_type& __s)
318
+ { _M_stringbuf.str(__s); }
319
+ };
320
+
321
+
322
+ // 27.7.4 Template class basic_stringstream
323
+ template <typename _CharT, typename _Traits, typename _Alloc>
324
+ class basic_stringstream : public basic_iostream<_CharT, _Traits>
325
+ {
326
+ public:
327
+ // Types:
328
+ typedef _CharT char_type;
329
+ typedef _Traits traits_type;
330
+ #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
331
+ // 251. basic_stringbuf missing allocator_type
332
+ typedef _Alloc allocator_type;
333
+ #endif
334
+ typedef typename traits_type::int_type int_type;
335
+ typedef typename traits_type::pos_type pos_type;
336
+ typedef typename traits_type::off_type off_type;
337
+
338
+ // Non-standard Types:
339
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
340
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
341
+ typedef basic_iostream<char_type, traits_type> __iostream_type;
342
+
343
+ private:
344
+ __stringbuf_type _M_stringbuf;
345
+
346
+ public:
347
+ // Constructors/destructors
348
+ explicit
349
+ basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
350
+ : __iostream_type(NULL), _M_stringbuf(__m)
351
+ { this->init(&_M_stringbuf); }
352
+
353
+ explicit
354
+ basic_stringstream(const __string_type& __str,
355
+ ios_base::openmode __m = ios_base::out | ios_base::in)
356
+ : __iostream_type(NULL), _M_stringbuf(__str, __m)
357
+ { this->init(&_M_stringbuf); }
358
+
359
+ ~basic_stringstream()
360
+ { }
361
+
362
+ // Members:
363
+ __stringbuf_type*
364
+ rdbuf() const
365
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
366
+
367
+ __string_type
368
+ str() const
369
+ { return _M_stringbuf.str(); }
370
+
371
+ void
372
+ str(const __string_type& __s)
373
+ { _M_stringbuf.str(__s); }
374
+ };
375
+ } // namespace std
376
+
377
+ #ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
378
+ # define export
379
+ #endif
380
+ #ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
381
+ # include <bits/sstream.tcc>
382
+ #endif
383
+
384
+ #endif