]> gcc.gnu.org Git - gcc.git/blob - libstdc++/std/bastring.h
* std/bastring.h (basic_string<>::clear): Add function.
[gcc.git] / libstdc++ / std / bastring.h
1 // Main templates for the -*- C++ -*- string classes.
2 // Copyright (C) 1994, 1995, 1999 Free Software Foundation
3
4 // This file is part of the GNU ANSI C++ Library. This library is free
5 // software; you can redistribute it and/or modify it under the
6 // terms of the GNU General Public License as published by the
7 // Free Software Foundation; either version 2, or (at your option)
8 // any later version.
9
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14
15 // You should have received a copy of the GNU General Public License
16 // along with this library; see the file COPYING. If not, write to the Free
17 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 // As a special exception, if you link this library with files
20 // compiled with a GNU compiler to produce an executable, this does not cause
21 // the resulting executable to be covered by the GNU General Public License.
22 // This exception does not however invalidate any other reasons why
23 // the executable file might be covered by the GNU General Public License.
24
25 // Written by Jason Merrill based upon the specification by Takanori Adachi
26 // in ANSI X3J16/94-0013R2.
27
28 #ifndef __BASTRING__
29 #define __BASTRING__
30
31 #ifdef __GNUG__
32 #pragma interface
33 #endif
34
35 #include <cstddef>
36 #include <std/straits.h>
37
38 // NOTE : This does NOT conform to the draft standard and is likely to change
39 #include <alloc.h>
40
41 extern "C++" {
42 class istream; class ostream;
43
44 #include <iterator>
45
46 #ifdef __STL_USE_EXCEPTIONS
47
48 extern void __out_of_range (const char *);
49 extern void __length_error (const char *);
50
51 #define OUTOFRANGE(cond) \
52 do { if (cond) __out_of_range (#cond); } while (0)
53 #define LENGTHERROR(cond) \
54 do { if (cond) __length_error (#cond); } while (0)
55
56 #else
57
58 #include <cassert>
59 #define OUTOFRANGE(cond) assert (!(cond))
60 #define LENGTHERROR(cond) assert (!(cond))
61
62 #endif
63
64 template <class charT, class traits = string_char_traits<charT>,
65 class Allocator = alloc >
66 class basic_string
67 {
68 private:
69 struct Rep {
70 size_t len, res, ref;
71 bool selfish;
72
73 charT* data () { return reinterpret_cast<charT *>(this + 1); }
74 charT& operator[] (size_t s) { return data () [s]; }
75 charT* grab () { if (selfish) return clone (); ++ref; return data (); }
76 #if defined __i486__ || defined __i586__ || defined __i686__
77 void release ()
78 {
79 size_t __val;
80 // This opcode exists as a .byte instead of as a mnemonic for the
81 // benefit of SCO OpenServer 5. The system assembler (which is
82 // essentially required on this target) can't assemble xaddl in
83 //COFF mode.
84 asm (".byte 0xf0, 0x0f, 0xc1, 0x02" // lock; xaddl %eax, (%edx)
85 : "=a" (__val)
86 : "0" (-1), "m" (ref), "d" (&ref)
87 : "memory");
88
89 if (__val == 1)
90 delete this;
91 }
92 #elif defined __sparc_v9__
93 void release ()
94 {
95 size_t __newval, __oldval = ref;
96 do
97 {
98 __newval = __oldval - 1;
99 __asm__ (
100 #ifdef __arch64__
101 "casx [%4], %2, %0"
102 #else
103 "cas [%4], %2, %0"
104 #endif
105 : "=r" (__oldval), "=m" (ref)
106 : "r" (__oldval), "m" (ref), "r"(&(ref)), "0" (__newval));
107 }
108 while (__newval != __oldval);
109
110 if (__oldval == 0)
111 delete this;
112 }
113 #else
114 void release () { if (--ref == 0) delete this; }
115 #endif
116
117 inline static void * operator new (size_t, size_t);
118 inline static void operator delete (void *);
119 inline static Rep* create (size_t);
120 charT* clone ();
121
122 inline void copy (size_t, const charT *, size_t);
123 inline void move (size_t, const charT *, size_t);
124 inline void set (size_t, const charT, size_t);
125
126 inline static bool excess_slop (size_t, size_t);
127 inline static size_t frob_size (size_t);
128
129 private:
130 Rep &operator= (const Rep &);
131 };
132
133 public:
134 // types:
135 typedef traits traits_type;
136 typedef typename traits::char_type value_type;
137 typedef Allocator allocator_type;
138
139 typedef size_t size_type;
140 typedef ptrdiff_t difference_type;
141 typedef charT& reference;
142 typedef const charT& const_reference;
143 typedef charT* pointer;
144 typedef const charT* const_pointer;
145 typedef pointer iterator;
146 typedef const_pointer const_iterator;
147 typedef ::reverse_iterator<iterator> reverse_iterator;
148 typedef ::reverse_iterator<const_iterator> const_reverse_iterator;
149 static const size_type npos = static_cast<size_type>(-1);
150
151 private:
152 Rep *rep () const { return reinterpret_cast<Rep *>(dat) - 1; }
153 void repup (Rep *p) { rep ()->release (); dat = p->data (); }
154
155 public:
156 const charT* data () const
157 { return rep ()->data(); }
158 size_type length () const
159 { return rep ()->len; }
160 size_type size () const
161 { return rep ()->len; }
162 size_type capacity () const
163 { return rep ()->res; }
164 size_type max_size () const
165 { return (npos - 1)/sizeof (charT); } // XXX
166 bool empty () const
167 { return size () == 0; }
168
169 // _lib.string.cons_ construct/copy/destroy:
170 basic_string& operator= (const basic_string& str)
171 {
172 if (&str != this) { rep ()->release (); dat = str.rep ()->grab (); }
173 return *this;
174 }
175
176 explicit basic_string (): dat (nilRep.grab ()) { }
177 basic_string (const basic_string& str): dat (str.rep ()->grab ()) { }
178 basic_string (const basic_string& str, size_type pos, size_type n = npos)
179 : dat (nilRep.grab ()) { assign (str, pos, n); }
180 basic_string (const charT* s, size_type n)
181 : dat (nilRep.grab ()) { assign (s, n); }
182 basic_string (const charT* s)
183 : dat (nilRep.grab ()) { assign (s); }
184 basic_string (size_type n, charT c)
185 : dat (nilRep.grab ()) { assign (n, c); }
186 #ifdef __STL_MEMBER_TEMPLATES
187 template<class InputIterator>
188 basic_string(InputIterator __begin, InputIterator __end)
189 #else
190 basic_string(const_iterator __begin, const_iterator __end)
191 #endif
192 : dat (nilRep.grab ()) { assign (__begin, __end); }
193
194 ~basic_string ()
195 { rep ()->release (); }
196
197 void swap (basic_string &s) { charT *d = dat; dat = s.dat; s.dat = d; }
198
199 basic_string& append (const basic_string& str, size_type pos = 0,
200 size_type n = npos)
201 { return replace (length (), 0, str, pos, n); }
202 basic_string& append (const charT* s, size_type n)
203 { return replace (length (), 0, s, n); }
204 basic_string& append (const charT* s)
205 { return append (s, traits::length (s)); }
206 basic_string& append (size_type n, charT c)
207 { return replace (length (), 0, n, c); }
208 #ifdef __STL_MEMBER_TEMPLATES
209 template<class InputIterator>
210 basic_string& append(InputIterator first, InputIterator last)
211 #else
212 basic_string& append(const_iterator first, const_iterator last)
213 #endif
214 { return replace (iend (), iend (), first, last); }
215
216 void push_back(charT __c)
217 { append(1, __c); }
218
219 basic_string& assign (const basic_string& str, size_type pos = 0,
220 size_type n = npos)
221 { return replace (0, npos, str, pos, n); }
222 basic_string& assign (const charT* s, size_type n)
223 { return replace (0, npos, s, n); }
224 basic_string& assign (const charT* s)
225 { return assign (s, traits::length (s)); }
226 basic_string& assign (size_type n, charT c)
227 { return replace (0, npos, n, c); }
228 #ifdef __STL_MEMBER_TEMPLATES
229 template<class InputIterator>
230 basic_string& assign(InputIterator first, InputIterator last)
231 #else
232 basic_string& assign(const_iterator first, const_iterator last)
233 #endif
234 { return replace (ibegin (), iend (), first, last); }
235
236 basic_string& operator= (const charT* s)
237 { return assign (s); }
238 basic_string& operator= (charT c)
239 { return assign (1, c); }
240
241 basic_string& operator+= (const basic_string& rhs)
242 { return append (rhs); }
243 basic_string& operator+= (const charT* s)
244 { return append (s); }
245 basic_string& operator+= (charT c)
246 { return append (1, c); }
247
248 basic_string& insert (size_type pos1, const basic_string& str,
249 size_type pos2 = 0, size_type n = npos)
250 { return replace (pos1, 0, str, pos2, n); }
251 basic_string& insert (size_type pos, const charT* s, size_type n)
252 { return replace (pos, 0, s, n); }
253 basic_string& insert (size_type pos, const charT* s)
254 { return insert (pos, s, traits::length (s)); }
255 basic_string& insert (size_type pos, size_type n, charT c)
256 { return replace (pos, 0, n, c); }
257 iterator insert(iterator p, charT c)
258 { size_type __o = p - ibegin ();
259 insert (p - ibegin (), 1, c); selfish ();
260 return ibegin () + __o; }
261 iterator insert(iterator p, size_type n, charT c)
262 { size_type __o = p - ibegin ();
263 insert (p - ibegin (), n, c); selfish ();
264 return ibegin () + __o; }
265 #ifdef __STL_MEMBER_TEMPLATES
266 template<class InputIterator>
267 void insert(iterator p, InputIterator first, InputIterator last)
268 #else
269 void insert(iterator p, const_iterator first, const_iterator last)
270 #endif
271 { replace (p, p, first, last); }
272
273 basic_string& erase (size_type pos = 0, size_type n = npos)
274 { return replace (pos, n, (size_type)0, (charT)0); }
275 iterator erase(iterator p)
276 { size_type __o = p - begin();
277 replace (__o, 1, (size_type)0, (charT)0); selfish ();
278 return ibegin() + __o; }
279 iterator erase(iterator f, iterator l)
280 { size_type __o = f - ibegin();
281 replace (__o, l-f, (size_type)0, (charT)0);selfish ();
282 return ibegin() + __o; }
283
284 basic_string& replace (size_type pos1, size_type n1, const basic_string& str,
285 size_type pos2 = 0, size_type n2 = npos);
286 basic_string& replace (size_type pos, size_type n1, const charT* s,
287 size_type n2);
288 basic_string& replace (size_type pos, size_type n1, const charT* s)
289 { return replace (pos, n1, s, traits::length (s)); }
290 basic_string& replace (size_type pos, size_type n1, size_type n2, charT c);
291 basic_string& replace (size_type pos, size_type n, charT c)
292 { return replace (pos, n, 1, c); }
293 basic_string& replace (iterator i1, iterator i2, const basic_string& str)
294 { return replace (i1 - ibegin (), i2 - i1, str); }
295 basic_string& replace (iterator i1, iterator i2, const charT* s, size_type n)
296 { return replace (i1 - ibegin (), i2 - i1, s, n); }
297 basic_string& replace (iterator i1, iterator i2, const charT* s)
298 { return replace (i1 - ibegin (), i2 - i1, s); }
299 basic_string& replace (iterator i1, iterator i2, size_type n, charT c)
300 { return replace (i1 - ibegin (), i2 - i1, n, c); }
301 #ifdef __STL_MEMBER_TEMPLATES
302 template<class InputIterator>
303 basic_string& replace(iterator i1, iterator i2,
304 InputIterator j1, InputIterator j2);
305 #else
306 basic_string& replace(iterator i1, iterator i2,
307 const_iterator j1, const_iterator j2);
308 #endif
309
310 private:
311 static charT eos () { return traits::eos (); }
312 void unique () { if (rep ()->ref > 1) alloc (length (), true); }
313 void selfish () { unique (); rep ()->selfish = true; }
314
315 public:
316 charT operator[] (size_type pos) const
317 {
318 if (pos == length ())
319 return eos ();
320 return data ()[pos];
321 }
322
323 reference operator[] (size_type pos)
324 { selfish (); return (*rep ())[pos]; }
325
326 reference at (size_type pos)
327 {
328 OUTOFRANGE (pos >= length ());
329 return (*this)[pos];
330 }
331 const_reference at (size_type pos) const
332 {
333 OUTOFRANGE (pos >= length ());
334 return data ()[pos];
335 }
336
337 private:
338 void terminate () const
339 { traits::assign ((*rep ())[length ()], eos ()); }
340
341 public:
342 const charT* c_str () const
343 { if (length () == 0) return ""; terminate (); return data (); }
344 void resize (size_type n, charT c);
345 void resize (size_type n)
346 { resize (n, eos ()); }
347 void reserve (size_type) { }
348
349 void clear() { erase(begin(), end()); }
350
351 size_type copy (charT* s, size_type n, size_type pos = 0) const;
352
353 size_type find (const basic_string& str, size_type pos = 0) const
354 { return find (str.data(), pos, str.length()); }
355 size_type find (const charT* s, size_type pos, size_type n) const;
356 size_type find (const charT* s, size_type pos = 0) const
357 { return find (s, pos, traits::length (s)); }
358 size_type find (charT c, size_type pos = 0) const;
359
360 size_type rfind (const basic_string& str, size_type pos = npos) const
361 { return rfind (str.data(), pos, str.length()); }
362 size_type rfind (const charT* s, size_type pos, size_type n) const;
363 size_type rfind (const charT* s, size_type pos = npos) const
364 { return rfind (s, pos, traits::length (s)); }
365 size_type rfind (charT c, size_type pos = npos) const;
366
367 size_type find_first_of (const basic_string& str, size_type pos = 0) const
368 { return find_first_of (str.data(), pos, str.length()); }
369 size_type find_first_of (const charT* s, size_type pos, size_type n) const;
370 size_type find_first_of (const charT* s, size_type pos = 0) const
371 { return find_first_of (s, pos, traits::length (s)); }
372 size_type find_first_of (charT c, size_type pos = 0) const
373 { return find (c, pos); }
374
375 size_type find_last_of (const basic_string& str, size_type pos = npos) const
376 { return find_last_of (str.data(), pos, str.length()); }
377 size_type find_last_of (const charT* s, size_type pos, size_type n) const;
378 size_type find_last_of (const charT* s, size_type pos = npos) const
379 { return find_last_of (s, pos, traits::length (s)); }
380 size_type find_last_of (charT c, size_type pos = npos) const
381 { return rfind (c, pos); }
382
383 size_type find_first_not_of (const basic_string& str, size_type pos = 0) const
384 { return find_first_not_of (str.data(), pos, str.length()); }
385 size_type find_first_not_of (const charT* s, size_type pos, size_type n) const;
386 size_type find_first_not_of (const charT* s, size_type pos = 0) const
387 { return find_first_not_of (s, pos, traits::length (s)); }
388 size_type find_first_not_of (charT c, size_type pos = 0) const;
389
390 size_type find_last_not_of (const basic_string& str, size_type pos = npos) const
391 { return find_last_not_of (str.data(), pos, str.length()); }
392 size_type find_last_not_of (const charT* s, size_type pos, size_type n) const;
393 size_type find_last_not_of (const charT* s, size_type pos = npos) const
394 { return find_last_not_of (s, pos, traits::length (s)); }
395 size_type find_last_not_of (charT c, size_type pos = npos) const;
396
397 basic_string substr (size_type pos = 0, size_type n = npos) const
398 { return basic_string (*this, pos, n); }
399
400 int compare (const basic_string& str, size_type pos = 0, size_type n = npos) const;
401 // There is no 'strncmp' equivalent for charT pointers.
402 int compare (const charT* s, size_type pos, size_type n) const;
403 int compare (const charT* s, size_type pos = 0) const
404 { return compare (s, pos, traits::length (s)); }
405
406 iterator begin () { selfish (); return &(*this)[0]; }
407 iterator end () { selfish (); return &(*this)[length ()]; }
408
409 private:
410 iterator ibegin () const { return &(*rep ())[0]; }
411 iterator iend () const { return &(*rep ())[length ()]; }
412
413 public:
414 const_iterator begin () const { return ibegin (); }
415 const_iterator end () const { return iend (); }
416
417 reverse_iterator rbegin() { return reverse_iterator (end ()); }
418 const_reverse_iterator rbegin() const
419 { return const_reverse_iterator (end ()); }
420 reverse_iterator rend() { return reverse_iterator (begin ()); }
421 const_reverse_iterator rend() const
422 { return const_reverse_iterator (begin ()); }
423
424 private:
425 void alloc (size_type size, bool save);
426 static size_type _find (const charT* ptr, charT c, size_type xpos, size_type len);
427 inline bool check_realloc (size_type s) const;
428
429 static Rep nilRep;
430 charT *dat;
431 };
432
433 #ifdef __STL_MEMBER_TEMPLATES
434 template <class charT, class traits, class Allocator> template <class InputIterator>
435 basic_string <charT, traits, Allocator>& basic_string <charT, traits, Allocator>::
436 replace (iterator i1, iterator i2, InputIterator j1, InputIterator j2)
437 #else
438 template <class charT, class traits, class Allocator>
439 basic_string <charT, traits, Allocator>& basic_string <charT, traits, Allocator>::
440 replace (iterator i1, iterator i2, const_iterator j1, const_iterator j2)
441 #endif
442 {
443 const size_type len = length ();
444 size_type pos = i1 - ibegin ();
445 size_type n1 = i2 - i1;
446 size_type n2 = j2 - j1;
447
448 OUTOFRANGE (pos > len);
449 if (n1 > len - pos)
450 n1 = len - pos;
451 LENGTHERROR (len - n1 > max_size () - n2);
452 size_t newlen = len - n1 + n2;
453
454 if (check_realloc (newlen))
455 {
456 Rep *p = Rep::create (newlen);
457 p->copy (0, data (), pos);
458 p->copy (pos + n2, data () + pos + n1, len - (pos + n1));
459 for (; j1 != j2; ++j1, ++pos)
460 traits::assign ((*p)[pos], *j1);
461 repup (p);
462 }
463 else
464 {
465 rep ()->move (pos + n2, data () + pos + n1, len - (pos + n1));
466 for (; j1 != j2; ++j1, ++pos)
467 traits::assign ((*rep ())[pos], *j1);
468 }
469 rep ()->len = newlen;
470
471 return *this;
472 }
473
474 template <class charT, class traits, class Allocator>
475 inline basic_string <charT, traits, Allocator>
476 operator+ (const basic_string <charT, traits, Allocator>& lhs,
477 const basic_string <charT, traits, Allocator>& rhs)
478 {
479 basic_string <charT, traits, Allocator> str (lhs);
480 str.append (rhs);
481 return str;
482 }
483
484 template <class charT, class traits, class Allocator>
485 inline basic_string <charT, traits, Allocator>
486 operator+ (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
487 {
488 basic_string <charT, traits, Allocator> str (lhs);
489 str.append (rhs);
490 return str;
491 }
492
493 template <class charT, class traits, class Allocator>
494 inline basic_string <charT, traits, Allocator>
495 operator+ (charT lhs, const basic_string <charT, traits, Allocator>& rhs)
496 {
497 basic_string <charT, traits, Allocator> str (1, lhs);
498 str.append (rhs);
499 return str;
500 }
501
502 template <class charT, class traits, class Allocator>
503 inline basic_string <charT, traits, Allocator>
504 operator+ (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
505 {
506 basic_string <charT, traits, Allocator> str (lhs);
507 str.append (rhs);
508 return str;
509 }
510
511 template <class charT, class traits, class Allocator>
512 inline basic_string <charT, traits, Allocator>
513 operator+ (const basic_string <charT, traits, Allocator>& lhs, charT rhs)
514 {
515 basic_string <charT, traits, Allocator> str (lhs);
516 str.append (1, rhs);
517 return str;
518 }
519
520 template <class charT, class traits, class Allocator>
521 inline bool
522 operator== (const basic_string <charT, traits, Allocator>& lhs,
523 const basic_string <charT, traits, Allocator>& rhs)
524 {
525 return (lhs.compare (rhs) == 0);
526 }
527
528 template <class charT, class traits, class Allocator>
529 inline bool
530 operator== (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
531 {
532 return (rhs.compare (lhs) == 0);
533 }
534
535 template <class charT, class traits, class Allocator>
536 inline bool
537 operator== (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
538 {
539 return (lhs.compare (rhs) == 0);
540 }
541
542 template <class charT, class traits, class Allocator>
543 inline bool
544 operator!= (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
545 {
546 return (rhs.compare (lhs) != 0);
547 }
548
549 template <class charT, class traits, class Allocator>
550 inline bool
551 operator!= (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
552 {
553 return (lhs.compare (rhs) != 0);
554 }
555
556 template <class charT, class traits, class Allocator>
557 inline bool
558 operator< (const basic_string <charT, traits, Allocator>& lhs,
559 const basic_string <charT, traits, Allocator>& rhs)
560 {
561 return (lhs.compare (rhs) < 0);
562 }
563
564 template <class charT, class traits, class Allocator>
565 inline bool
566 operator< (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
567 {
568 return (rhs.compare (lhs) > 0);
569 }
570
571 template <class charT, class traits, class Allocator>
572 inline bool
573 operator< (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
574 {
575 return (lhs.compare (rhs) < 0);
576 }
577
578 template <class charT, class traits, class Allocator>
579 inline bool
580 operator> (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
581 {
582 return (rhs.compare (lhs) < 0);
583 }
584
585 template <class charT, class traits, class Allocator>
586 inline bool
587 operator> (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
588 {
589 return (lhs.compare (rhs) > 0);
590 }
591
592 template <class charT, class traits, class Allocator>
593 inline bool
594 operator<= (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
595 {
596 return (rhs.compare (lhs) >= 0);
597 }
598
599 template <class charT, class traits, class Allocator>
600 inline bool
601 operator<= (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
602 {
603 return (lhs.compare (rhs) <= 0);
604 }
605
606 template <class charT, class traits, class Allocator>
607 inline bool
608 operator>= (const charT* lhs, const basic_string <charT, traits, Allocator>& rhs)
609 {
610 return (rhs.compare (lhs) <= 0);
611 }
612
613 template <class charT, class traits, class Allocator>
614 inline bool
615 operator>= (const basic_string <charT, traits, Allocator>& lhs, const charT* rhs)
616 {
617 return (lhs.compare (rhs) >= 0);
618 }
619
620 template <class charT, class traits, class Allocator>
621 inline bool
622 operator!= (const basic_string <charT, traits, Allocator>& lhs,
623 const basic_string <charT, traits, Allocator>& rhs)
624 {
625 return (lhs.compare (rhs) != 0);
626 }
627
628 template <class charT, class traits, class Allocator>
629 inline bool
630 operator> (const basic_string <charT, traits, Allocator>& lhs,
631 const basic_string <charT, traits, Allocator>& rhs)
632 {
633 return (lhs.compare (rhs) > 0);
634 }
635
636 template <class charT, class traits, class Allocator>
637 inline bool
638 operator<= (const basic_string <charT, traits, Allocator>& lhs,
639 const basic_string <charT, traits, Allocator>& rhs)
640 {
641 return (lhs.compare (rhs) <= 0);
642 }
643
644 template <class charT, class traits, class Allocator>
645 inline bool
646 operator>= (const basic_string <charT, traits, Allocator>& lhs,
647 const basic_string <charT, traits, Allocator>& rhs)
648 {
649 return (lhs.compare (rhs) >= 0);
650 }
651
652 class istream; class ostream;
653 template <class charT, class traits, class Allocator> istream&
654 operator>> (istream&, basic_string <charT, traits, Allocator>&);
655 template <class charT, class traits, class Allocator> ostream&
656 operator<< (ostream&, const basic_string <charT, traits, Allocator>&);
657 template <class charT, class traits, class Allocator> istream&
658 getline (istream&, basic_string <charT, traits, Allocator>&, charT delim = '\n');
659
660 } // extern "C++"
661
662 #include <std/bastring.cc>
663
664 #endif
This page took 0.07733 seconds and 5 git commands to generate.