1 <sect2 id="manual.intro.status.standard.1998" xreflabel="Status C++ 1998">
2 <?dbhtml filename="standard_cxx1998.html"?>
15 <title>C++ 1998</title>
17 <sect3 id="standard.1998" xreflabel="Status C++ 1998">
18 <title>Checklist</title>
21 Completion Checklist for the Standard C++ Library
27 X - Partially implemented, or buggy.
28 T - Implemented, pending test/inspection.
29 V - Verified to pass all available test suites.
30 Q - Qualified by inspection for non-testable correctness.
31 P - Portability verified.
35 Only status codes appear in column 0. Notes relating to conformance
36 issues appear [in brackets].
38 Note that this checklist does not (yet) include all emendations
39 recommended by the ISO Library Working Group:
40 http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
42 Detailed explanation of status codes:
44 M - Missing: The name is not visible to programs that include
45 the specified header, either at compile or link stage.
47 S - Present as stub: A program can use the name, but no implementation
48 is provided. Programs that use the name link correctly, but
49 cannot usefully be run.
51 X - Partially implemented, or buggy: Some implementation has been
52 provided, but it is known or believed not to conform fully.
53 It may have an incorrect base class, wrong namespace, wrong
54 storage class, or simply not fully implement requirements.
55 However, it may be sufficiently usable to help test other
58 T - Implemented, pending test/inspection: Implementation believed
59 to be complete, and informal testing suggests it is ready for
62 V - Verified, passes all test suites: Verified to satisfy all
63 generically testable conformance requirements.
65 Q - Qualified by inspection for non-testable correctness:
66 Inspected, "implementation-defined" documentation accepted,
67 local usability criteria satisfied, formally inspected for
68 other untestable conformance. (Untestable requirements
69 include exception-safety, thread-safety, worst-case
70 complexity, memory cleanliness, usefulness.)
72 P - Portability verified: Qualified on all primary target platforms.
74 C - Certified: Formally certified to have passed all tests,
75 inspections, qualifications; approved under "signing authority"
76 to be used to satisfy contractual guarantees.
78 ----------------------------------------------------------------------
79 <algorithm> <iomanip> <list> <ostream> <streambuf>
80 <bitset> <ios> <locale> <queue> <string>
81 <complex> <iosfwd> <map> <set> <typeinfo>
82 X <deque> <iostream> <memory> <sstream> <utility>
83 <exception> <istream> <new> <stack> <valarray>
84 <fstream> <iterator> <numeric> <stdexcept> <vector>
85 <functional> <limits>
87 [C header names must be in std:: to qualify. Related to shadow/ dir.]
88 <cassert> <ciso646> <csetjmp> <cstdio> <ctime>
89 <cctype> <climits> <csignal> <cstdlib> <cwchar>
90 X <cerrno> <clocale> <cstdarg> <cstring> <cwctype>
91 <cfloat> <cmath> <cstddef>
94 X errno, declared or defined in <cerrno>.
97 X setjmp(jmp_buf), declared or defined in <csetjmp>
98 X va_end(va_list), declared or defined in <cstdarg>
101 X clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,
102 X ptrdiff_t, sig_atomic_t, size_t, time_t, tm, va_list,
103 X wctrans_t, wctype_t, and wint_t.
105 1 Which of the functions in the C++ Standard Library are not reentrant
106 subroutines is implementation-defined.
108 18.1 Types [lib.support.types]
115 18.2 Implementation properties [lib.support.limits]
117 <limits>, <climits>, and <cfloat>
119 18.2.1 Numeric limits [lib.limits]
121 X template<class T> class numeric_limits;
123 T enum float_round_style;
124 T enum float_denorm_style;
126 T template<> class numeric_limits<bool>;
128 T template<> class numeric_limits<char>;
129 T template<> class numeric_limits<signed char>;
130 T template<> class numeric_limits<unsigned char>;
131 T template<> class numeric_limits<wchar_t>;
133 T template<> class numeric_limits<short>;
134 T template<> class numeric_limits<int>;
135 T template<> class numeric_limits<long>;
136 T template<> class numeric_limits<unsigned short>;
137 T template<> class numeric_limits<unsigned int>;
138 T template<> class numeric_limits<unsigned long>;
140 X template<> class numeric_limits<float>;
141 X template<> class numeric_limits<double>;
142 X template<> class numeric_limits<long double>;
144 18.2.1.1 Template class numeric_limits [lib.numeric.limits]
145 T template<class T> class numeric_limits {
147 T static const bool is_specialized = false;
148 T static T min() throw();
149 T static T max() throw();
150 T static const int digits = 0;
151 T static const int digits10 = 0;
152 T static const bool is_signed = false;
153 T static const bool is_integer = false;
154 T static const bool is_exact = false;
155 T static const int radix = 0;
156 T static T epsilon() throw();
157 T static T round_error() throw();
159 T static const int min_exponent = 0;
160 T static const int min_exponent10 = 0;
161 T static const int max_exponent = 0;
162 T static const int max_exponent10 = 0;
164 T static const bool has_infinity = false;
165 T static const bool has_quiet_NaN = false;
166 T static const bool has_signaling_NaN = false;
167 T static const float_denorm_style has_denorm = denorm_absent;
168 T static const bool has_denorm_loss = false;
169 T static T infinity() throw();
170 T static T quiet_NaN() throw();
171 T static T signaling_NaN() throw();
172 T static T denorm_min() throw();
174 T static const bool is_iec559 = false;
175 T static const bool is_bounded = false;
176 T static const bool is_modulo = false;
178 T static const bool traps = false;
179 T static const bool tinyness_before = false;
180 T static const float_round_style round_style = round_toward_zero;
183 18.2.1.3 Type float_round_style [lib.round.style]
185 T enum float_round_style {
186 T round_indeterminate = -1,
187 T round_toward_zero = 0,
188 T round_to_nearest = 1,
189 T round_toward_infinity = 2,
190 T round_toward_neg_infinity = 3
193 18.2.1.4 Type float_denorm_style [lib.denorm.style]
195 T enum float_denorm_style {
196 T denorm_indeterminate = -1;
198 T denorm present = 1;
201 18.2.1.5 numeric_limits specializations [lib.numeric.special]
203 [Note: see Note at 18.2.1. ]
205 18.2.2 C Library [lib.c.limits]
207 1 Header <climits> (Table 3):
208 CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX
209 X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
210 CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
212 3 Header <cfloat> (Table 4):
214 DBL_DIG DBL_MIN_EXP FLT_MIN_10_EXP LDBL_MAX_10_EXP
215 DBL_EPSILON FLT_DIG FLT_MIN_EXP LDBL_MAX_EXP
216 DBL_MANT_DIG FLT_EPSILON FLT_RADIX LDBL_MIN
217 X DBL_MAX FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP
218 DBL_MAX_10_EXP FLT_MAX LDBL_DIG LDBL_MIN_EXP
219 DBL_MAX_EXP FLT_MAX_10_EXP LDBL_EPSILON
220 DBL_MIN FLT_MAX_EXP LDBL_MANT_DIG
221 DBL_MIN_10_EXP FLT_MIN LDBL_MAX
224 1 Header <cstdlib> (partial), Table 5:
225 X EXIT_FAILURE EXIT_SUCCESS
229 S extern "C" int atexit(void (*f)(void))
230 S extern "C++" int atexit(void (*f)(void))
233 18.4 Dynamic memory management [lib.support.dynamic]
235 Header <new> synopsis
238 T struct nothrow_t {};
239 T extern const nothrow_t nothrow;
240 T typedef void (*new_handler)();
241 T new_handler set_new_handler(new_handler new_p) throw();
243 T void* operator new(std::size_t size) throw(std::bad_alloc);
244 T void* operator new(std::size_t size, const std::nothrow_t&) throw();
245 T void operator delete(void* ptr) throw();
246 T void operator delete(void* ptr, const std::nothrow_t&) throw();
247 T void* operator new[](std::size_t size) throw(std::bad_alloc);
248 T void* operator new[](std::size_t size, const std::nothrow_t&) throw();
249 T void operator delete[](void* ptr) throw();
250 T void operator delete[](void* ptr, const std::nothrow_t&) throw();
251 T void* operator new (std::size_t size, void* ptr) throw();
252 T void* operator new[](std::size_t size, void* ptr) throw();
253 T void operator delete (void* ptr, void*) throw();
254 T void operator delete[](void* ptr, void*) throw();
256 18.4.2.1 Class bad_alloc [lib.bad.alloc]
258 T class bad_alloc : public exception {
260 T bad_alloc() throw();
261 T bad_alloc(const bad_alloc&) throw();
262 T bad_alloc& operator=(const bad_alloc&) throw();
263 T virtual ~bad_alloc() throw();
264 T virtual const char* what() const throw();
268 T new_handler set_new_handler(new_handler new_p) throw();
271 Header <typeinfo> synopsis
277 18.5.1 - Class type_info [lib.type.info]
281 T virtual ~type_info();
282 T bool operator==(const type_info& rhs) const;
283 T bool operator!=(const type_info& rhs) const;
284 T bool before(const type_info& rhs) const;
285 T const char* name() const;
287 T type_info(const type_info& rhs);
288 T type_info& operator=(const type_info& rhs);
291 18.5.2 - Class bad_cast [lib.bad.cast]
293 T bad_cast() throw();
294 T virtual const char* bad_cast::what() const throw();
296 18.5.3 Class bad_typeid [lib.bad.typeid]
298 T class bad_typeid : public exception {
300 T bad_typeid() throw();
301 T bad_typeid(const bad_typeid&) throw();
302 T bad_typeid& operator=(const bad_typeid&) throw();
303 T virtual ~bad_typeid() throw();
304 T virtual const char* what() const throw();
307 18.6 Exception handling [lib.support.exception]
309 T Header <exception> synopsis
312 T class bad_exception;
314 T typedef void (*unexpected_handler)();
315 T unexpected_handler set_unexpected(unexpected_handler f) throw();
317 T typedef void (*terminate_handler)();
318 T terminate_handler set_terminate(terminate_handler f) throw();
320 T bool uncaught_exception();
322 18.6.1 Class exception [lib.exception]
326 T exception() throw();
327 T exception(const exception&) throw();
328 T exception& operator=(const exception&) throw();
329 T virtual ~exception() throw();
330 T virtual const char* what() const throw();
333 18.6.2.1 Class bad_exception [lib.bad.exception]
334 T class bad_exception : public exception {
336 T bad_exception() throw();
337 T bad_exception(const bad_exception&) throw();
338 T bad_exception& operator=(const bad_exception&) throw();
339 T virtual ~bad_exception() throw();
340 T virtual const char* what() const throw();
343 18.7 Other runtime support [lib.support.runtime]
345 1 Headers <cstdarg> (variable arguments), <csetjmp> (nonlocal jumps),
346 <ctime> (system clock clock(), time()), <csignal> (signal handling),
347 and <cstdlib> (runtime environment getenv(), system()).
349 Table 6--Header <cstdarg> synopsis
350 Macros: va_arg va_end va_start
353 Table 7--Header <csetjmp> synopsis
359 Table 8--Header <ctime> synopsis
361 Macros: CLOCKS_PER_SEC
365 Table 9--Header <csignal> synopsis
367 X Macros: SIGABRT SIGILL SIGSEGV SIG_DFL
368 SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR
370 Functions: raise signal
372 Table 10--Header <cstdlib> synopsis
374 X Functions: getenv system
376 19.1 Exception classes [lib.std.exceptions]
378 Header <stdexcept> synopsis
381 T class domain_error;
382 T class invalid_argument;
383 T class length_error;
384 T class out_of_range;
385 T class runtime_error;
387 T class overflow_error;
388 T class underflow_error;
390 19.1.1 Class logic_error [lib.logic.error]
391 T class logic_error : public exception {
393 T explicit logic_error(const string& what_arg);
396 19.1.2 Class domain_error [lib.domain.error]
398 T class domain_error : public logic_error {
400 T explicit domain_error(const string& what_arg);
403 19.1.3 Class invalid_argument [lib.invalid.argument]
405 T class invalid_argument : public logic_error {
407 T explicit invalid_argument(const string& what_arg);
410 19.1.4 Class length_error [lib.length.error]
412 T class length_error : public logic_error {
414 T explicit length_error(const string& what_arg);
417 19.1.5 Class out_of_range [lib.out.of.range]
419 T class out_of_range : public logic_error {
421 T explicit out_of_range(const string& what_arg);
425 19.1.6 Class runtime_error [lib.runtime.error]
427 T class runtime_error : public exception {
429 T explicit runtime_error(const string& what_arg);
433 19.1.7 Class range_error [lib.range.error]
435 T class range_error : public runtime_error {
437 T explicit range_error(const string& what_arg);
440 19.1.8 Class overflow_error [lib.overflow.error]
442 T class overflow_error : public runtime_error {
444 T explicit overflow_error(const string& what_arg);
448 19.1.9 Class underflow_error [lib.underflow.error]
450 T class underflow_error : public runtime_error {
452 T explicit underflow_error(const string& what_arg);
456 19.2 Assertions [lib.assertions]
458 Table 2--Header <cassert> synopsis
462 19.3 Error numbers [lib.errno]
464 Table 3--Header <cerrno> synopsis
466 X |Macros: EDOM ERANGE errno |
469 20.2 Utility components [lib.utility]
471 Header <utility> synopsis
473 // _lib.operators_, operators:
474 T namespace rel_ops {
475 T template<class T> bool operator!=(const T&, const T&);
476 T template<class T> bool operator> (const T&, const T&);
477 T template<class T> bool operator<=(const T&, const T&);
478 T template<class T> bool operator>=(const T&, const T&);
480 // _lib.pairs_, pairs:
481 T template <class T1, class T2> struct pair;
482 T template <class T1, class T2>
483 bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);
484 T template <class T1, class T2>
485 bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
486 T template <class T1, class T2>
487 bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);
488 T template <class T1, class T2>
489 bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
490 T template <class T1, class T2>
491 bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
492 T template <class T1, class T2>
493 bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
494 T template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
497 20.2.2 Pairs [lib.pairs]
499 T template <class T1, class T2>
501 T typedef T1 first_type;
502 T typedef T2 second_type;
507 T pair(const T1& x, const T2& y);
508 T template<class U, class V> pair(const pair<U, V> &p);
511 20.3 Function objects [lib.function.objects]
513 Header <functional> synopsis
516 V template <class Arg, class Result> struct unary_function;
517 V template <class Arg1, class Arg2, class Result> struct binary_function;
519 // _lib.arithmetic.operations_, arithmetic operations:
520 V template <class T> struct plus;
521 V template <class T> struct minus;
522 V template <class T> struct multiplies;
523 V template <class T> struct divides;
524 V template <class T> struct modulus;
525 V template <class T> struct negate;
526 // _lib.comparisons_, comparisons:
527 V template <class T> struct equal_to;
528 V template <class T> struct not_equal_to;
529 V template <class T> struct greater;
530 V template <class T> struct less;
531 V template <class T> struct greater_equal;
532 V template <class T> struct less_equal;
533 // _lib.logical.operations_, logical operations:
534 V template <class T> struct logical_and;
535 V template <class T> struct logical_or;
536 V template <class T> struct logical_not;
537 // _lib.negators_, negators:
538 template <class Predicate> struct unary_negate;
539 V template <class Predicate>
540 unary_negate<Predicate> not1(const Predicate&);
541 V template <class Predicate> struct binary_negate;
542 V template <class Predicate>
543 binary_negate<Predicate> not2(const Predicate&);
544 // _lib.binders_, binders:
545 V template <class Operation> class binder1st;
546 V template <class Operation, class T>
547 binder1st<Operation> bind1st(const Operation&, const T&);
548 V template <class Operation> class binder2nd;
549 V template <class Operation, class T>
550 binder2nd<Operation> bind2nd(const Operation&, const T&);
551 // _lib.function.pointer.adaptors_, adaptors:
552 V template <class Arg, class Result> class pointer_to_unary_function;
553 V template <class Arg, class Result>
554 pointer_to_unary_function<Arg,Result> ptr_fun(Result (*)(Arg));
555 V template <class Arg1, class Arg2, class Result>
556 class pointer_to_binary_function;
557 V template <class Arg1, class Arg2, class Result>
558 pointer_to_binary_function<Arg1,Arg2,Result>
559 ptr_fun(Result (*)(Arg1,Arg2));
561 // _lib.member.pointer.adaptors_, adaptors:
562 V template<class S, class T> class mem_fun_t;
563 V template<class S, class T, class A> class mem_fun1_t;
564 V template<class S, class T>
565 mem_fun_t<S,T> mem_fun(S (T::*f)());
566 V template<class S, class T, class A>
567 mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));
568 V template<class S, class T> class mem_fun_ref_t;
569 V template<class S, class T, class A> class mem_fun1_ref_t;
570 V template<class S, class T>
571 mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)());
572 V template<class S, class T, class A>
573 mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));
575 V template <class S, class T> class const_mem_fun_t;
576 V template <class S, class T, class A> class const_mem_fun1_t;
577 V template <class S, class T>
578 const_mem_fun_t<S,T> mem_fun(S (T::*f)() const);
579 V template <class S, class T, class A>
580 const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);
581 V template <class S, class T> class const_mem_fun_ref_t;
582 V template <class S, class T, class A> class const_mem_fun1_ref_t;
583 V template <class S, class T>
584 const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const);
585 V template <class S, class T, class A>
586 const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
589 20.3.1 Base [lib.base]
591 V template <class Arg, class Result>
592 struct unary_function {
593 V typedef Arg argument_type;
594 V typedef Result result_type;
596 V template <class Arg1, class Arg2, class Result>
597 struct binary_function {
598 V typedef Arg1 first_argument_type;
599 V typedef Arg2 second_argument_type;
600 V typedef Result result_type;
603 20.3.2 Arithmetic operations [lib.arithmetic.operations]
605 T template <class T> struct plus : binary_function<T,T,T> {
606 V T operator()(const T& x, const T& y) const;
609 T template <class T> struct minus : binary_function<T,T,T> {
610 V T operator()(const T& x, const T& y) const;
613 T template <class T> struct multiplies : binary_function<T,T,T> {
614 V T operator()(const T& x, const T& y) const;
617 T template <class T> struct divides : binary_function<T,T,T> {
618 V T operator()(const T& x, const T& y) const;
621 T template <class T> struct modulus : binary_function<T,T,T> {
622 V T operator()(const T& x, const T& y) const;
625 T template <class T> struct negate : unary_function<T,T> {
626 V T operator()(const T& x) const;
629 20.3.3 Comparisons [lib.comparisons]
631 T template <class T> struct equal_to : binary_function<T,T,bool> {
632 V bool operator()(const T& x, const T& y) const;
635 T template <class T> struct not_equal_to : binary_function<T,T,bool> {
636 V bool operator()(const T& x, const T& y) const;
639 T template <class T> struct greater : binary_function<T,T,bool> {
640 V bool operator()(const T& x, const T& y) const;
643 T template <class T> struct less : binary_function<T,T,bool> {
644 V bool operator()(const T& x, const T& y) const;
647 T template <class T> struct greater_equal : binary_function<T,T,bool> {
648 V bool operator()(const T& x, const T& y) const;
651 T template <class T> struct less_equal : binary_function<T,T,bool> {
652 V bool operator()(const T& x, const T& y) const;
655 20.3.4 Logical operations [lib.logical.operations]
657 T template <class T> struct logical_and : binary_function<T,T,bool> {
658 V bool operator()(const T& x, const T& y) const;
661 T template <class T> struct logical_or : binary_function<T,T,bool> {
662 V bool operator()(const T& x, const T& y) const;
665 T template <class T> struct logical_not : unary_function<T,bool> {
666 V bool operator()(const T& x) const;
669 20.3.5 Negators [lib.negators]
671 T template <class Predicate>
673 : public unary_function<typename Predicate::argument_type,bool> {
675 T explicit unary_negate(const Predicate& pred);
676 V bool operator()(const typename Predicate::argument_type& x) const;
679 T template <class Predicate>
681 : public binary_function<typename Predicate::first_argument_type,
682 typename Predicate::second_argument_type, bool> {
684 T explicit binary_negate(const Predicate& pred);
685 V bool operator()(const typename Predicate::first_argument_type& x,
686 const typename Predicate::second_argument_type& y) const;
690 20.3.6 Binders [lib.binders]
692 20.3.6.1 Template class binder1st [lib.binder.1st]
693 T template <class Operation>
695 : public unary_function<typename Operation::second_argument_type,
696 typename Operation::result_type> {
699 T typename Operation::first_argument_type value;
701 V binder1st(const Operation& x,
702 const typename Operation::first_argument_type& y);
703 V typename Operation::result_type
704 operator()(const typename Operation::second_argument_type& x) const;
707 20.3.6.2 bind1st [lib.bind.1st]
709 V template <class Operation, class T>
710 binder1st<Operation> bind1st(const Operation& op, const T& x);
712 20.3.6.3 Template class binder2nd [lib.binder.2nd]
713 T template <class Operation>
715 : public unary_function<typename Operation::first_argument_type,
716 typename Operation::result_type> {
719 T typename Operation::second_argument_type value;
721 V binder2nd(const Operation& x,
722 const typename Operation::second_argument_type& y);
723 V typename Operation::result_type
724 operator()(const typename Operation::first_argument_type& x) const;
727 20.3.6.4 bind2nd [lib.bind.2nd]
729 T template <class Operation, class T>
730 binder2nd<Operation> bind2nd(const Operation& op, const T& x);
733 20.3.7 Adaptors for pointers to [lib.function.pointer.adaptors]
736 1 To allow pointers to (unary and binary) functions to work with func-
737 tion adaptors the library provides:
739 T template <class Arg, class Result>
740 class pointer_to_unary_function : public unary_function<Arg, Result> {
742 T explicit pointer_to_unary_function(Result (*f)(Arg));
743 V Result operator()(Arg x) const;
746 T template <class Arg, class Result>
747 pointer_to_unary_function<Arg, Result> ptr_fun(Result (*f)(Arg));
749 T template <class Arg1, class Arg2, class Result>
750 class pointer_to_binary_function :
751 public binary_function<Arg1,Arg2,Result> {
753 T explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
754 V Result operator()(Arg1 x, Arg2 y) const;
758 20.3.8 Adaptors for pointers to [lib.member.pointer.adaptors]
761 T template <class S, class T> class mem_fun_t
762 : public unary_function<T*, S> {
764 T explicit mem_fun_t(S (T::*p)());
765 V S operator()(T* p) const;
768 T template <class S, class T, class A> class mem_fun1_t
769 : public binary_function<T*, A, S> {
771 T explicit mem_fun1_t(S (T::*p)(A));
772 V S operator()(T* p, A x) const;
775 V template<class S, class T> mem_fun_t<S,T>
776 mem_fun(S (T::*f)());
777 V template<class S, class T, class A> mem_fun1_t<S,T,A>
778 mem_fun(S (T::*f)(A));
780 T template <class S, class T> class mem_fun_ref_t
781 : public unary_function<T, S> {
783 T explicit mem_fun_ref_t(S (T::*p)());
784 V S operator()(T& p) const;
787 T template <class S, class T, class A> class mem_fun1_ref_t
788 : public binary_function<T, A, S> {
790 T explicit mem_fun1_ref_t(S (T::*p)(A));
791 V S operator()(T& p, A x) const;
794 T template<class S, class T> mem_fun_ref_t<S,T>
795 mem_fun_ref(S (T::*f)());
797 T template<class S, class T, class A> mem_fun1_ref_t<S,T,A>
798 mem_fun_ref(S (T::*f)(A));
800 T template <class S, class T> class const_mem_fun_t
801 : public unary_function<T*, S> {
803 T explicit const_mem_fun_t(S (T::*p)() const);
804 V S operator()(const T* p) const;
807 T template <class S, class T, class A> class const_mem_fun1_t
808 : public binary_function<T*, A, S> {
810 T explicit const mem_fun1_t(S (T::*p)(A) const);
811 V S operator()(const T* p, A x) const;
814 V template<class S, class T> const_mem_fun_t<S,T>
815 mem_fun(S (T::*f)() const);
816 V template<class S, class T, class A> const_mem_fun1_t<S,T,A>
817 mem_fun(S (T::*f)(A) const);
819 T template <class S, class T> class const_mem_fun_ref_t
820 : public unary_function<T, S> {
822 T explicit const_mem_fun_ref_t(S (T::*p)() const);
823 V S operator()(const T& p) const;
826 T template <class S, class T, class A> class const_mem_fun1_ref_t
827 : public binary_function<T, A, S> {
829 T explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
830 V S operator()(const T& p, A x) const;
833 T template<class S, class T> const_mem_fun_ref_t<S,T>
834 mem_fun_ref(S (T::*f)() const);
836 T template<class S, class T, class A> const_mem_fun1_ref_t<S,T,A>
837 mem_fun_ref(S (T::*f)(A) const);
839 20.4 Memory [lib.memory]
841 Header <memory> synopsis
843 // _lib.default.allocator_, the default allocator:
844 T template <class T> class allocator;
845 T template <> class allocator<void>;
846 T template <class T, class U>
847 bool operator==(const allocator<T>&, const allocator<U>&) throw();
848 T template <class T, class U>
849 bool operator!=(const allocator<T>&, const allocator<U>&) throw();
850 // _lib.storage.iterator_, raw storage iterator:
851 T template <class OutputIterator, class T> class raw_storage_iterator;
852 // _lib.temporary.buffer_, temporary buffers:
853 T template <class T>
854 pair<T*,ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
855 T template <class T>
856 void return_temporary_buffer(T* p);
857 // _lib.specialized.algorithms_, specialized algorithms:
858 T template <class InputIterator, class ForwardIterator>
860 uninitialized_copy(InputIterator first, InputIterator last,
861 ForwardIterator result);
862 T template <class ForwardIterator, class T>
863 void uninitialized_fill(ForwardIterator first, ForwardIterator last,
865 T template <class ForwardIterator, class Size, class T>
866 void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
867 // _lib.auto.ptr_, pointers:
868 X template<class X> class auto_ptr;
871 20.4.1 The default allocator [lib.default.allocator]
873 T template <class T> class allocator;
874 // specialize for void:
875 T template <> class allocator<void> {
877 T typedef void* pointer;
878 T typedef const void* const_pointer;
879 // reference-to-void members are impossible.
880 T typedef void value_type;
881 T template <class U> struct rebind { typedef allocator<U> other; };
884 T template <class T> class allocator {
886 T typedef size_t size_type;
887 T typedef ptrdiff_t difference_type;
888 T typedef T* pointer;
889 T typedef const T* const_pointer;
890 T typedef T& reference;
891 T typedef const T& const_reference;
892 T typedef T value_type;
893 T template <class U> struct rebind { typedef allocator<U> other; };
894 T allocator() throw();
895 T allocator(const allocator&) throw();
896 T template <class U> allocator(const allocator<U>&) throw();
897 T ~allocator() throw();
898 T pointer address(reference x) const;
899 T const_pointer address(const_reference x) const;
901 size_type, allocator<void>::const_pointer hint = 0);
902 T void deallocate(pointer p, size_type n);
903 T size_type max_size() const throw();
904 T void construct(pointer p, const T& val);
905 T void destroy(pointer p);
908 20.4.1.2 allocator globals [lib.allocator.globals]
910 T template <class T1, class T2>
911 bool operator==(const allocator<T1>&, const allocator<T2>&) throw();
912 T template <class T1, class T2>
913 bool operator!=(const allocator<T1>&, const allocator<T2>&) throw();
915 20.4.2 Raw storage iterator [lib.storage.iterator]
917 T template <class OutputIterator, class T>
918 class raw_storage_iterator
919 : public iterator<output_iterator_tag,void,void,void,void> {
921 T explicit raw_storage_iterator(OutputIterator x);
922 T raw_storage_iterator<OutputIterator,T>& operator*();
923 T raw_storage_iterator<OutputIterator,T>& operator=(const T& element);
924 T raw_storage_iterator<OutputIterator,T>& operator++();
925 T raw_storage_iterator<OutputIterator,T> operator++(int);
928 20.4.3 Temporary buffers [lib.temporary.buffer]
930 T template <class T>
931 pair<T*, ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
933 T template <class T> void return_temporary_buffer(T* p);
935 20.4.4 Specialized algorithms [lib.specialized.algorithms]
937 20.4.4.1 uninitialized_copy [lib.uninitialized.copy]
939 V template <class InputIterator, class ForwardIterator>
941 uninitialized_copy(InputIterator first, InputIterator last,
942 ForwardIterator result);
944 20.4.4.2 uninitialized_fill [lib.uninitialized.fill]
946 V template <class ForwardIterator, class T>
947 void uninitialized_fill(ForwardIterator first, ForwardIterator last,
950 20.4.4.3 uninitialized_fill_n [lib.uninitialized.fill.n]
952 V template <class ForwardIterator, class Size, class T>
953 void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
955 20.4.5 Template class auto_ptr [lib.auto.ptr]
957 X template<class X> class auto_ptr {
958 template <class Y> struct auto_ptr_ref {};
960 T typedef X element_type;
961 // _lib.auto.ptr.cons_ construct/copy/destroy:
962 T explicit auto_ptr(X* p =0) throw();
963 T auto_ptr(auto_ptr&) throw();
964 T template<class Y> auto_ptr(auto_ptr<Y>&) throw();
965 T auto_ptr& operator=(auto_ptr&) throw();
966 T template<class Y> auto_ptr& operator=(auto_ptr<Y>&) throw();
967 T ~auto_ptr() throw();
968 // _lib.auto.ptr.members_ members:
969 T X& operator*() const throw();
970 T X* operator->() const throw();
971 T X* get() const throw();
972 T X* release() throw();
973 T void reset(X* p =0) throw();
975 // _lib.auto.ptr.conv_ conversions:
976 X auto_ptr(auto_ptr_ref<X>) throw();
977 X template<class Y> operator auto_ptr_ref<Y>() throw();
978 X template<class Y> operator auto_ptr<Y>() throw();
981 20.4.6 C Library [lib.c.malloc]
983 Table 7--Header <cstdlib> synopsis
985 X Functions: calloc malloc
989 Table 8--Header <cstring> synopsis
993 X Functions: memchr memcmp
994 X memcpy memmove memset
996 Table 9--Header <ctime> synopsis
999 X Types: size_t clock_t time_t
1002 X asctime clock difftime localtime strftime
1003 X ctime gmtime mktime time
1005 21.1.1 Character traits requirements [lib.char.traits.require]
1007 2 The struct template
1008 T template<class charT> struct char_traits;
1009 shall be provided in the header <string> as a basis for explicit spe-
1013 21.1.3.1 struct [lib.char.traits.specializations.char]
1014 char_traits<char>
1017 struct char_traits<char> {
1018 T typedef char char_type;
1019 T typedef int int_type;
1020 T typedef streamoff off_type;
1021 T typedef streampos pos_type;
1022 T typedef mbstate_t state_type;
1024 T static void assign(char_type& c1, const char_type& c2);
1025 T static bool eq(const char_type& c1, const char_type& c2);
1026 T static bool lt(const char_type& c1, const char_type& c2);
1028 T static int compare(const char_type* s1, const char_type* s2, size_t n);
1029 T static size_t length(const char_type* s);
1030 T static const char_type* find(const char_type* s, size_t n,
1031 const char_type& a);
1032 T static char_type* move(char_type* s1, const char_type* s2, size_t n);
1033 T static char_type* copy(char_type* s1, const char_type* s2, size_t n);
1034 T static char_type* assign(char_type* s, size_t n, char_type a);
1036 T static int_type not_eof(const int_type& c);
1037 T static char_type to_char_type(const int_type& c);
1038 T static int_type to_int_type(const char_type& c);
1039 T static bool eq_int_type(const int_type& c1, const int_type& c2);
1040 T static int_type eof();
1043 21.1.3.2 struct [lib.char.traits.specializations.wchar.t]
1044 char_traits<wchar_t>
1047 struct char_traits<wchar_t> {
1048 V typedef wchar_t char_type;
1049 V typedef wint_t int_type;
1050 V typedef streamoff off_type;
1051 V typedef wstreampos pos_type;
1052 V typedef mbstate_t state_type;
1054 V static void assign(char_type& c1, const char_type& c2);
1055 V static bool eq(const char_type& c1, const char_type& c2);
1056 V static bool lt(const char_type& c1, const char_type& c2);
1058 V static int compare(const char_type* s1, const char_type* s2, size_t n);
1059 V static size_t length(const char_type* s);
1060 V static const char_type* find(const char_type* s, size_t n,
1061 const char_type& a);
1062 V static char_type* move(char_type* s1, const char_type* s2, size_t n);
1063 V static char_type* copy(char_type* s1, const char_type* s2, size_t n);
1064 V static char_type* assign(char_type* s, size_t n, char_type a);
1066 V static int_type not_eof(const int_type& c);
1067 V static char_type to_char_type(const int_type& c);
1068 V static int_type to_int_type(const char_type& c);
1069 V static bool eq_int_type(const int_type& c1, const int_type& c2);
1070 V static int_type eof();
1073 21.2 String classes [lib.string.classes]
1075 // _lib.char.traits_, character traits:
1076 V template<class charT>
1078 V template <> struct char_traits<char>;
1079 V template <> struct char_traits<wchar_t>;
1081 // _lib.basic.string_, basic_string:
1082 V template<class charT, class traits = char_traits<charT>,
1083 class Allocator = allocator<charT> >
1085 V template<class charT, class traits, class Allocator>
1086 basic_string<charT,traits,Allocator>
1087 operator+(const basic_string<charT,traits,Allocator>& lhs,
1088 const basic_string<charT,traits,Allocator>& rhs);
1089 V template<class charT, class traits, class Allocator>
1090 basic_string<charT,traits,Allocator>
1091 operator+(const charT* lhs,
1092 const basic_string<charT,traits,Allocator>& rhs);
1093 V template<class charT, class traits, class Allocator>
1094 basic_string<charT,traits,Allocator>
1095 operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);
1096 V template<class charT, class traits, class Allocator>
1097 basic_string<charT,traits,Allocator>
1098 operator+(const basic_string<charT,traits,Allocator>& lhs,
1100 V template<class charT, class traits, class Allocator>
1101 basic_string<charT,traits,Allocator>
1102 operator+(const basic_string<charT,traits,Allocator>& lhs, charT rhs);
1104 V template<class charT, class traits, class Allocator>
1105 bool operator==(const basic_string<charT,traits,Allocator>& lhs,
1106 const basic_string<charT,traits,Allocator>& rhs);
1107 V template<class charT, class traits, class Allocator>
1108 bool operator==(const charT* lhs,
1109 const basic_string<charT,traits,Allocator>& rhs);
1110 V template<class charT, class traits, class Allocator>
1111 bool operator==(const basic_string<charT,traits,Allocator>& lhs,
1113 V template<class charT, class traits, class Allocator>
1114 bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
1115 const basic_string<charT,traits,Allocator>& rhs);
1116 V template<class charT, class traits, class Allocator>
1117 bool operator!=(const charT* lhs,
1118 const basic_string<charT,traits,Allocator>& rhs);
1119 V template<class charT, class traits, class Allocator>
1120 bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
1122 V template<class charT, class traits, class Allocator>
1123 bool operator< (const basic_string<charT,traits,Allocator>& lhs,
1124 const basic_string<charT,traits,Allocator>& rhs);
1125 V template<class charT, class traits, class Allocator>
1126 bool operator< (const basic_string<charT,traits,Allocator>& lhs,
1128 V template<class charT, class traits, class Allocator>
1129 bool operator< (const charT* lhs,
1130 const basic_string<charT,traits,Allocator>& rhs);
1131 V template<class charT, class traits, class Allocator>
1132 bool operator> (const basic_string<charT,traits,Allocator>& lhs,
1133 const basic_string<charT,traits,Allocator>& rhs);
1134 V template<class charT, class traits, class Allocator>
1135 bool operator> (const basic_string<charT,traits,Allocator>& lhs,
1137 V template<class charT, class traits, class Allocator>
1138 bool operator> (const charT* lhs,
1139 const basic_string<charT,traits,Allocator>& rhs);
1140 V template<class charT, class traits, class Allocator>
1141 bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
1142 const basic_string<charT,traits,Allocator>& rhs);
1143 V template<class charT, class traits, class Allocator>
1144 bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
1146 V template<class charT, class traits, class Allocator>
1147 bool operator<=(const charT* lhs,
1148 const basic_string<charT,traits,Allocator>& rhs);
1149 V template<class charT, class traits, class Allocator>
1150 bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
1151 const basic_string<charT,traits,Allocator>& rhs);
1152 V template<class charT, class traits, class Allocator>
1153 bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
1155 V template<class charT, class traits, class Allocator>
1156 bool operator>=(const charT* lhs,
1157 const basic_string<charT,traits,Allocator>& rhs);
1159 // _lib.string.special_:
1160 V template<class charT, class traits, class Allocator>
1161 void swap(basic_string<charT,traits,Allocator>& lhs,
1162 basic_string<charT,traits,Allocator>& rhs);
1163 V template<class charT, class traits, class Allocator>
1164 basic_istream<charT,traits>&
1165 operator>>(basic_istream<charT,traits>& is,
1166 basic_string<charT,traits,Allocator>& str);
1167 T template<class charT, class traits, class Allocator>
1168 basic_ostream<charT, traits>&
1169 operator<<(basic_ostream<charT, traits>& os,
1170 const basic_string<charT,traits,Allocator>& str);
1171 V template<class charT, class traits, class Allocator>
1172 basic_istream<charT,traits>&
1173 getline(basic_istream<charT,traits>& is,
1174 basic_string<charT,traits,Allocator>& str,
1176 V template<class charT, class traits, class Allocator>
1177 basic_istream<charT,traits>&
1178 getline(basic_istream<charT,traits>& is,
1179 basic_string<charT,traits,Allocator>& str);
1180 V typedef basic_string<char> string;
1181 T typedef basic_string<wchar_t> wstring;
1184 21.3 Template class basic_string [lib.basic.string]
1187 template<class charT, class traits = char_traits<charT>,
1188 class Allocator = allocator<charT> >
1189 class basic_string {
1192 typedef traits traits_type;
1193 typedef typename traits::char_type value_type;
1194 typedef Allocator allocator_type;
1195 typedef typename Allocator::size_type size_type;
1196 typedef typename Allocator::difference_type difference_type;
1197 typedef typename Allocator::reference reference;
1198 typedef typename Allocator::const_reference const_reference;
1199 typedef typename Allocator::pointer pointer;
1200 typedef typename Allocator::const_pointer const_pointer;
1201 typedef implementation defined iterator;
1202 typedef implementation defined const_iterator;
1203 typedef std::reverse_iterator<iterator> reverse_iterator;
1204 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
1205 static const size_type npos = -1;
1207 // _lib.string.cons_ construct/copy/destroy:
1208 V explicit basic_string(const Allocator& a = Allocator());
1209 V basic_string(const basic_string& str, size_type pos = 0,
1210 size_type n = npos, const Allocator& a = Allocator());
1211 V basic_string(const charT* s,
1212 size_type n, const Allocator& a = Allocator());
1213 V basic_string(const charT* s, const Allocator& a = Allocator());
1214 V basic_string(size_type n, charT c, const Allocator& a = Allocator());
1215 V template<class InputIterator>
1216 basic_string(InputIterator begin, InputIterator end,
1217 const Allocator& a = Allocator());
1219 V basic_string& operator=(const basic_string& str);
1220 V basic_string& operator=(const charT* s);
1221 V basic_string& operator=(charT c);
1222 // _lib.string.iterators_ iterators:
1224 V const_iterator begin() const;
1226 V const_iterator end() const;
1228 V reverse_iterator rbegin();
1229 V const_reverse_iterator rbegin() const;
1230 V reverse_iterator rend();
1231 V const_reverse_iterator rend() const;
1232 // _lib.string.capacity_ capacity:
1233 V size_type size() const;
1234 V size_type length() const;
1235 V size_type max_size() const;
1236 V void resize(size_type n, charT c);
1237 V void resize(size_type n);
1238 V size_type capacity() const;
1239 V void reserve(size_type res_arg = 0);
1241 V bool empty() const;
1242 // _lib.string.access_ element access:
1243 V const_reference operator[](size_type pos) const;
1244 V reference operator[](size_type pos);
1245 V const_reference at(size_type n) const;
1246 V reference at(size_type n);
1247 // _lib.string.modifiers_ modifiers:
1248 V basic_string& operator+=(const basic_string& str);
1249 V basic_string& operator+=(const charT* s);
1250 V basic_string& operator+=(charT c);
1251 V basic_string& append(const basic_string& str);
1252 V basic_string& append(const basic_string& str, size_type pos,
1254 V basic_string& append(const charT* s, size_type n);
1255 V basic_string& append(const charT* s);
1256 V basic_string& append(size_type n, charT c);
1257 V template<class InputIterator>
1258 basic_string& append(InputIterator first, InputIterator last);
1259 V void push_back(const charT);
1261 V basic_string& assign(const basic_string&);
1262 V basic_string& assign(const basic_string& str, size_type pos,
1264 V basic_string& assign(const charT* s, size_type n);
1265 V basic_string& assign(const charT* s);
1266 V basic_string& assign(size_type n, charT c);
1267 V template<class InputIterator>
1268 basic_string& assign(InputIterator first, InputIterator last);
1269 V basic_string& insert(size_type pos1, const basic_string& str);
1270 V basic_string& insert(size_type pos1, const basic_string& str,
1271 size_type pos2, size_type n);
1272 V basic_string& insert(size_type pos, const charT* s, size_type n);
1273 V basic_string& insert(size_type pos, const charT* s);
1274 V basic_string& insert(size_type pos, size_type n, charT c);
1275 V iterator insert(iterator p, charT c);
1276 V void insert(iterator p, size_type n, charT c);
1277 V template<class InputIterator>
1278 void insert(iterator p, InputIterator first, InputIterator last);
1279 V basic_string& erase(size_type pos = 0, size_type n = npos);
1280 V iterator erase(iterator position);
1281 V iterator erase(iterator first, iterator last);
1282 V basic_string& replace(size_type pos1, size_type n1,
1283 const basic_string& str);
1284 V basic_string& replace(size_type pos1, size_type n1,
1285 const basic_string& str,
1286 size_type pos2, size_type n2);
1287 V basic_string& replace(size_type pos, size_type n1, const charT* s,
1289 V basic_string& replace(size_type pos, size_type n1, const charT* s);
1290 V basic_string& replace(size_type pos, size_type n1, size_type n2,
1292 V basic_string& replace(iterator i1, iterator i2, const basic_string& str);
1293 V basic_string& replace(iterator i1, iterator i2, const charT* s,
1295 V basic_string& replace(iterator i1, iterator i2, const charT* s);
1296 V basic_string& replace(iterator i1, iterator i2,
1297 size_type n, charT c);
1298 V template<class InputIterator>
1299 basic_string& replace(iterator i1, iterator i2,
1300 InputIterator j1, InputIterator j2);
1301 V size_type copy(charT* s, size_type n, size_type pos = 0) const;
1302 V void swap(basic_string<charT,traits,Allocator>&);
1303 // _lib.string.ops_ string operations:
1304 V const charT* c_str() const; // explicit
1305 V const charT* data() const;
1306 V allocator_type get_allocator() const;
1307 V size_type find (const basic_string& str, size_type pos = 0) const;
1308 V size_type find (const charT* s, size_type pos, size_type n) const;
1309 V size_type find (const charT* s, size_type pos = 0) const;
1310 V size_type find (charT c, size_type pos = 0) const;
1311 V size_type rfind(const basic_string& str, size_type pos = npos) const;
1312 V size_type rfind(const charT* s, size_type pos, size_type n) const;
1313 V size_type rfind(const charT* s, size_type pos = npos) const;
1314 V size_type rfind(charT c, size_type pos = npos) const;
1316 V size_type find_first_of(const basic_string& str,
1317 size_type pos = 0) const;
1318 V size_type find_first_of(const charT* s,
1319 size_type pos, size_type n) const;
1320 V size_type find_first_of(const charT* s, size_type pos = 0) const;
1321 V size_type find_first_of(charT c, size_type pos = 0) const;
1322 V size_type find_last_of (const basic_string& str,
1323 size_type pos = npos) const;
1324 V size_type find_last_of (const charT* s,
1325 size_type pos, size_type n) const;
1326 V size_type find_last_of (const charT* s, size_type pos = npos) const;
1327 V size_type find_last_of (charT c, size_type pos = npos) const;
1328 V size_type find_first_not_of(const basic_string& str,
1329 size_type pos = 0) const;
1330 V size_type find_first_not_of(const charT* s, size_type pos,
1332 V size_type find_first_not_of(const charT* s, size_type pos = 0) const;
1333 V size_type find_first_not_of(charT c, size_type pos = 0) const;
1334 V size_type find_last_not_of (const basic_string& str,
1335 size_type pos = npos) const;
1336 V size_type find_last_not_of (const charT* s, size_type pos,
1338 V size_type find_last_not_of (const charT* s,
1339 size_type pos = npos) const;
1340 V size_type find_last_not_of (charT c, size_type pos = npos) const;
1341 V basic_string substr(size_type pos = 0, size_type n = npos) const;
1342 V int compare(const basic_string& str) const;
1343 V int compare(size_type pos1, size_type n1,
1344 const basic_string& str) const;
1345 V int compare(size_type pos1, size_type n1,
1346 const basic_string& str,
1347 size_type pos2, size_type n2) const;
1348 V int compare(const charT* s) const;
1349 V int compare(size_type pos1, size_type n1,
1350 const charT* s, size_type n2 = npos) const;
1354 21.4 Null-terminated sequence utilities [lib.c.strings]
1356 Table 10--Header <cctype> synopsis
1358 isalnum isdigit isprint isupper tolower
1359 X isalpha isgraph ispunct isxdigit toupper
1360 iscntrl islower isspace
1362 Table 11--Header <cwctype> synopsis
1364 X Macro: WEOF <cwctype>
1365 X Types: wctrans_t wctype_t wint_t <cwctype>
1367 X iswalnum iswctype iswlower iswspace towctrans wctrans
1368 X iswalpha iswdigit iswprint iswupper towlower wctype
1369 X iswcntrl iswgraph iswpunct iswxdigit towupper
1371 Table 12--Header <cstring> synopsis
1373 X Macro: NULL <cstring>
1374 X Type: size_t <cstring>
1376 X memchr strcat strcspn strncpy strtok
1377 X memcmp strchr strerror strpbrk strxfrm
1378 X memcpy strcmp strlen strrchr
1379 X memmove strcoll strncat strspn
1380 X memset strcpy strncmp strstr
1382 Table 13--Header <cwchar> synopsis
1383 Macros: NULL <cwchar> WCHAR_MAX WCHAR_MIN WEOF <cwchar>
1384 Types: mbstate_t wint_t <cwchar> size_t
1386 X btowc getwchar ungetwc wcscpy wcsrtombs wmemchr
1387 X fgetwc mbrlen vfwprintf wcscspn wcsspn wmemcmp
1388 X fgetws mbrtowc vswprintf wcsftime wcsstr wmemcpy
1389 X fputwc mbsinit vwprintf wcslen wcstod wmemmove
1390 X fputws mbsrtowcs wcrtomb wcsncat wcstok wmemset
1391 X fwide putwc wcscat wcsncmp wcstol wprintf
1392 X fwprintf putwchar wcschr wcsncpy wcstoul wscanf
1393 X fwscanf swprintf wcscmp wcspbrk wcsxfrm
1394 X getwc swscanf wcscoll wcsrchr wctob
1396 Table 14--Header <cstdlib> synopsis
1400 X atol mblen strtod wctomb
1401 X atof mbstowcs strtol wcstombs
1402 X atoi mbtowc strtoul
1404 X const char* strchr(const char* s, int c);
1405 X char* strchr( char* s, int c);
1407 X const char* strpbrk(const char* s1, const char* s2);
1408 X char* strpbrk( char* s1, const char* s2);
1410 X const char* strrchr(const char* s, int c);
1411 X char* strrchr( char* s, int c);
1413 X const char* strstr(const char* s1, const char* s2);
1414 X char* strstr( char* s1, const char* s2);
1416 X const void* memchr(const void* s, int c, size_t n);
1417 X void* memchr( void* s, int c, size_t n);
1419 X const wchar_t* wcschr(const wchar_t* s, wchar_t c);
1420 X wchar_t* wcschr( wchar_t* s, wchar_t c);
1422 X const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
1423 X wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
1425 X const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
1426 X wchar_t* wcsrchr( wchar_t* s, wchar_t c);
1428 X const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
1429 X wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
1431 X const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
1432 X wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
1434 [for initial efforts on the above, see shadow/string.h]
1436 22.1 Locales [lib.locales]
1438 Header <locale> synopsis
1440 // _lib.locale_, locale:
1442 T template <class Facet> const Facet& use_facet(const locale&);
1443 T template <class Facet> bool has_facet(const locale&) throw();
1445 // _lib.locale.convenience_, convenience interfaces:
1446 T template <class charT> bool isspace (charT c, const locale& loc);
1447 T template <class charT> bool isprint (charT c, const locale& loc);
1448 T template <class charT> bool iscntrl (charT c, const locale& loc);
1449 T template <class charT> bool isupper (charT c, const locale& loc);
1450 T template <class charT> bool islower (charT c, const locale& loc);
1451 T template <class charT> bool isalpha (charT c, const locale& loc);
1452 T template <class charT> bool isdigit (charT c, const locale& loc);
1453 T template <class charT> bool ispunct (charT c, const locale& loc);
1454 T template <class charT> bool isxdigit(charT c, const locale& loc);
1455 T template <class charT> bool isalnum (charT c, const locale& loc);
1456 T template <class charT> bool isgraph (charT c, const locale& loc);
1457 T template <class charT> charT toupper(charT c, const locale& loc);
1458 T template <class charT> charT tolower(charT c, const locale& loc);
1459 // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
1461 T template <class charT> class ctype;
1462 T template <> class ctype<char>; // specialization
1463 S template <class charT> class ctype_byname;
1464 S template <> class ctype_byname<char>; // specialization
1465 T class codecvt_base;
1466 X template <class internT, class externT, class stateT> class codecvt;
1467 S template <class internT, class externT, class stateT> class codecvt_byname;
1468 // _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
1469 X template <class charT, class InputIterator> class num_get;
1470 X template <class charT, class OutputIterator> class num_put;
1471 T template <class charT> class numpunct;
1472 S template <class charT> class numpunct_byname;
1473 // _lib.category.collate_, collation:
1474 T template <class charT> class collate;
1475 S template <class charT> class collate_byname;
1476 // _lib.category.time_, date and time:
1478 S template <class charT, class InputIterator> class time_get;
1479 S template <class charT, class InputIterator> class time_get_byname;
1480 S template <class charT, class OutputIterator> class time_put;
1481 S template <class charT, class OutputIterator> class time_put_byname;
1482 // _lib.category.monetary_, money:
1484 S template <class charT, class InputIterator> class money_get;
1485 S template <class charT, class OutputIterator> class money_put;
1486 S template <class charT, bool Intl> class moneypunct;
1487 S template <class charT, bool Intl> class moneypunct_byname;
1488 // _lib.category.messages_, message retrieval:
1489 T class messages_base;
1490 S template <class charT> class messages;
1491 S template <class charT> class messages_byname;
1494 22.1.1 Class locale [lib.locale]
1501 T typedef int category;
1502 T static const category // values assigned here are for exposition only
1504 T collate = 0x010, ctype = 0x020,
1505 T monetary = 0x040, numeric = 0x080,
1506 T time = 0x100, messages = 0x200,
1507 T all = collate | ctype | monetary | numeric | time | messages;
1508 // construct/copy/destroy:
1510 T locale(const locale& other) throw()
1511 X explicit locale(const char* std_name);
1512 X locale(const locale& other, const char* std_name, category);
1513 T template <class Facet> locale(const locale& other, Facet* f);
1514 T locale(const locale& other, const locale& one, category);
1515 T ~locale() throw(); // non-virtual
1516 T const locale& operator=(const locale& other) throw();
1517 T template <class Facet> locale combine(const locale& other) const;
1518 // locale operations:
1519 X basic_string<char> name() const;
1520 T bool operator==(const locale& other) const;
1521 T bool operator!=(const locale& other) const;
1522 T template <class charT, class Traits, class Allocator>
1523 bool operator()(const basic_string<charT,Traits,Allocator>& s1,
1524 const basic_string<charT,Traits,Allocator>& s2) const;
1525 // global locale objects:
1526 T static locale global(const locale&);
1527 T static const locale& classic();
1530 22.1.1.1 locale types [lib.locale.types]
1532 22.1.1.1.1 Type locale::category [lib.locale.category]
1534 T typedef int category;
1536 T none, collate, ctype, monetary, numeric, time, and messages
1538 [required locale members]
1539 T collate<char>, collate<wchar_t>
1540 T ctype<char>, ctype<wchar_t>
1541 T codecvt<char,char,mbstate_t>,
1542 S codecvt<wchar_t,char,mbstate_t>
1543 T moneypunct<char>, moneypunct<wchar_t>
1544 T moneypunct<char,true>, moneypunct<wchar_t,true>,
1545 S money_get<char>, money_get<wchar_t
1546 S money_put<char>, money_put<wchar_t>
1547 T numpunct<char>, numpunct<wchar_t>,
1548 X num_get<char>, num_get<wchar_t>
1549 X num_put<char>, num_put<wchar_t>
1550 S time_get<char>, time_get<wchar_t>,
1551 S time_put<char>, time_put<wchar_t>
1552 S messages<char>, messages<wchar_t>
1554 [required instantiations]
1555 S collate_byname<char>, collate_byname<wchar_t>
1556 S ctype_byname<char>, ctype_byname<wchar_t>
1557 S codecvt_byname<char,char,mbstate_t>,
1558 S codecvt_byname<wchar_t,char,mbstate_t>
1559 S moneypunct_byname<char,International>,
1560 S moneypunct_byname<wchar_t,International>,
1561 S money_get<C,InputIterator>,
1562 S money_put<C,OutputIterator>
1563 S numpunct_byname<char>, numpunct_byname<wchar_t>
1564 X num_get<C,InputIterator>, num_put<C,OutputIterator>
1565 S time_get<char,InputIterator>,
1566 S time_get_byname<char,InputIterator>,
1567 S time_get<wchar_t,OutputIterator>,
1568 S time_get_byname<wchar_t,OutputIterator>,
1569 S time_put<char,OutputIterator>,
1570 S time_put_byname<char,OutputIterator>,
1571 S time_put<wchar_t,OutputIterator>
1572 S time_put_byname<wchar_t,OutputIterator>
1573 S messages_byname<char>, messages_byname<wchar_t>
1576 22.1.1.1.2 Class locale::facet [lib.locale.facet]
1578 T class locale::facet {
1580 T explicit facet(size_t refs = 0);
1583 T facet(const facet&); // not defined
1584 T void operator=(const facet&); // not defined
1589 22.1.1.1.3 Class locale::id [lib.locale.id]
1591 T class locale::id {
1595 T void operator=(const id&); // not defined
1596 T id(const id&); // not defined
1601 22.2.1 The ctype category [lib.category.ctype]
1603 T class ctype_base {
1605 T enum mask { // numeric values are for exposition only.
1606 T space=, print=, cntrl=, upper=, lower=,
1607 T alpha=, digit=, punct=, xdigit=,
1613 22.2.1.1 Template class ctype [lib.locale.ctype]
1615 T template <class charT>
1616 class ctype : public locale::facet, public ctype_base {
1618 T typedef charT char_type;
1619 T explicit ctype(size_t refs = 0);
1620 T bool is(mask m, charT c) const;
1621 T const charT* is(const charT* low, const charT* high, mask* vec) const;
1622 T const charT* scan_is(mask m,
1623 const charT* low, const charT* high) const;
1624 T const charT* scan_not(mask m,
1625 const charT* low, const charT* high) const;
1626 T charT toupper(charT c) const;
1627 T const charT* toupper(charT* low, const charT* high) const;
1628 T charT tolower(charT c) const;
1629 T const charT* tolower(charT* low, const charT* high) const;
1630 T charT widen(char c) const;
1631 T const char* widen(const char* low, const char* high, charT* to) const;
1632 T char narrow(charT c, char dfault) const;
1633 T const charT* narrow(const charT* low, const charT*, char dfault,
1635 T static locale::id id;
1638 T ~ctype(); // virtual
1639 T virtual bool do_is(mask m, charT c) const;
1640 T virtual const charT* do_is(const charT* low, const charT* high,
1642 T virtual const charT* do_scan_is(mask m,
1643 const charT* low, const charT* high) const;
1644 T virtual const charT* do_scan_not(mask m,
1645 const charT* low, const charT* high) const;
1646 T virtual charT do_toupper(charT) const;
1647 T virtual const charT* do_toupper(charT* low, const charT* high) const;
1648 T virtual charT do_tolower(charT) const;
1649 T virtual const charT* do_tolower(charT* low, const charT* high) const;
1650 T virtual charT do_widen(char) const;
1651 T virtual const char* do_widen(const char* low, const char* high,
1653 T virtual char do_narrow(charT, char dfault) const;
1654 T virtual const charT* do_narrow(const charT* low, const charT* high,
1655 char dfault, char* dest) const;
1659 22.2.1.2 Template class ctype_byname [lib.locale.ctype.byname]
1661 X template <class charT>
1662 class ctype_byname : public ctype<charT> {
1664 T typedef ctype<charT>::mask mask;
1665 S explicit ctype_byname(const char*, size_t refs = 0);
1667 S ~ctype_byname(); // virtual
1668 S virtual bool do_is(mask m, charT c) const;
1669 S virtual const charT* do_is(const charT* low, const charT* high,
1671 S virtual const char* do_scan_is(mask m,
1672 const charT* low, const charT* high) const;
1673 S virtual const char* do_scan_not(mask m,
1674 const charT* low, const charT* high) const;
1675 S virtual charT do_toupper(charT) const;
1676 S virtual const charT* do_toupper(charT* low, const charT* high) const;
1677 S virtual charT do_tolower(charT) const;
1678 S virtual const charT* do_tolower(charT* low, const charT* high) const;
1679 S virtual charT do_widen(char) const;
1680 S virtual const char* do_widen(const char* low, const char* high,
1682 S virtual char do_narrow(charT, char dfault) const;
1683 S virtual const charT* do_narrow(const charT* low, const charT* high,
1684 char dfault, char* dest) const;
1687 22.2.1.3 ctype specializations [lib.facet.ctype.special]
1689 T template <> class ctype<char>
1690 : public locale::facet, public ctype_base {
1692 T typedef char char_type;
1693 T explicit ctype(const mask* tab = 0, bool del = false,
1695 T bool is(mask m, char c) const;
1696 T const char* is(const char* low, const char* high, mask* vec) const;
1697 T const char* scan_is (mask m,
1698 const char* low, const char* high) const;
1699 T const char* scan_not(mask m,
1700 const char* low, const char* high) const;
1701 T char toupper(char c) const;
1702 T const char* toupper(char* low, const char* high) const;
1703 T char tolower(char c) const;
1704 T const char* tolower(char* low, const char* high) const;
1705 T char widen(char c) const;
1706 T const char* widen(const char* low, const char* high, char* to) const;
1707 T char narrow(char c, char dfault) const;
1708 T const char* narrow(const char* low, const char* high, char dfault,
1710 T static locale::id id;
1711 T static const size_t table_size = IMPLEMENTATION_DEFINED;
1714 T const mask* table() const throw();
1715 T static const mask* classic_table() throw();
1716 T ~ctype(); // virtual
1717 T virtual char do_toupper(char c) const;
1718 T virtual const char* do_toupper(char* low, const char* high) const;
1719 T virtual char do_tolower(char c) const;
1720 T virtual const char* do_tolower(char* low, const char* high) const;
1722 T virtual char do_widen(char c) const;
1723 T virtual const char* do_widen(const char* low,
1726 T virtual char do_narrow(char c, char dfault) const;
1727 T virtual const char* do_narrow(const char* low,
1729 char dfault, char* to) const;
1733 22.2.1.4 Class [lib.locale.ctype.byname.special]
1734 ctype_byname<char>
1736 X template <> class ctype_byname<char> : public ctype<char> {
1738 S explicit ctype_byname(const char*, size_t refs = 0);
1740 S ~ctype_byname(); // virtual
1741 S virtual char do_toupper(char c) const;
1742 S virtual const char* do_toupper(char* low, const char* high) const;
1743 S virtual char do_tolower(char c) const;
1744 S virtual const char* do_tolower(char* low, const char* high) const;
1746 S virtual char do_widen(char c) const;
1747 S virtual const char* do_widen(char* low,
1750 S virtual char do_widen(char c) const;
1751 S virtual const char* do_widen(char* low, const char* high) const;
1757 22.2.1.5 Template class codecvt [lib.locale.codecvt]
1759 T class codecvt_base {
1761 T enum result { ok, partial, error, noconv };
1764 T template <class internT, class externT, class stateT>
1765 class codecvt : public locale::facet, public codecvt_base {
1767 T typedef internT intern_type;
1768 T typedef externT extern_type;
1769 T typedef stateT state_type;
1770 T explicit codecvt(size_t refs = 0)
1771 T result out(stateT& state,
1772 const internT* from, const internT* from_end, const internT*& from_next,
1773 externT* to, externT* to_limit, externT*& to_next) const;
1774 T result unshift(stateT& state,
1775 externT* to, externT* to_limit, externT*& to_next) const;
1776 T result in(stateT& state,
1777 const externT* from, const externT* from_end, const externT*& from_next,
1778 internT* to, internT* to_limit, internT*& to_next) const;
1779 T int encoding() const throw();
1780 T bool always_noconv() const throw();
1781 T int length(const stateT&, const externT* from, const externT* end,
1783 T int max_length() const throw();
1784 T static locale::id id;
1787 T ~codecvt(); // virtual
1788 T virtual result do_out(stateT& state,
1789 const internT* from, const internT* from_end, const internT*& from_next,
1790 externT* to, externT* to_limit, externT*& to_next) const;
1791 T virtual result do_in(stateT& state,
1792 T const externT* from, const externT* from_end, const externT*& from_next,
1793 internT* to, internT* to_limit, internT*& to_next) const;
1794 T virtual result do_unshift(stateT& state,
1795 externT* to, externT* to_limit, externT*& to_next) const;
1796 T virtual int do_encoding() const throw();
1797 T virtual bool do_always_noconv() const throw();
1798 T virtual int do_length(const stateT&, const externT* from,
1799 const externT* end, size_t max) const;
1800 T virtual int do_max_length() const throw();
1805 22.2.1.6 Template class [lib.locale.codecvt.byname]
1808 X template <class internT, class externT, class stateT>
1809 class codecvt_byname : public codecvt<internT, externT, stateT> {
1811 S explicit codecvt_byname(const char*, size_t refs = 0);
1813 S ~codecvt_byname(); // virtual
1814 S virtual result do_out(stateT& state,
1815 const internT* from, const internT* from_end, const internT*& from_next,
1816 externT* to, externT* to_limit, externT*& to_next) const;
1817 S virtual result do_in(stateT& state,
1818 const externT* from, const externT* from_end, const externT*& from_next,
1819 internT* to, internT* to_limit, internT*& to_next) const;
1820 S virtual result do_unshift(stateT& state,
1821 externT* to, externT* to_limit, externT*& to_next) const;
1822 S virtual int do_encoding() const throw();
1823 S virtual bool do_always_noconv() const throw();
1824 S virtual int do_length(const stateT&, const externT* from,
1825 const externT* end, size_t max) const;
1826 S virtual result do_unshift(stateT& state,
1827 externT* to, externT* to_limit, externT*& to_next) const;
1828 S virtual int do_max_length() const throw();
1832 22.2.2.1 Template class num_get [lib.locale.num.get]
1834 X template <class charT, class InputIterator = istreambuf_iterator<charT> >
1835 class num_get : public locale::facet {
1837 T typedef charT char_type;
1838 T typedef InputIterator iter_type;
1839 T explicit num_get(size_t refs = 0);
1840 T iter_type get(iter_type in, iter_type end, ios_base&,
1841 ios_base::iostate& err, bool& v) const;
1842 T iter_type get(iter_type in, iter_type end, ios_base& ,
1843 ios_base::iostate& err, long& v) const;
1844 T iter_type get(iter_type in, iter_type end, ios_base&,
1845 ios_base::iostate& err, unsigned short& v) const;
1846 T iter_type get(iter_type in, iter_type end, ios_base&,
1847 ios_base::iostate& err, unsigned int& v) const;
1848 T iter_type get(iter_type in, iter_type end, ios_base&,
1849 ios_base::iostate& err, unsigned long& v) const;
1850 T iter_type get(iter_type in, iter_type end, ios_base&,
1851 ios_base::iostate& err, float& v) const;
1852 T iter_type get(iter_type in, iter_type end, ios_base&,
1853 ios_base::iostate& err, double& v) const;
1854 T iter_type get(iter_type in, iter_type end, ios_base&,
1855 ios_base::iostate& err, long double& v) const;
1856 T iter_type get(iter_type in, iter_type end, ios_base&,
1857 ios_base::iostate& err, void*& v) const;
1858 T static locale::id id;
1861 T ~num_get(); // virtual
1862 T virtual iter_type do_get(iter_type, iter_type, ios_base&,
1863 ios_base::iostate& err, bool& v) const;
1864 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1865 ios_base::iostate& err, long& v) const;
1866 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1867 ios_base::iostate& err, unsigned short& v) const;
1868 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1869 ios_base::iostate& err, unsigned int& v) const;
1870 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1871 ios_base::iostate& err, unsigned long& v) const;
1872 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1873 ios_base::iostate& err, float& v) const;
1874 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1875 ios_base::iostate& err, double& v) const;
1876 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1877 ios_base::iostate& err, long double& v) const;
1878 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1879 ios_base::iostate& err, void*& v) const;
1884 22.2.2.2 Template class num_put [lib.locale.nm.put]
1886 X template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
1887 class num_put : public locale::facet {
1889 T typedef charT char_type;
1890 T typedef OutputIterator iter_type;
1891 T explicit num_put(size_t refs = 0);
1892 T iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const;
1893 T iter_type put(iter_type s, ios_base& f, char_type fill, long v) const;
1894 T iter_type put(iter_type s, ios_base& f, char_type fill,
1895 unsigned long v) const;
1896 T iter_type put(iter_type s, ios_base& f, char_type fill,
1898 T iter_type put(iter_type s, ios_base& f, char_type fill,
1899 long double v) const;
1900 T iter_type put(iter_type s, ios_base& f, char_type fill,
1901 const void* v) const;
1902 T static locale::id id;
1904 T ~num_put(); // virtual
1905 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1907 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1909 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1910 unsigned long) const;
1911 S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1913 S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1914 long double v) const;
1915 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1916 const void* v) const;
1920 22.2.3.1 Template class numpunct [lib.locale.numpunct]
1922 T template <class charT>
1923 class numpunct : public locale::facet {
1925 T typedef charT char_type;
1926 T typedef basic_string<charT> string_type;
1927 T explicit numpunct(size_t refs = 0);
1928 T char_type decimal_point() const;
1929 T char_type thousands_sep() const;
1930 T string grouping() const;
1931 T string_type truename() const;
1932 T string_type falsename() const;
1933 T static locale::id id;
1935 T ~numpunct(); // virtual
1936 T virtual char_type do_decimal_point() const;
1937 T virtual char_type do_thousands_sep() const;
1938 T virtual string do_grouping() const;
1939 T virtual string_type do_truename() const; // for bool
1940 T virtual string_type do_falsename() const; // for bool
1946 22.2.3.2 Template class [lib.locale.numpunct.byname]
1949 X template <class charT>
1950 class numpunct_byname : public numpunct<charT> {
1951 // this class is specialized for char and wchar_t.
1953 T typedef charT char_type;
1954 T typedef basic_string<charT> string_type;
1955 S explicit numpunct_byname(const char*, size_t refs = 0);
1957 S ~numpunct_byname(); // virtual
1958 S virtual char_type do_decimal_point() const;
1959 S virtual char_type do_thousands_sep() const;
1960 S virtual string do_grouping() const;
1961 S virtual string_type do_truename() const; // for bool
1962 S virtual string_type do_falsename() const; // for bool
1966 22.2.4.1 Template class collate [lib.locale.collate]
1968 T template <class charT>
1969 class collate : public locale::facet {
1971 T typedef charT char_type;
1972 T typedef basic_string<charT> string_type;
1973 T explicit collate(size_t refs = 0);
1974 T int compare(const charT* low1, const charT* high1,
1975 const charT* low2, const charT* high2) const;
1976 T string_type transform(const charT* low, const charT* high) const;
1977 T long hash(const charT* low, const charT* high) const;
1978 T static locale::id id;
1980 T ~collate(); // virtual
1981 T virtual int do_compare(const charT* low1, const charT* high1,
1982 const charT* low2, const charT* high2) const;
1983 T virtual string_type do_transform
1984 (const charT* low, const charT* high) const;
1985 T virtual long do_hash (const charT* low, const charT* high) const;
1989 22.2.4.2 Template class [lib.locale.collate.byname]
1992 X template <class charT>
1993 class collate_byname : public collate<charT> {
1995 T typedef basic_string<charT> string_type;
1996 T explicit collate_byname(const char*, size_t refs = 0);
1998 S ~collate_byname(); // virtual
1999 S virtual int do_compare(const charT* low1, const charT* high1,
2000 const charT* low2, const charT* high2) const;
2001 S virtual string_type do_transform
2002 (const charT* low, const charT* high) const;
2003 S virtual long do_hash (const charT* low, const charT* high) const;
2007 22.2.5.1 Template class time_get [lib.locale.time.get]
2011 T enum dateorder { no_order, dmy, mdy, ymd, ydm };
2014 [Note: semantics of time_get members are implementation-defined.
2015 To complete implementation requires documenting behavior.]
2017 X template <class charT, class InputIterator = istreambuf_iterator<charT> >
2018 class time_get : public locale::facet, public time_base {
2020 T typedef charT char_type;
2021 T typedef InputIterator iter_type;
2022 T explicit time_get(size_t refs = 0);
2024 T dateorder date_order() const { return do_date_order(); }
2025 T iter_type get_time(iter_type s, iter_type end, ios_base& f,
2026 ios_base::iostate& err, tm* t) const;
2027 T iter_type get_date(iter_type s, iter_type end, ios_base& f,
2028 ios_base::iostate& err, tm* t) const;
2029 T iter_type get_weekday(iter_type s, iter_type end, ios_base& f,
2030 ios_base::iostate& err, tm* t) const;
2031 T iter_type get_monthname(iter_type s, iter_type end, ios_base& f,
2032 ios_base::iostate& err, tm* t) const;
2033 T iter_type get_year(iter_type s, iter_type end, ios_base& f,
2034 ios_base::iostate& err, tm* t) const;
2035 T static locale::id id;
2037 ~time_get(); // virtual
2038 X virtual dateorder do_date_order() const;
2039 S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
2040 ios_base::iostate& err, tm* t) const;
2041 S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
2042 ios_base::iostate& err, tm* t) const;
2043 S virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
2044 ios_base::iostate& err, tm* t) const;
2045 S virtual iter_type do_get_monthname(iter_type s, ios_base&,
2046 ios_base::iostate& err, tm* t) const;
2047 S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
2048 ios_base::iostate& err, tm* t) const;
2053 22.2.5.2 Template class [lib.locale.time.get.byname]
2056 X template <class charT, class InputIterator = istreambuf_iterator<charT> >
2057 class time_get_byname : public time_get<charT, InputIterator> {
2059 T typedef time_base::dateorder dateorder;
2060 T typedef InputIterator iter_type
2062 S explicit time_get_byname(const char*, size_t refs = 0);
2064 S ~time_get_byname(); // virtual
2065 S virtual dateorder do_date_order() const;
2066 S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
2067 ios_base::iostate& err, tm* t) const;
2068 S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
2069 ios_base::iostate& err, tm* t) const;
2070 T virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
2071 ios_base::iostate& err, tm* t) const;
2072 T virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&,
2073 ios_base::iostate& err, tm* t) const;
2074 S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
2075 ios_base::iostate& err, tm* t) const;
2079 22.2.5.3 Template class time_put [lib.locale.time.put]
2081 X template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
2082 class time_put : public locale::facet {
2084 T typedef charT char_type;
2085 T typedef OutputIterator iter_type;
2086 T explicit time_put(size_t refs = 0);
2087 // the following is implemented in terms of other member functions.
2088 S iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
2089 const charT* pattern, const charT* pat_end) const;
2090 T iter_type put(iter_type s, ios_base& f, char_type fill,
2091 const tm* tmb, char format, char modifier = 0) const;
2092 T static locale::id id;
2094 T ~time_put(); // virtual
2095 S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
2096 char format, char modifier) const;
2101 22.2.5.4 Template class [lib.locale.time.put.byname]
2104 T template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
2105 class time_put_byname : public time_put<charT, OutputIterator>
2108 T typedef charT char_type;
2109 T typedef OutputIterator iter_type;
2111 T explicit time_put_byname(const char*, size_t refs = 0);
2113 T ~time_put_byname(); // virtual
2114 S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
2115 char format, char modifier) const;
2119 22.2.6.1 Template class money_get [lib.locale.money.get]
2121 X template <class charT,
2122 class InputIterator = istreambuf_iterator<charT> >
2123 class money_get : public locale::facet {
2125 T typedef charT char_type;
2126 T typedef InputIterator iter_type;
2127 T typedef basic_string<charT> string_type;
2128 T explicit money_get(size_t refs = 0);
2129 T iter_type get(iter_type s, iter_type end, bool intl,
2130 ios_base& f, ios_base::iostate& err,
2131 long double& units) const;
2132 T iter_type get(iter_type s, iter_type end, bool intl,
2133 ios_base& f, ios_base::iostate& err,
2134 string_type& digits) const;
2135 T static locale::id id;
2137 T ~money_get(); // virtual
2138 S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
2139 ios_base::iostate& err, long double& units) const;
2140 S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
2141 ios_base::iostate& err, string_type& digits) const;
2144 22.2.6.2 Template class money_put [lib.locale.money.put]
2146 X template <class charT,
2147 class OutputIterator = ostreambuf_iterator<charT> >
2148 class money_put : public locale::facet {
2150 T typedef charT char_type;
2151 T typedef OutputIterator iter_type;
2152 T typedef basic_string<charT> string_type;
2153 T explicit money_put(size_t refs = 0);
2154 T iter_type put(iter_type s, bool intl, ios_base& f,
2155 char_type fill, long double units) const;
2156 T iter_type put(iter_type s, bool intl, ios_base& f,
2157 char_type fill, const string_type& digits) const;
2158 T static locale::id id;
2161 T ~money_put(); // virtual
2163 do_put(iter_type, bool, ios_base&, char_type fill,
2164 long double units) const;
2166 do_put(iter_type, bool, ios_base&, char_type fill,
2167 const string_type& digits) const;
2171 22.2.6.3 Template class moneypunct [lib.locale.moneypunct]
2173 T class money_base {
2175 T enum part { none, space, symbol, sign, value };
2176 T struct pattern { char field[4]; };
2179 X template <class charT, bool International = false>
2180 class moneypunct : public locale::facet, public money_base {
2182 T typedef charT char_type;
2183 T typedef basic_string<charT> string_type;
2184 T explicit moneypunct(size_t refs = 0);
2185 T charT decimal_point() const;
2186 T charT thousands_sep() const;
2187 T string grouping() const;
2188 T string_type curr_symbol() const;
2189 T string_type positive_sign() const;
2190 T string_type negative_sign() const;
2191 T int frac_digits() const;
2192 T pattern pos_format() const;
2193 T pattern neg_format() const;
2194 T static locale::id id;
2195 T static const bool intl = International;
2197 T ~moneypunct(); // virtual
2198 S virtual charT do_decimal_point() const;
2199 S virtual charT do_thousands_sep() const;
2200 S virtual string do_grouping() const;
2201 S virtual string_type do_curr_symbol() const;
2202 S virtual string_type do_positive_sign() const;
2203 S virtual string_type do_negative_sign() const;
2204 S virtual int do_frac_digits() const;
2205 T virtual pattern do_pos_format() const;
2206 T virtual pattern do_neg_format() const;
2210 22.2.6.4 Template class [lib.locale.moneypunct.byname]
2213 X template <class charT, bool Intl = false>
2214 class moneypunct_byname : public moneypunct<charT, Intl> {
2216 T typedef money_base::pattern pattern;
2217 T typedef basic_string<charT> string_type;
2219 T explicit moneypunct_byname(const char*, size_t refs = 0);
2221 T ~moneypunct_byname(); // virtual
2222 S virtual charT do_decimal_point() const;
2223 S virtual charT do_thousands_sep() const;
2224 S virtual string do_grouping() const;
2225 S virtual string_type do_curr_symbol() const;
2226 S virtual string_type do_positive_sign() const;
2227 S virtual string_type do_negative_sign() const;
2228 S virtual int do_frac_digits() const;
2229 S virtual pattern do_pos_format() const;
2230 S virtual pattern do_neg_format() const;
2233 22.2.7.1 Template class messages [lib.locale.messages]
2235 T class messages_base {
2237 T typedef int catalog;
2240 X template <class charT>
2241 class messages : public locale::facet, public messages_base {
2243 T typedef charT char_type;
2244 T typedef basic_string<charT> string_type;
2245 T explicit messages(size_t refs = 0);
2246 T catalog open(const basic_string<char>& fn, const locale&) const;
2247 T string_type get(catalog c, int set, int msgid,
2248 const string_type& dfault) const;
2249 T void close(catalog c) const;
2250 T static locale::id id;
2252 T ~messages(); // virtual
2253 S virtual catalog do_open(const basic_string<char>&, const locale&) const;
2254 S virtual string_type do_get(catalog, int set, int msgid,
2255 const string_type& dfault) const;
2256 S virtual void do_close(catalog) const;
2259 22.2.7.2 Template class [lib.locale.messages.byname]
2263 X template <class charT>
2264 class messages_byname : public messages<charT> {
2266 T typedef messages_base::catalog catalog;
2267 T typedef basic_string<charT> string_type;
2269 T explicit messages_byname(const char*, size_t refs = 0);
2271 T ~messages_byname(); // virtual
2272 S virtual catalog do_open(const basic_string<char>&, const locale&) const;
2273 S virtual string_type do_get(catalog, int set, int msgid,
2274 const string_type& dfault) const;
2275 S virtual void do_close(catalog) const;
2279 22.3 C Library Locales [lib.c.locales]
2282 Table 13--Header <clocale> synopsis
2284 X LC_ALL LC_COLLATE LC_CTYPE
2285 X LC_MONETARY LC_NUMERIC LC_TIME
2288 X Functions: localeconv setlocale
2291 23.2 Sequences [lib.sequences]
2293 <deque>, <list>, <queue>, <stack>, and <vector>.
2295 Header <deque> synopsis
2297 T template <class T, class Allocator = allocator<T> > class deque;
2298 T template <class T, class Allocator>
2299 bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2300 T template <class T, class Allocator>
2301 bool operator< (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2302 T template <class T, class Allocator>
2303 bool operator!=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2304 T template <class T, class Allocator>
2305 bool operator> (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2306 T template <class T, class Allocator>
2307 bool operator>=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2308 T template <class T, class Allocator>
2309 bool operator<=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2310 T template <class T, class Allocator>
2311 void swap(deque<T,Allocator>& x, deque<T,Allocator>& y);
2314 Header <list> synopsis
2316 T template <class T, class Allocator = allocator<T> > class list;
2317 T template <class T, class Allocator>
2318 bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
2319 T template <class T, class Allocator>
2320 bool operator< (const list<T,Allocator>& x, const list<T,Allocator>& y);
2321 T template <class T, class Allocator>
2322 bool operator!=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2323 T template <class T, class Allocator>
2324 bool operator> (const list<T,Allocator>& x, const list<T,Allocator>& y);
2325 T template <class T, class Allocator>
2326 bool operator>=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2327 T template <class T, class Allocator>
2328 bool operator<=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2329 T template <class T, class Allocator>
2330 void swap(list<T,Allocator>& x, list<T,Allocator>& y);
2333 Header <queue> synopsis
2336 T template <class T, class Container = deque<T> > class queue;
2337 T template <class T, class Container>
2338 bool operator==(const queue<T, Container>& x,
2339 const queue<T, Container>& y);
2340 T template <class T, class Container>
2341 bool operator< (const queue<T, Container>& x,
2342 const queue<T, Container>& y);
2343 T template <class T, class Container>
2344 bool operator!=(const queue<T, Container>& x,
2345 const queue<T, Container>& y);
2346 T template <class T, class Container>
2347 bool operator> (const queue<T, Container>& x,
2348 const queue<T, Container>& y);
2349 T template <class T, class Container>
2350 bool operator>=(const queue<T, Container>& x,
2351 const queue<T, Container>& y);
2352 T template <class T, class Container>
2353 bool operator<=(const queue<T, Container>& x,
2354 const queue<T, Container>& y);
2355 T template <class T, class Container = vector<T>,
2356 class Compare = less<typename Container::value_type> >
2357 T class priority_queue;
2360 Header <stack> synopsis
2363 T template <class T, class Container = deque<T> > class stack;
2364 T template <class T, class Container>
2365 bool operator==(const stack<T, Container>& x,
2366 const stack<T, Container>& y);
2367 T template <class T, class Container>
2368 bool operator< (const stack<T, Container>& x,
2369 const stack<T, Container>& y);
2370 T template <class T, class Container>
2371 bool operator!=(const stack<T, Container>& x,
2372 const stack<T, Container>& y);
2373 T template <class T, class Container>
2374 bool operator> (const stack<T, Container>& x,
2375 const stack<T, Container>& y);
2376 T template <class T, class Container>
2377 bool operator>=(const stack<T, Container>& x,
2378 const stack<T, Container>& y);
2379 T template <class T, class Container>
2380 bool operator<=(const stack<T, Container>& x,
2381 const stack<T, Container>& y);
2384 Header <vector> synopsis
2386 T template <class T, class Allocator = allocator<T> > class vector;
2388 T template <class T, class Allocator>
2389 bool operator==(const vector<T,Allocator>& x,
2390 const vector<T,Allocator>& y);
2391 T template <class T, class Allocator>
2392 bool operator< (const vector<T,Allocator>& x,
2393 const vector<T,Allocator>& y);
2394 T template <class T, class Allocator>
2395 bool operator!=(const vector<T,Allocator>& x,
2396 const vector<T,Allocator>& y);
2397 T template <class T, class Allocator>
2398 bool operator> (const vector<T,Allocator>& x,
2399 const vector<T,Allocator>& y);
2400 T template <class T, class Allocator>
2401 bool operator>=(const vector<T,Allocator>& x,
2402 const vector<T,Allocator>& y);
2403 T template <class T, class Allocator>
2404 bool operator<=(const vector<T,Allocator>& x,
2405 const vector<T,Allocator>& y);
2406 T template <class T, class Allocator>
2407 void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);
2409 T template <class Allocator> class vector<bool,Allocator>;
2410 T template <class Allocator>
2411 bool operator==(const vector<bool,Allocator>& x,
2412 const vector<bool,Allocator>& y);
2413 T template <class Allocator>
2414 bool operator< (const vector<bool,Allocator>& x,
2415 const vector<bool,Allocator>& y);
2416 T template <class Allocator>
2417 bool operator!=(const vector<bool,Allocator>& x,
2418 const vector<bool,Allocator>& y);
2419 T template <class Allocator>
2420 bool operator> (const vector<bool,Allocator>& x,
2421 const vector<bool,Allocator>& y);
2422 T template <class Allocator>
2423 bool operator>=(const vector<bool,Allocator>& x,
2424 const vector<bool,Allocator>& y);
2425 T template <class Allocator>
2426 bool operator<=(const vector<bool,Allocator>& x,
2427 const vector<bool,Allocator>& y);
2428 T template <class Allocator>
2429 void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);
2432 23.2.1 Template class deque [lib.deque]
2434 template <class T, class Allocator = allocator<T> >
2438 T typedef typename Allocator::reference reference;
2439 T typedef typename Allocator::const_reference const_reference;
2440 T typedef implementation defined iterator;
2441 T typedef implementation defined const_iterator;
2442 T typedef implementation defined size_type;
2443 T typedef implementation defined difference_type;
2444 T typedef T value_type;
2445 T typedef Allocator allocator_type;
2446 T typedef typename Allocator::pointer pointer;
2447 T typedef typename Allocator::const_pointer const_pointer;
2448 T typedef std::reverse_iterator<iterator> reverse_iterator;
2449 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2450 // _lib.deque.cons_ construct/copy/destroy:
2451 T explicit deque(const Allocator& = Allocator());
2452 T explicit deque(size_type n, const T& value = T(),
2453 const Allocator& = Allocator());
2454 T template <class InputIterator>
2455 deque(InputIterator first, InputIterator last,
2456 const Allocator& = Allocator());
2457 T deque(const deque<T,Allocator>& x);
2459 T deque<T,Allocator>& operator=(const deque<T,Allocator>& x);
2460 T template <class InputIterator>
2461 void assign(InputIterator first, InputIterator last);
2462 T void assign(size_type n, const T& t);
2463 T allocator_type get_allocator() const;
2466 T const_iterator begin() const;
2468 T const_iterator end() const;
2469 T reverse_iterator rbegin();
2470 T const_reverse_iterator rbegin() const;
2471 T reverse_iterator rend();
2472 T const_reverse_iterator rend() const;
2473 // _lib.deque.capacity_ capacity:
2474 T size_type size() const;
2475 T size_type max_size() const;
2476 T void resize(size_type sz, T c = T());
2477 T bool empty() const;
2480 T reference operator[](size_type n);
2481 T const_reference operator[](size_type n) const;
2482 T reference at(size_type n);
2483 T const_reference at(size_type n) const;
2484 T reference front();
2485 T const_reference front() const;
2487 T const_reference back() const;
2488 // _lib.deque.modifiers_ modifiers:
2489 T void push_front(const T& x);
2490 T void push_back(const T& x);
2491 T iterator insert(iterator position, const T& x);
2492 T void insert(iterator position, size_type n, const T& x);
2493 T template <class InputIterator>
2494 void insert (iterator position,
2495 InputIterator first, InputIterator last);
2498 T iterator erase(iterator position);
2499 T iterator erase(iterator first, iterator last);
2500 T void swap(deque<T,Allocator>&);
2503 T template <class T, class Allocator>
2504 bool operator==(const deque<T,Allocator>& x,
2505 const deque<T,Allocator>& y);
2506 T template <class T, class Allocator>
2507 bool operator< (const deque<T,Allocator>& x,
2508 const deque<T,Allocator>& y);
2509 T template <class T, class Allocator>
2510 bool operator!=(const deque<T,Allocator>& x,
2511 const deque<T,Allocator>& y);
2512 T template <class T, class Allocator>
2513 bool operator> (const deque<T,Allocator>& x,
2514 const deque<T,Allocator>& y);
2515 T template <class T, class Allocator>
2516 bool operator>=(const deque<T,Allocator>& x,
2517 const deque<T,Allocator>& y);
2518 T template <class T, class Allocator>
2519 bool operator<=(const deque<T,Allocator>& x,
2520 const deque<T,Allocator>& y);
2521 // specialized algorithms:
2522 T template <class T, class Allocator>
2523 void swap(deque<T,Allocator>& x, deque<T,Allocator>& y);
2526 23.2.2 Template class list [lib.list]
2528 T template <class T, class Allocator = allocator<T> >
2532 T typedef typename Allocator::reference reference;
2533 T typedef typename Allocator::const_reference const_reference;
2534 T typedef implementation defined iterator;
2535 T typedef implementation defined const_iterator;
2536 T typedef implementation defined size_type;
2537 T typedef implementation defined difference_type;
2538 T typedef T value_type;
2539 T typedef Allocator allocator_type;
2540 T typedef typename Allocator::pointer pointer;
2541 T typedef typename Allocator::const_pointer const_pointer;
2542 T typedef std::reverse_iterator<iterator> reverse_iterator;
2543 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2545 // _lib.list.cons_ construct/copy/destroy:
2546 T explicit list(const Allocator& = Allocator());
2547 T explicit list(size_type n, const T& value = T(),
2548 const Allocator& = Allocator());
2549 T template <class InputIterator>
2550 list(InputIterator first, InputIterator last,
2551 const Allocator& = Allocator());
2552 T list(const list<T,Allocator>& x);
2554 T list<T,Allocator>& operator=(const list<T,Allocator>& x);
2555 T template <class InputIterator>
2556 void assign(InputIterator first, InputIterator last);
2557 T void assign(size_type n, const T& t);
2558 T allocator_type get_allocator() const;
2561 T const_iterator begin() const;
2563 T const_iterator end() const;
2564 T reverse_iterator rbegin();
2565 T const_reverse_iterator rbegin() const;
2566 T reverse_iterator rend();
2567 T const_reverse_iterator rend() const;
2568 // _lib.list.capacity_ capacity:
2569 T bool empty() const;
2570 T size_type size() const;
2571 T size_type max_size() const;
2572 T void resize(size_type sz, T c = T());
2574 T reference front();
2575 T const_reference front() const;
2577 T const_reference back() const;
2578 // _lib.list.modifiers_ modifiers:
2579 T void push_front(const T& x);
2581 T void push_back(const T& x);
2583 T iterator insert(iterator position, const T& x);
2584 T void insert(iterator position, size_type n, const T& x);
2585 T template <class InputIterator>
2586 void insert(iterator position, InputIterator first,
2587 InputIterator last);
2588 T iterator erase(iterator position);
2589 T iterator erase(iterator position, iterator last);
2590 T void swap(list<T,Allocator>&);
2592 // _lib.list.ops_ list operations:
2593 T void splice(iterator position, list<T,Allocator>& x);
2594 T void splice(iterator position, list<T,Allocator>& x, iterator i);
2595 T void splice(iterator position, list<T,Allocator>& x, iterator first,
2597 T void remove(const T& value);
2598 T template <class Predicate> void remove_if(Predicate pred);
2601 T template <class BinaryPredicate>
2602 void unique(BinaryPredicate binary_pred);
2603 T void merge(list<T,Allocator>& x);
2604 T template <class Compare> void merge(list<T,Allocator>& x, Compare comp);
2606 T template <class Compare> void sort(Compare comp);
2609 T template <class T, class Allocator>
2610 bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
2611 T template <class T, class Allocator>
2612 bool operator< (const list<T,Allocator>& x, const list<T,Allocator>& y);
2613 T template <class T, class Allocator>
2614 bool operator!=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2615 T template <class T, class Allocator>
2616 bool operator> (const list<T,Allocator>& x, const list<T,Allocator>& y);
2617 T template <class T, class Allocator>
2618 bool operator>=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2619 T template <class T, class Allocator>
2620 bool operator<=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2621 // specialized algorithms:
2622 T template <class T, class Allocator>
2623 void swap(list<T,Allocator>& x, list<T,Allocator>& y);
2626 23.2.3.1 Template class queue [lib.queue]
2628 T template <class T, class Container = deque<T> >
2631 T typedef typename Container::value_type value_type;
2632 T typedef typename Container::size_type size_type;
2633 T typedef Container container_type;
2637 T explicit queue(const Container& = Container());
2639 T bool empty() const { return c.empty(); }
2640 T size_type size() const { return c.size(); }
2641 T value_type& front() { return c.front(); }
2642 T const value_type& front() const { return c.front(); }
2643 T value_type& back() { return c.back(); }
2644 T const value_type& back() const { return c.back(); }
2645 T void push(const value_type& x) { c.push_back(x); }
2646 T void pop() { c.pop_front(); }
2649 T template <class T, class Container>
2650 bool operator==(const queue<T, Container>& x,
2651 const queue<T, Container>& y);
2652 T template <class T, class Container>
2653 bool operator< (const queue<T, Container>& x,
2654 const queue<T, Container>& y);
2655 T template <class T, class Container>
2656 bool operator!=(const queue<T, Container>& x,
2657 const queue<T, Container>& y);
2658 T template <class T, class Container>
2659 bool operator> (const queue<T, Container>& x,
2660 const queue<T, Container>& y);
2661 T template <class T, class Container>
2662 bool operator>=(const queue<T, Container>& x,
2663 const queue<T, Container>& y);
2664 T template <class T, class Container>
2665 bool operator<=(const queue<T, Container>& x,
2666 const queue<T, Container>& y);
2668 23.2.3.2 Template class priority_queue [lib.priority.queue]
2670 T template <class T, class Container = vector<T>,
2671 class Compare = less<typename Container::value_type> >
2672 class priority_queue {
2674 T typedef typename Container::value_type value_type;
2675 T typedef typename Container::size_type size_type;
2676 T typedef Container container_type;
2681 T explicit priority_queue(const Compare& x = Compare(),
2682 const Container& = Container());
2683 T template <class InputIterator>
2684 priority_queue(InputIterator first, InputIterator last,
2685 const Compare& x = Compare(),
2686 const Container& = Container());
2688 T bool empty() const { return c.empty(); }
2689 T size_type size() const { return c.size(); }
2690 T const value_type& top() const { return c.front(); }
2691 T void push(const value_type& x);
2695 23.2.3.3 Template class stack [lib.stack]
2697 T template <class T, class Container = deque<T> >
2700 T typedef typename Container::value_type value_type;
2701 T typedef typename Container::size_type size_type;
2702 T typedef Container container_type;
2706 T explicit stack(const Container& = Container());
2708 T bool empty() const { return c.empty(); }
2709 T size_type size() const { return c.size(); }
2710 T value_type& top() { return c.back(); }
2711 T const value_type& top() const { return c.back(); }
2712 T void push(const value_type& x) { c.push_back(x); }
2713 T void pop() { c.pop_back(); }
2715 T template <class T, class Container>
2716 bool operator==(const stack<T, Container>& x,
2717 const stack<T, Container>& y);
2718 T template <class T, class Container>
2719 bool operator< (const stack<T, Container>& x,
2720 const stack<T, Container>& y);
2721 T template <class T, class Container>
2722 bool operator!=(const stack<T, Container>& x,
2723 const stack<T, Container>& y);
2724 T template <class T, class Container>
2725 bool operator> (const stack<T, Container>& x,
2726 const stack<T, Container>& y);
2727 T template <class T, class Container>
2728 bool operator>=(const stack<T, Container>& x,
2729 const stack<T, Container>& y);
2730 T template <class T, class Container>
2731 bool operator<=(const stack<T, Container>& x,
2732 const stack<T, Container>& y);
2734 23.2.4 Template class vector [lib.vector]
2736 template <class T, class Allocator = allocator<T> >
2740 T typedef typename Allocator::reference reference;
2741 T typedef typename Allocator::const_reference const_reference;
2742 T typedef implementation defined iterator;
2743 T typedef implementation defined const_iterator;
2744 T typedef implementation defined size_type;
2745 T typedef implementation defined difference_type;
2746 T typedef T value_type;
2747 T typedef Allocator allocator_type;
2748 T typedef typename Allocator::pointer pointer;
2749 T typedef typename Allocator::const_pointer const_pointer
2750 T typedef std::reverse_iterator<iterator> reverse_iterator;
2751 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2752 // _lib.vector.cons_ construct/copy/destroy:
2753 T explicit vector(const Allocator& = Allocator());
2754 T explicit vector(size_type n, const T& value = T(),
2755 const Allocator& = Allocator());
2756 T template <class InputIterator>
2757 vector(InputIterator first, InputIterator last,
2758 const Allocator& = Allocator());
2759 T vector(const vector<T,Allocator>& x);
2761 T vector<T,Allocator>& operator=(const vector<T,Allocator>& x);
2762 T template <class InputIterator>
2763 void assign(InputIterator first, InputIterator last);
2764 T void assign(size_type n, const T& u);
2765 T allocator_type get_allocator() const;
2768 T const_iterator begin() const;
2770 T const_iterator end() const;
2771 T reverse_iterator rbegin();
2772 T const_reverse_iterator rbegin() const;
2773 T reverse_iterator rend();
2774 T const_reverse_iterator rend() const;
2775 // _lib.vector.capacity_ capacity:
2776 T size_type size() const;
2777 T size_type max_size() const;
2778 T void resize(size_type sz, T c = T());
2779 T size_type capacity() const;
2780 T bool empty() const;
2781 T void reserve(size_type n);
2784 T reference operator[](size_type n);
2785 T const_reference operator[](size_type n) const;
2786 T const_reference at(size_type n) const;
2787 T reference at(size_type n);
2788 T reference front();
2789 T const_reference front() const;
2791 T const_reference back() const;
2792 // _lib.vector.modifiers_ modifiers:
2793 T void push_back(const T& x);
2795 T iterator insert(iterator position, const T& x);
2796 T void insert(iterator position, size_type n, const T& x);
2797 T template <class InputIterator>
2798 void insert(iterator position,
2799 InputIterator first, InputIterator last);
2800 T iterator erase(iterator position);
2801 T iterator erase(iterator first, iterator last);
2802 T void swap(vector<T,Allocator>&);
2806 T template <class T, class Allocator>
2807 bool operator==(const vector<T,Allocator>& x,
2808 const vector<T,Allocator>& y);
2809 T template <class T, class Allocator>
2810 bool operator< (const vector<T,Allocator>& x,
2811 const vector<T,Allocator>& y);
2812 T template <class T, class Allocator>
2813 bool operator!=(const vector<T,Allocator>& x,
2814 const vector<T,Allocator>& y);
2815 T template <class T, class Allocator>
2816 bool operator> (const vector<T,Allocator>& x,
2817 const vector<T,Allocator>& y);
2818 T template <class T, class Allocator>
2819 bool operator>=(const vector<T,Allocator>& x,
2820 const vector<T,Allocator>& y);
2821 T template <class T, class Allocator>
2822 bool operator<=(const vector<T,Allocator>& x,
2823 const vector<T,Allocator>& y);
2824 // specialized algorithms:
2825 T template <class T, class Allocator>
2826 void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);
2829 23.2.5 Class vector<bool> [lib.vector.bool]
2831 T template <class Allocator> class vector<bool, Allocator> {
2834 T typedef bool const_reference;
2835 T typedef implementation defined iterator;
2836 T typedef implementation defined const_iterator;
2837 T typedef implementation defined size_type;
2838 T typedef implementation defined difference_type;
2839 T typedef bool value_type;
2840 T typedef Allocator allocator_type;
2841 T typedef implementation defined pointer;
2842 T typedef implementation defined const_pointer
2843 T typedef std::reverse_iterator<iterator> reverse_iterator;
2844 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2847 friend class vector;
2851 T operator bool() const;
2852 T reference& operator=(const bool x);
2853 T reference& operator=(const reference& x);
2854 T void flip(); // flips the bit
2857 // construct/copy/destroy:
2858 T explicit vector(const Allocator& = Allocator());
2859 T explicit vector(size_type n, const bool& value = bool(),
2860 const Allocator& = Allocator());
2861 T template <class InputIterator>
2862 vector(InputIterator first, InputIterator last,
2863 const Allocator& = Allocator());
2864 T vector(const vector<bool,Allocator>& x);
2866 T vector<bool,Allocator>& operator=(const vector<bool,Allocator>& x);
2867 T template <class InputIterator>
2868 void assign(InputIterator first, InputIterator last);
2869 T void assign(size_type n, const T& t);
2870 T allocator_type get_allocator() const;
2873 T const_iterator begin() const;
2875 T const_iterator end() const;
2876 T reverse_iterator rbegin();
2877 T const_reverse_iterator rbegin() const;
2878 T reverse_iterator rend();
2879 T const_reverse_iterator rend() const;
2881 T size_type size() const;
2882 T size_type max_size() const;
2883 T void resize(size_type sz, bool c = false);
2884 T size_type capacity() const;
2885 T bool empty() const;
2886 T void reserve(size_type n);
2888 T reference operator[](size_type n);
2889 T const_reference operator[](size_type n) const;
2890 T const_reference at(size_type n) const;
2891 T reference at(size_type n);
2892 T reference front();
2893 T const_reference front() const;
2895 T const_reference back() const;
2897 T void push_back(const bool& x);
2899 T iterator insert(iterator position, const bool& x);
2900 T void insert (iterator position, size_type n, const bool& x);
2901 T template <class InputIterator>
2902 void insert(iterator position,
2903 InputIterator first, InputIterator last);
2904 T iterator erase(iterator position);
2905 T iterator erase(iterator first, iterator last);
2906 T void swap(vector<bool,Allocator>&);
2907 T static void swap(reference x, reference y);
2908 T void flip(); // flips all bits
2912 T template <class Allocator>
2913 bool operator==(const vector<bool,Allocator>& x,
2914 const vector<bool,Allocator>& y);
2915 T template <class Allocator>
2916 bool operator< (const vector<bool,Allocator>& x,
2917 const vector<bool,Allocator>& y);
2918 T template <class Allocator>
2919 bool operator!=(const vector<bool,Allocator>& x,
2920 const vector<bool,Allocator>& y);
2921 T template <class Allocator>
2922 bool operator> (const vector<bool,Allocator>& x,
2923 const vector<bool,Allocator>& y);
2924 T template <class Allocator>
2925 bool operator>=(const vector<bool,Allocator>& x,
2926 const vector<bool,Allocator>& y);
2927 T template <class Allocator>
2928 bool operator<=(const vector<bool,Allocator>& x,
2929 const vector<bool,Allocator>& y);
2930 // specialized algorithms:
2931 T template <class Allocator>
2932 void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);
2934 23.3 Associative containers [lib.associative]
2936 <map> and <set>:
2938 Header <map> synopsis
2940 template <class Key, class T, class Compare = less<Key>,
2941 class Allocator = allocator<pair<const Key, T> > >
2944 T template <class Key, class T, class Compare, class Allocator>
2945 bool operator==(const map<Key,T,Compare,Allocator>& x,
2946 const map<Key,T,Compare,Allocator>& y);
2947 T template <class Key, class T, class Compare, class Allocator>
2948 bool operator< (const map<Key,T,Compare,Allocator>& x,
2949 const map<Key,T,Compare,Allocator>& y);
2950 T template <class Key, class T, class Compare, class Allocator>
2951 bool operator!=(const map<Key,T,Compare,Allocator>& x,
2952 const map<Key,T,Compare,Allocator>& y);
2953 T template <class Key, class T, class Compare, class Allocator>
2954 bool operator> (const map<Key,T,Compare,Allocator>& x,
2955 const map<Key,T,Compare,Allocator>& y);
2956 T template <class Key, class T, class Compare, class Allocator>
2957 bool operator>=(const map<Key,T,Compare,Allocator>& x,
2958 const map<Key,T,Compare,Allocator>& y);
2959 T template <class Key, class T, class Compare, class Allocator>
2960 bool operator<=(const map<Key,T,Compare,Allocator>& x,
2961 const map<Key,T,Compare,Allocator>& y);
2962 T template <class Key, class T, class Compare, class Allocator>
2963 void swap(map<Key,T,Compare,Allocator>& x,
2964 map<Key,T,Compare,Allocator>& y);
2965 T template <class Key, class T, class Compare = less<Key>,
2966 class Allocator = allocator<pair<const Key, T> > >
2968 T template <class Key, class T, class Compare, class Allocator>
2969 bool operator==(const multimap<Key,T,Compare,Allocator>& x,
2970 const multimap<Key,T,Compare,Allocator>& y);
2971 T template <class Key, class T, class Compare, class Allocator>
2972 bool operator< (const multimap<Key,T,Compare,Allocator>& x,
2973 const multimap<Key,T,Compare,Allocator>& y);
2974 T template <class Key, class T, class Compare, class Allocator>
2975 bool operator!=(const multimap<Key,T,Compare,Allocator>& x,
2976 const multimap<Key,T,Compare,Allocator>& y);
2977 T template <class Key, class T, class Compare, class Allocator>
2978 bool operator> (const multimap<Key,T,Compare,Allocator>& x,
2979 const multimap<Key,T,Compare,Allocator>& y);
2980 T template <class Key, class T, class Compare, class Allocator>
2981 bool operator>=(const multimap<Key,T,Compare,Allocator>& x,
2982 const multimap<Key,T,Compare,Allocator>& y);
2983 T template <class Key, class T, class Compare, class Allocator>
2984 bool operator<=(const multimap<Key,T,Compare,Allocator>& x,
2985 const multimap<Key,T,Compare,Allocator>& y);
2986 T template <class Key, class T, class Compare, class Allocator>
2987 void swap(multimap<Key,T,Compare,Allocator>& x,
2988 multimap<Key,T,Compare,Allocator>& y);
2991 Header <set> synopsis
2993 template <class Key, class Compare = less<Key>,
2994 class Allocator = allocator<Key> >
2997 T template <class Key, class Compare, class Allocator>
2998 bool operator==(const set<Key,Compare,Allocator>& x,
2999 const set<Key,Compare,Allocator>& y);
3000 T template <class Key, class Compare, class Allocator>
3001 bool operator< (const set<Key,Compare,Allocator>& x,
3002 const set<Key,Compare,Allocator>& y);
3003 T template <class Key, class Compare, class Allocator>
3004 bool operator!=(const set<Key,Compare,Allocator>& x,
3005 const set<Key,Compare,Allocator>& y);
3006 T template <class Key, class Compare, class Allocator>
3007 bool operator> (const set<Key,Compare,Allocator>& x,
3008 const set<Key,Compare,Allocator>& y);
3009 T template <class Key, class Compare, class Allocator>
3010 bool operator>=(const set<Key,Compare,Allocator>& x,
3011 const set<Key,Compare,Allocator>& y);
3012 T template <class Key, class Compare, class Allocator>
3013 bool operator<=(const set<Key,Compare,Allocator>& x,
3014 const set<Key,Compare,Allocator>& y);
3015 T template <class Key, class Compare, class Allocator>
3016 void swap(set<Key,Compare,Allocator>& x,
3017 set<Key,Compare,Allocator>& y);
3018 T template <class Key, class Compare = less<Key>,
3019 class Allocator = allocator<Key> >
3021 T template <class Key, class Compare, class Allocator>
3022 bool operator==(const multiset<Key,Compare,Allocator>& x,
3023 const multiset<Key,Compare,Allocator>& y);
3024 T template <class Key, class Compare, class Allocator>
3025 bool operator< (const multiset<Key,Compare,Allocator>& x,
3026 const multiset<Key,Compare,Allocator>& y);
3027 T template <class Key, class Compare, class Allocator>
3028 bool operator!=(const multiset<Key,Compare,Allocator>& x,
3029 const multiset<Key,Compare,Allocator>& y);
3030 T template <class Key, class Compare, class Allocator>
3031 bool operator> (const multiset<Key,Compare,Allocator>& x,
3032 const multiset<Key,Compare,Allocator>& y);
3033 T template <class Key, class Compare, class Allocator>
3034 bool operator>=(const multiset<Key,Compare,Allocator>& x,
3035 const multiset<Key,Compare,Allocator>& y);
3036 T template <class Key, class Compare, class Allocator>
3037 bool operator<=(const multiset<Key,Compare,Allocator>& x,
3038 const multiset<Key,Compare,Allocator>& y);
3039 T template <class Key, class Compare, class Allocator>
3040 void swap(multiset<Key,Compare,Allocator>& x,
3041 multiset<Key,Compare,Allocator>& y);
3044 23.3.1 Template class map [lib.map]
3046 template <class Key, class T, class Compare = less<Key>,
3047 class Allocator = allocator<pair<const Key, T> > >
3051 T typedef Key key_type;
3052 T typedef T mapped_type;
3053 T typedef pair<const Key, T> value_type;
3054 T typedef Compare key_compare;
3055 T typedef Allocator allocator_type;
3056 T typedef typename Allocator::reference reference;
3057 T typedef typename Allocator::const_reference const_reference;
3058 T typedef implementation defined iterator;
3059 T typedef implementation defined const_iterator;
3060 T typedef implementation defined size_type;
3061 T typedef implementation defined difference_type;
3062 T typedef typename Allocator::pointer pointer;
3063 T typedef typename Allocator::const_pointer const_pointer;
3064 T typedef std::reverse_iterator<iterator> reverse_iterator;
3065 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3066 T class value_compare
3067 : public binary_function<value_type,value_type,bool> {
3071 T value_compare(Compare c) : comp(c) {}
3073 T bool operator()(const value_type& x, const value_type& y) const {
3074 return comp(x.first, y.first);
3078 // _lib.map.cons_ construct/copy/destroy:
3079 T explicit map(const Compare& comp = Compare(),
3080 const Allocator& = Allocator());
3081 T template <class InputIterator>
3082 map(InputIterator first, InputIterator last,
3083 const Compare& comp = Compare(), const Allocator& = Allocator());
3084 T map(const map<Key,T,Compare,Allocator>& x);
3086 T map<Key,T,Compare,Allocator>&
3087 operator=(const map<Key,T,Compare,Allocator>& x);
3090 T const_iterator begin() const;
3092 T const_iterator end() const;
3093 T reverse_iterator rbegin();
3094 T const_reverse_iterator rbegin() const;
3095 T reverse_iterator rend();
3096 T const_reverse_iterator rend() const;
3098 T bool empty() const;
3099 T size_type size() const;
3100 T size_type max_size() const;
3101 // _lib.map.access_ element access:
3102 T T& operator[](const key_type& x);
3104 T pair<iterator, bool> insert(const value_type& x);
3105 T iterator insert(iterator position, const value_type& x);
3106 T template <class InputIterator>
3107 void insert(InputIterator first, InputIterator last);
3108 T void erase(iterator position);
3109 T size_type erase(const key_type& x);
3110 T void erase(iterator first, iterator last);
3111 T void swap(map<Key,T,Compare,Allocator>&);
3114 T key_compare key_comp() const;
3115 T value_compare value_comp() const;
3116 // _lib.map.ops_ map operations:
3117 T iterator find(const key_type& x);
3118 T const_iterator find(const key_type& x) const;
3119 T size_type count(const key_type& x) const;
3120 T iterator lower_bound(const key_type& x);
3121 T const_iterator lower_bound(const key_type& x) const;
3122 T iterator upper_bound(const key_type& x);
3123 T const_iterator upper_bound(const key_type& x) const;
3124 T pair<iterator,iterator>
3125 equal_range(const key_type& x);
3126 T pair<const_iterator,const_iterator>
3127 equal_range(const key_type& x) const;
3130 T template <class Key, class T, class Compare, class Allocator>
3131 bool operator==(const map<Key,T,Compare,Allocator>& x,
3132 const map<Key,T,Compare,Allocator>& y);
3133 T template <class Key, class T, class Compare, class Allocator>
3134 bool operator< (const map<Key,T,Compare,Allocator>& x,
3135 const map<Key,T,Compare,Allocator>& y);
3136 T template <class Key, class T, class Compare, class Allocator>
3137 bool operator!=(const map<Key,T,Compare,Allocator>& x,
3138 const map<Key,T,Compare,Allocator>& y);
3139 T template <class Key, class T, class Compare, class Allocator>
3140 bool operator> (const map<Key,T,Compare,Allocator>& x,
3141 const map<Key,T,Compare,Allocator>& y);
3142 T template <class Key, class T, class Compare, class Allocator>
3143 bool operator>=(const map<Key,T,Compare,Allocator>& x,
3144 const map<Key,T,Compare,Allocator>& y);
3145 T template <class Key, class T, class Compare, class Allocator>
3146 bool operator<=(const map<Key,T,Compare,Allocator>& x,
3147 const map<Key,T,Compare,Allocator>& y);
3148 // specialized algorithms:
3149 T template <class Key, class T, class Compare, class Allocator>
3150 void swap(map<Key,T,Compare,Allocator>& x,
3151 map<Key,T,Compare,Allocator>& y);
3153 23.3.2 Template class multimap [lib.multimap]
3155 template <class Key, class T, class Compare = less<Key>,
3156 class Allocator = allocator<pair<const Key, T> > >
3160 T typedef Key key_type;
3161 T typedef T mapped_type;
3162 T typedef pair<const Key,T> value_type;
3163 T typedef Compare key_compare;
3164 T typedef Allocator allocator_type;
3165 T typedef typename Allocator::reference reference;
3166 T typedef typename Allocator::const_reference const_reference;
3167 T typedef implementation defined iterator;
3168 T typedef implementation defined const_iterator;
3169 T typedef implementation defined size_type;
3170 T typedef implementation defined difference_type
3171 T typedef typename Allocator::pointer pointer;
3172 T typedef typename Allocator::const_pointer const_pointer;
3173 T typedef std::reverse_iterator<iterator> reverse_iterator;
3174 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3175 T class value_compare
3176 : public binary_function<value_type,value_type,bool> {
3177 friend class multimap;
3180 T value_compare(Compare c) : comp(c) {}
3182 T bool operator()(const value_type& x, const value_type& y) const {
3183 return comp(x.first, y.first);
3186 // construct/copy/destroy:
3187 T explicit multimap(const Compare& comp = Compare(),
3188 const Allocator& = Allocator());
3189 T template <class InputIterator>
3190 multimap(InputIterator first, InputIterator last,
3191 const Compare& comp = Compare(),
3192 const Allocator& = Allocator());
3193 T multimap(const multimap<Key,T,Compare,Allocator>& x);
3195 T multimap<Key,T,Compare,Allocator>&
3196 operator=(const multimap<Key,T,Compare,Allocator>& x);
3197 T allocator_type get_allocator() const;
3201 T const_iterator begin() const;
3203 T const_iterator end() const;
3204 T reverse_iterator rbegin();
3205 T const_reverse_iterator rbegin() const;
3206 T reverse_iterator rend();
3207 T const_reverse_iterator rend() const;
3209 T bool empty() const;
3210 T size_type size() const;
3211 T size_type max_size() const;
3213 T iterator insert(const value_type& x);
3214 T iterator insert(iterator position, const value_type& x);
3215 T template <class InputIterator>
3216 void insert(InputIterator first, InputIterator last);
3217 T void erase(iterator position);
3218 T size_type erase(const key_type& x);
3219 T void erase(iterator first, iterator last);
3220 T void swap(multimap<Key,T,Compare,Allocator>&);
3223 T key_compare key_comp() const;
3224 T value_compare value_comp() const;
3226 T iterator find(const key_type& x);
3227 T const_iterator find(const key_type& x) const;
3228 T size_type count(const key_type& x) const;
3229 T iterator lower_bound(const key_type& x);
3230 T const_iterator lower_bound(const key_type& x) const;
3231 T iterator upper_bound(const key_type& x);
3232 T const_iterator upper_bound(const key_type& x) const;
3233 T pair<iterator,iterator> equal_range(const key_type& x);
3234 T pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
3237 T template <class Key, class T, class Compare, class Allocator>
3238 bool operator==(const multimap<Key,T,Compare,Allocator>& x,
3239 const multimap<Key,T,Compare,Allocator>& y);
3240 T template <class Key, class T, class Compare, class Allocator>
3241 bool operator< (const multimap<Key,T,Compare,Allocator>& x,
3242 const multimap<Key,T,Compare,Allocator>& y);
3243 T template <class Key, class T, class Compare, class Allocator>
3244 bool operator!=(const multimap<Key,T,Compare,Allocator>& x,
3245 const multimap<Key,T,Compare,Allocator>& y);
3246 T template <class Key, class T, class Compare, class Allocator>
3247 bool operator> (const multimap<Key,T,Compare,Allocator>& x,
3248 const multimap<Key,T,Compare,Allocator>& y);
3249 T template <class Key, class T, class Compare, class Allocator>
3250 bool operator>=(const multimap<Key,T,Compare,Allocator>& x,
3251 const multimap<Key,T,Compare,Allocator>& y);
3252 T template <class Key, class T, class Compare, class Allocator>
3253 bool operator<=(const multimap<Key,T,Compare,Allocator>& x,
3254 const multimap<Key,T,Compare,Allocator>& y);
3255 // specialized algorithms:
3256 T template <class Key, class T, class Compare, class Allocator>
3257 void swap(multimap<Key,T,Compare,Allocator>& x,
3258 multimap<Key,T,Compare,Allocator>& y);
3261 23.3.3 Template class set [lib.set]
3263 template <class Key, class Compare = less<Key>,
3264 class Allocator = allocator<Key> >
3268 T typedef Key key_type;
3269 T typedef Key value_type;
3270 T typedef Compare key_compare;
3271 T typedef Compare value_compare;
3272 T typedef Allocator allocator_type;
3273 T typedef typename Allocator::reference reference;
3274 T typedef typename Allocator::const_reference const_reference;
3275 T typedef implementation defined iterator;
3276 T typedef implementation defined const_iterator;
3277 T typedef implementation defined size_type;
3278 T typedef implementation defined difference_type;
3279 T typedef typename Allocator::pointer pointer;
3280 T typedef typename Allocator::const_pointer const_pointer;
3281 T typedef std::reverse_iterator<iterator> reverse_iterator;
3282 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3283 // _lib.set.cons_ construct/copy/destroy:
3284 T explicit set(const Compare& comp = Compare(),
3285 const Allocator& = Allocator());
3286 T template <class InputIterator>
3287 set(InputIterator first, InputIterator last,
3288 const Compare& comp = Compare(), const Allocator& = Allocator());
3289 T set(const set<Key,Compare,Allocator>& x);
3291 T set<Key,Compare,Allocator>&
3292 operator=(const set<Key,Compare,Allocator>& x);
3293 T allocator_type get_allocator() const;
3296 T const_iterator begin() const;
3298 T const_iterator end() const;
3299 T reverse_iterator rbegin();
3300 T const_reverse_iterator rbegin() const;
3301 T reverse_iterator rend();
3302 T const_reverse_iterator rend() const;
3304 T bool empty() const;
3305 T size_type size() const;
3306 T size_type max_size() const;
3308 T pair<iterator,bool> insert(const value_type& x);
3309 T iterator insert(iterator position, const value_type& x);
3310 T template <class InputIterator>
3311 T void insert(InputIterator first, InputIterator last);
3312 T void erase(iterator position);
3313 T size_type erase(const key_type& x);
3314 T void erase(iterator first, iterator last);
3315 T void swap(set<Key,Compare,Allocator>&);
3319 T key_compare key_comp() const;
3320 T value_compare value_comp() const;
3322 T iterator find(const key_type& x) const;
3323 T size_type count(const key_type& x) const;
3324 T iterator lower_bound(const key_type& x) const;
3325 T iterator upper_bound(const key_type& x) const;
3326 T pair<iterator,iterator> equal_range(const key_type& x) const;
3328 T template <class Key, class Compare, class Allocator>
3329 bool operator==(const set<Key,Compare,Allocator>& x,
3330 const set<Key,Compare,Allocator>& y);
3331 T template <class Key, class Compare, class Allocator>
3332 bool operator< (const set<Key,Compare,Allocator>& x,
3333 const set<Key,Compare,Allocator>& y);
3334 T template <class Key, class Compare, class Allocator>
3335 bool operator!=(const set<Key,Compare,Allocator>& x,
3336 const set<Key,Compare,Allocator>& y);
3337 T template <class Key, class Compare, class Allocator>
3338 bool operator> (const set<Key,Compare,Allocator>& x,
3339 const set<Key,Compare,Allocator>& y);
3340 T template <class Key, class Compare, class Allocator>
3341 bool operator>=(const set<Key,Compare,Allocator>& x,
3342 const set<Key,Compare,Allocator>& y);
3343 T template <class Key, class Compare, class Allocator>
3344 bool operator<=(const set<Key,Compare,Allocator>& x,
3345 const set<Key,Compare,Allocator>& y);
3346 // specialized algorithms:
3347 T template <class Key, class Compare, class Allocator>
3348 void swap(set<Key,Compare,Allocator>& x,
3349 set<Key,Compare,Allocator>& y);
3351 23.3.4 Template class multiset [lib.multiset]
3353 template <class Key, class Compare = less<Key>,
3354 class Allocator = allocator<Key> >
3358 T typedef Key key_type;
3359 T typedef Key value_type;
3360 T typedef Compare key_compare;
3361 T typedef Compare value_compare;
3362 T typedef Allocator allocator_type;
3363 T typedef typename Allocator::reference reference;
3364 T typedef typename Allocator::const_reference const_reference;
3365 T typedef implementation defined iterator;
3366 T typedef implementation defined const_iterator;
3367 T typedef implementation defined size_type;
3368 T typedef implementation defined difference_type
3369 T typedef typename Allocator::pointer pointer;
3370 T typedef typename Allocator::const_pointer const_pointer;
3371 T typedef std::reverse_iterator<iterator> reverse_iterator;
3372 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3374 // construct/copy/destroy:
3375 T explicit multiset(const Compare& comp = Compare(),
3376 const Allocator& = Allocator());
3377 T template <class InputIterator>
3378 multiset(InputIterator first, InputIterator last,
3379 const Compare& comp = Compare(),
3380 const Allocator& = Allocator());
3381 T multiset(const multiset<Key,Compare,Allocator>& x);
3383 T multiset<Key,Compare,Allocator>&
3384 operator=(const multiset<Key,Compare,Allocator>& x);
3385 T allocator_type get_allocator() const;
3388 T const_iterator begin() const;
3390 T const_iterator end() const;
3391 T reverse_iterator rbegin();
3392 T const_reverse_iterator rbegin() const;
3393 T reverse_iterator rend();
3394 T const_reverse_iterator rend() const;
3396 T bool empty() const;
3397 T size_type size() const;
3398 T size_type max_size() const;
3400 T iterator insert(const value_type& x);
3401 T iterator insert(iterator position, const value_type& x);
3402 T template <class InputIterator>
3403 void insert(InputIterator first, InputIterator last);
3404 T void erase(iterator position);
3405 T size_type erase(const key_type& x);
3406 T void erase(iterator first, iterator last);
3407 T void swap(multiset<Key,Compare,Allocator>&);
3410 T key_compare key_comp() const;
3411 T value_compare value_comp() const;
3413 T iterator find(const key_type& x) const;
3414 T size_type count(const key_type& x) const;
3415 T iterator lower_bound(const key_type& x) const;
3416 T iterator upper_bound(const key_type& x) const;
3417 T pair<iterator,iterator> equal_range(const key_type& x) const;
3420 T template <class Key, class Compare, class Allocator>
3421 bool operator==(const multiset<Key,Compare,Allocator>& x,
3422 const multiset<Key,Compare,Allocator>& y);
3423 T template <class Key, class Compare, class Allocator>
3424 bool operator< (const multiset<Key,Compare,Allocator>& x,
3425 const multiset<Key,Compare,Allocator>& y);
3426 T template <class Key, class Compare, class Allocator>
3427 bool operator!=(const multiset<Key,Compare,Allocator>& x,
3428 const multiset<Key,Compare,Allocator>& y);
3429 T template <class Key, class Compare, class Allocator>
3430 bool operator> (const multiset<Key,Compare,Allocator>& x,
3431 const multiset<Key,Compare,Allocator>& y);
3432 T template <class Key, class Compare, class Allocator>
3433 bool operator>=(const multiset<Key,Compare,Allocator>& x,
3434 const multiset<Key,Compare,Allocator>& y);
3435 T template <class Key, class Compare, class Allocator>
3436 bool operator<=(const multiset<Key,Compare,Allocator>& x,
3437 const multiset<Key,Compare,Allocator>& y);
3438 // specialized algorithms:
3439 T template <class Key, class Compare, class Allocator>
3440 void swap(multiset<Key,Compare,Allocator>& x,
3441 multiset<Key,Compare,Allocator>& y);
3443 23.3.5 Template class bitset [lib.template.bitset]
3445 Header <bitset> synopsis
3447 T template <size_t N> class bitset;
3448 // _lib.bitset.operators_ bitset operations:
3449 T template <size_t N>
3450 bitset<N> operator&(const bitset<N>&, const bitset<N>&);
3451 T template <size_t N>
3452 bitset<N> operator|(const bitset<N>&, const bitset<N>&);
3453 T template <size_t N>
3454 bitset<N> operator^(const bitset<N>&, const bitset<N>&);
3455 T template <class charT, class traits, size_t N>
3456 basic_istream<charT, traits>&
3457 operator>>(basic_istream<charT, traits>& is, bitset<N>& x);
3458 T template <class charT, class traits, size_t N>
3459 basic_ostream<charT, traits>&
3460 operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);
3462 T template<size_t N> class bitset {
3466 friend class bitset;
3470 T reference& operator=(bool x); // for b[i] = x;
3471 T reference& operator=(const reference&); // for b[i] = b[j];
3472 T bool operator~() const; // flips the bit
3473 T operator bool() const; // for x = b[i];
3474 T reference& flip(); // for b[i].flip();
3477 // _lib.bitset.cons_ constructors:
3479 T bitset(unsigned long val);
3480 T template<class charT, class traits, class Allocator>
3482 const basic_string<charT,traits,Allocator>& str,
3483 typename basic_string<charT,traits,Allocator>::size_type pos = 0,
3484 typename basic_string<charT,traits,Allocator>::size_type n =
3485 basic_string<charT,traits,Allocator>::npos);
3486 // _lib.bitset.members_ bitset operations:
3487 T bitset<N>& operator&=(const bitset<N>& rhs);
3488 T bitset<N>& operator|=(const bitset<N>& rhs);
3489 T bitset<N>& operator^=(const bitset<N>& rhs);
3490 T bitset<N>& operator<<=(size_t pos);
3491 T bitset<N>& operator>>=(size_t pos);
3492 T bitset<N>& set();
3493 T bitset<N>& set(size_t pos, int val = true);
3494 T bitset<N>& reset();
3495 T bitset<N>& reset(size_t pos);
3496 T bitset<N> operator~() const;
3497 T bitset<N>& flip();
3498 T bitset<N>& flip(size_t pos);
3500 T reference operator[](size_t pos); // for b[i];
3501 T unsigned long to_ulong() const;
3502 T template <class charT, class traits, class Allocator>
3503 basic_string<charT, traits, Allocator> to_string() const;
3504 T size_t count() const;
3505 T size_t size() const;
3506 T bool operator==(const bitset<N>& rhs) const;
3507 T bool operator!=(const bitset<N>& rhs) const;
3508 T bool test(size_t pos) const;
3510 T bool none() const;
3511 T bitset<N> operator<<(size_t pos) const;
3512 T bitset<N> operator>>(size_t pos) const;
3518 24.2 Header <iterator> synopsis [lib.iterator.synopsis]
3520 // _lib.iterator.primitives_, primitives:
3521 T template<class Iterator> struct iterator_traits;
3522 T template<class T> struct iterator_traits<T*>;
3524 X template<class Category, class T, class Distance = ptrdiff_t,
3525 class Pointer = T*, class Reference = T&> struct iterator;
3526 T struct input_iterator_tag {};
3527 T struct output_iterator_tag {};
3528 T struct forward_iterator_tag: public input_iterator_tag {};
3529 T struct bidirectional_iterator_tag: public forward_iterator_tag {};
3530 T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
3531 // _lib.iterator.operations_, iterator operations:
3532 T template <class InputIterator, class Distance>
3533 void advance(InputIterator& i, Distance n);
3534 T template <class InputIterator>
3535 typename iterator_traits<InputIterator>::difference_type
3536 distance(InputIterator first, InputIterator last);
3537 // _lib.predef.iterators_, predefined iterators:
3538 X template <class Iterator> class reverse_iterator;
3539 T template <class Iterator>
3541 const reverse_iterator<Iterator>& x,
3542 const reverse_iterator<Iterator>& y);
3543 T template <class Iterator>
3545 const reverse_iterator<Iterator>& x,
3546 const reverse_iterator<Iterator>& y);
3547 T template <class Iterator>
3549 const reverse_iterator<Iterator>& x,
3550 const reverse_iterator<Iterator>& y);
3551 T template <class Iterator>
3553 const reverse_iterator<Iterator>& x,
3554 const reverse_iterator<Iterator>& y);
3555 T template <class Iterator>
3557 const reverse_iterator<Iterator>& x,
3558 const reverse_iterator<Iterator>& y);
3559 T template <class Iterator>
3561 const reverse_iterator<Iterator>& x,
3562 const reverse_iterator<Iterator>& y);
3563 T template <class Iterator>
3564 typename reverse_iterator<Iterator>::difference_type operator-(
3565 const reverse_iterator<Iterator>& x,
3566 const reverse_iterator<Iterator>& y);
3567 T template <class Iterator>
3568 reverse_iterator<Iterator>
3570 typename reverse_iterator<Iterator>::difference_type n,
3571 const reverse_iterator<Iterator>& x);
3573 X template <class Container> class back_insert_iterator;
3574 T template <class Container>
3575 back_insert_iterator<Container> back_inserter(Container& x);
3576 X template <class Container> class front_insert_iterator;
3577 T template <class Container>
3578 front_insert_iterator<Container> front_inserter(Container& x);
3579 X template <class Container> class insert_iterator;
3580 T template <class Container, class Iterator>
3581 insert_iterator<Container> inserter(Container& x, Iterator i);
3582 // _lib.stream.iterators_, stream iterators:
3583 X template <class T, class charT = char, class traits = char_traits<charT>,
3584 class Distance = ptrdiff_t>
3585 class istream_iterator;
3586 template <class T, class charT, class traits, class Distance>
3587 X bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
3588 const istream_iterator<T,charT,traits,Distance>& y);
3589 template <class T, class charT, class traits, class Distance>
3590 X bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
3591 const istream_iterator<T,charT,traits,Distance>& y);
3592 X template <class T, class charT = char, class traits = char_traits<charT> >
3593 class ostream_iterator;
3594 X template<class charT, class traits = char_traits<charT> >
3595 class istreambuf_iterator;
3596 X template <class charT, class traits>
3597 bool operator==(const istreambuf_iterator<charT,traits>& a,
3598 const istreambuf_iterator<charT,traits>& b);
3599 X template <class charT, class traits>
3600 bool operator!=(const istreambuf_iterator<charT,traits>& a,
3601 const istreambuf_iterator<charT,traits>& b);
3602 T template <class charT, class traits = char_traits<charT> >
3603 class ostreambuf_iterator;
3605 24.3 Iterator primitives [lib.iterator.primitives]
3607 T template<class Iterator> struct iterator_traits {
3608 T typedef typename Iterator::difference_type difference_type;
3609 T typedef typename Iterator::value_type value_type;
3610 T typedef typename Iterator::pointer pointer;
3611 T typedef typename Iterator::reference reference;
3612 T typedef typename Iterator::iterator_category iterator_category;
3615 T template<class T> struct iterator_traits<T*> {
3616 T typedef ptrdiff_t difference_type;
3617 T typedef T value_type;
3618 T typedef T* pointer;
3619 T typedef T& reference;
3620 T typedef random_access_iterator_tag iterator_category;
3623 T template<class T> struct iterator_traits<const T*> {
3624 T typedef ptrdiff_t difference_type;
3625 T typedef T value_type;
3626 T typedef const T* pointer;
3627 T typedef const T& reference;
3628 T typedef random_access_iterator_tag iterator_category;
3631 24.3.2 Basic iterator [lib.iterator.basic]
3633 template<class Category, class T, class Distance = ptrdiff_t,
3634 class Pointer = T*, class Reference = T&>
3636 T typedef T value_type;
3637 T typedef Distance difference_type;
3638 T typedef Pointer pointer;
3639 T typedef Reference reference;
3640 T typedef Category iterator_category;
3643 24.3.3 Standard iterator tags [lib.std.iterator.tags]
3645 T struct input_iterator_tag {};
3646 T struct output_iterator_tag {};
3647 T struct forward_iterator_tag: public input_iterator_tag {};
3648 T struct bidirectional_iterator_tag: public forward_iterator_tag {};
3649 T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
3652 24.4.1 Reverse iterators [lib.reverse.iterators]
3654 template <class Iterator>
3655 X class reverse_iterator : public
3656 iterator<typename iterator_traits<Iterator>::iterator_category,
3657 typename iterator_traits<Iterator>::value_type,
3658 typename iterator_traits<Iterator>::difference_type,
3659 typename iterator_traits<Iterator>::pointer,
3660 typename iterator_traits<Iterator>::reference> {
3666 T typedef typename iterator_traits<Iterator>::difference_type
3668 T typedef typename iterator_traits<Iterator>::reference
3670 T typedef typename iterator_traits<Iterator>::pointer
3673 T reverse_iterator();
3674 T explicit reverse_iterator(Iterator x);
3675 T template <class U> reverse_iterator(const reverse_iterator<U>& u);
3676 T Iterator base() const; // explicit
3677 T reference operator*() const;
3678 T pointer operator->() const;
3679 T reverse_iterator& operator++();
3680 T reverse_iterator operator++(int);
3681 T reverse_iterator& operator--();
3682 T reverse_iterator operator--(int);
3684 T reverse_iterator operator+ (difference_type n) const;
3685 T reverse_iterator& operator+=(difference_type n);
3686 T reverse_iterator operator- (difference_type n) const;
3687 T reverse_iterator& operator-=(difference_type n);
3688 T reference operator[](difference_type n) const;
3690 T template <class Iterator>
3692 const reverse_iterator<Iterator>& x,
3693 const reverse_iterator<Iterator>& y);
3694 T template <class Iterator>
3696 const reverse_iterator<Iterator>& x,
3697 const reverse_iterator<Iterator>& y);
3698 T template <class Iterator>
3700 const reverse_iterator<Iterator>& x,
3701 const reverse_iterator<Iterator>& y);
3702 T template <class Iterator>
3704 const reverse_iterator<Iterator>& x,
3705 const reverse_iterator<Iterator>& y);
3706 T template <class Iterator>
3708 const reverse_iterator<Iterator>& x,
3709 const reverse_iterator<Iterator>& y);
3710 T template <class Iterator>
3712 const reverse_iterator<Iterator>& x,
3713 const reverse_iterator<Iterator>& y);
3714 T template <class Iterator>
3715 typename reverse_iterator<Iterator>::difference_type operator-(
3716 const reverse_iterator<Iterator>& x,
3717 const reverse_iterator<Iterator>& y);
3718 T template <class Iterator>
3719 reverse_iterator<Iterator> operator+(
3720 typename reverse_iterator<Iterator>::difference_type n,
3721 const reverse_iterator<Iterator>& x);
3724 24.4.2.1 Template class [lib.back.insert.iterator]
3725 back_insert_iterator
3727 template <class Container>
3728 X class back_insert_iterator :
3729 public iterator<output_iterator_tag,void,void,void,void> {
3731 T Container* container;
3733 T typedef Container container_type;
3734 T explicit back_insert_iterator(Container& x);
3735 T back_insert_iterator<Container>&
3736 operator=(typename Container::const_reference value);
3738 T back_insert_iterator<Container>& operator*();
3739 T back_insert_iterator<Container>& operator++();
3740 T back_insert_iterator<Container> operator++(int);
3742 T template <class Container>
3743 back_insert_iterator<Container> back_inserter(Container& x);
3747 24.4.2.3 Template class [lib.front.insert.iterator]
3748 front_insert_iterator
3750 template <class Container>
3751 X class front_insert_iterator :
3752 public iterator<output_iterator_tag,void,void,void,void> {
3754 T Container* container;
3756 T typedef Container container_type;
3757 T explicit front_insert_iterator(Container& x);
3758 T front_insert_iterator<Container>&
3759 operator=(typename Container::const_reference value);
3760 T front_insert_iterator<Container>& operator*();
3761 T front_insert_iterator<Container>& operator++();
3762 T front_insert_iterator<Container> operator++(int);
3764 T template <class Container>
3765 front_insert_iterator<Container> front_inserter(Container& x);
3768 24.4.2.5 Template class insert_iterator [lib.insert.iterator]
3770 template <class Container>
3771 X class insert_iterator :
3772 public iterator<output_iterator_tag,void,void,void,void> {
3774 T Container* container;
3775 T typename Container::iterator iter;
3777 T typedef Container container_type;
3778 T insert_iterator(Container& x, typename Container::iterator i);
3779 T insert_iterator<Container>&
3780 operator=(typename Container::const_reference value);
3781 T insert_iterator<Container>& operator*();
3782 T insert_iterator<Container>& operator++();
3783 T insert_iterator<Container>& operator++(int);
3785 T template <class Container, class Iterator>
3786 insert_iterator<Container> inserter(Container& x, Iterator i);
3788 24.5.1 Template class istream_iterator [lib.istream.iterator]
3790 template <class T, class charT = char, class traits = char_traits<charT>,
3791 class Distance = ptrdiff_t>
3792 X class istream_iterator:
3793 public iterator<input_iterator_tag, T, Distance, const T*, const T&> {
3795 T typedef charT char_type
3796 T typedef traits traits_type;
3797 T typedef basic_istream<charT,traits> istream_type;
3798 T istream_iterator();
3799 T istream_iterator(istream_type& s);
3800 T istream_iterator(const istream_iterator<T,charT,traits,Distance>& x);
3801 T ~istream_iterator();
3803 T const T& operator*() const;
3804 T const T* operator->() const;
3805 T istream_iterator<T,charT,traits,Distance>& operator++();
3806 T istream_iterator<T,charT,traits,Distance> operator++(int);
3809 T template <class T, class charT, class traits, class Distance>
3810 bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
3811 const istream_iterator<T,charT,traits,Distance>& y);
3812 T template <class T, class charT, class traits, class Distance>
3813 bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
3814 const istream_iterator<T,charT,traits,Distance>& y);
3817 24.5.2 Template class ostream_iterator [lib.ostream.iterator]
3819 template <class T, class charT = char, class traits = char_traits<charT> >
3820 X class ostream_iterator:
3821 public iterator<output_iterator_tag, void, void, void, void> {
3823 T typedef charT char_type;
3824 T typedef traits traits_type;
3825 T typedef basic_ostream<charT,traits> ostream_type;
3826 T ostream_iterator(ostream_type& s);
3827 T ostream_iterator(ostream_type& s, const charT* delimiter);
3828 T ostream_iterator(const ostream_iterator<T,charT,traits>& x);
3829 T ~ostream_iterator();
3830 T ostream_iterator<T,charT,traits>& operator=(const T& value);
3832 T ostream_iterator<T,charT,traits>& operator*();
3833 T ostream_iterator<T,charT,traits>& operator++();
3834 T ostream_iterator<T,charT,traits>& operator++(int);
3838 24.5.3 Template class [lib.istreambuf.iterator]
3841 template<class charT, class traits = char_traits<charT> >
3842 X class istreambuf_iterator
3843 : public iterator<input_iterator_tag, charT,
3844 typename traits::off_type, charT*, charT&> {
3846 T typedef charT char_type;
3847 T typedef traits traits_type;
3848 T typedef typename traits::int_type int_type;
3849 T typedef basic_streambuf<charT,traits> streambuf_type;
3850 T typedef basic_istream<charT,traits> istream_type;
3851 T class proxy; // exposition only
3852 T istreambuf_iterator() throw();
3853 T istreambuf_iterator(istream_type& s) throw();
3854 T istreambuf_iterator(streambuf_type* s) throw();
3855 T istreambuf_iterator(const proxy& p) throw();
3856 T charT operator*() const;
3857 T istreambuf_iterator<charT,traits>& operator++();
3858 T proxy operator++(int);
3859 X bool equal(istreambuf_iterator& b);
3862 T template <class charT, class traits>
3863 bool operator==(const istreambuf_iterator<charT,traits>& a,
3864 const istreambuf_iterator<charT,traits>& b);
3866 T template <class charT, class traits>
3867 bool operator!=(const istreambuf_iterator<charT,traits>& a,
3868 const istreambuf_iterator<charT,traits>& b);
3870 24.5.3.1 Template class [lib.istreambuf.iterator::proxy]
3871 istreambuf_iterator::proxy
3873 template <class charT, class traits = char_traits<charT> >
3874 T class istreambuf_iterator<charT, traits>::proxy
3877 T basic_streambuf<charT,traits>* sbuf_;
3879 basic_streambuf<charT,traits>* sbuf);
3880 : keep_(c), sbuf_(sbuf) {}
3882 T charT operator*() { return keep_; }
3887 24.5.4 Template class [lib.ostreambuf.iterator]
3890 template <class charT, class traits = char_traits<charT> >
3891 T class ostreambuf_iterator:
3892 public iterator<output_iterator_tag, void, void, void, void> {
3894 T typedef charT char_type;
3895 T typedef traits traits_type;
3896 T typedef basic_streambuf<charT,traits> streambuf_type;
3897 T typedef basic_ostream<charT,traits> ostream_type;
3899 T ostreambuf_iterator(ostream_type& s) throw();
3900 T ostreambuf_iterator(streambuf_type* s) throw();
3901 T ostreambuf_iterator& operator=(charT c);
3902 T ostreambuf_iterator& operator*();
3903 T ostreambuf_iterator& operator++();
3904 T ostreambuf_iterator& operator++(int);
3905 T bool failed() const throw();
3909 Header <algorithm> synopsis
3912 // _lib.alg.nonmodifying_, non-modifying sequence operations:
3913 T template<class InputIterator, class Function>
3914 Function for_each(InputIterator first, InputIterator last, Function f);
3915 T template<class InputIterator, class T>
3916 InputIterator find(InputIterator first, InputIterator last,
3917 const T& value);
3918 T template<class InputIterator, class Predicate>
3919 InputIterator find_if(InputIterator first, InputIterator last,
3921 T template<class ForwardIterator1, class ForwardIterator2>
3923 find_end(ForwardIterator1 first1, ForwardIterator1 last1,
3924 ForwardIterator2 first2, ForwardIterator2 last2);
3925 T template<class ForwardIterator1, class ForwardIterator2,
3926 class BinaryPredicate>
3928 find_end(ForwardIterator1 first1, ForwardIterator1 last1,
3929 ForwardIterator2 first2, ForwardIterator2 last2,
3930 BinaryPredicate pred);
3931 T template<class ForwardIterator1, class ForwardIterator2>
3933 find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
3934 ForwardIterator2 first2, ForwardIterator2 last2);
3935 T template<class ForwardIterator1, class ForwardIterator2,
3936 class BinaryPredicate>
3938 find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
3939 ForwardIterator2 first2, ForwardIterator2 last2,
3940 BinaryPredicate pred);
3941 T template<class ForwardIterator>
3942 ForwardIterator adjacent_find(ForwardIterator first,
3943 ForwardIterator last);
3944 T template<class ForwardIterator, class BinaryPredicate>
3945 ForwardIterator adjacent_find(ForwardIterator first,
3946 ForwardIterator last, BinaryPredicate pred);
3947 T template<class InputIterator, class T>
3948 typename iterator_traits<InputIterator>::difference_type
3949 count(InputIterator first, InputIterator last, const T& value);
3950 T template<class InputIterator, class Predicate>
3951 typename iterator_traits<InputIterator>::difference_type
3952 count_if(InputIterator first, InputIterator last, Predicate pred);
3953 T template<class InputIterator1, class InputIterator2>
3954 pair<InputIterator1, InputIterator2>
3955 mismatch(InputIterator1 first1, InputIterator1 last1,
3956 InputIterator2 first2);
3957 T template<class InputIterator1, class InputIterator2, class BinaryPredicate>
3958 pair<InputIterator1, InputIterator2>
3959 mismatch(InputIterator1 first1, InputIterator1 last1,
3960 InputIterator2 first2, BinaryPredicate pred);
3962 T template<class InputIterator1, class InputIterator2>
3963 bool equal(InputIterator1 first1, InputIterator1 last1,
3964 InputIterator2 first2);
3965 T template<class InputIterator1, class InputIterator2, class BinaryPredicate>
3966 bool equal(InputIterator1 first1, InputIterator1 last1,
3967 InputIterator2 first2, BinaryPredicate pred);
3968 T template<class ForwardIterator1, class ForwardIterator2>
3969 ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
3970 ForwardIterator2 first2, ForwardIterator2 last2);
3971 T template<class ForwardIterator1, class ForwardIterator2,
3972 class BinaryPredicate>
3973 ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
3974 ForwardIterator2 first2, ForwardIterator2 last2,
3975 BinaryPredicate pred);
3976 T template<class ForwardIterator, class Size, class T>
3977 ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
3978 Size count, const T& value);
3979 T template<class ForwardIterator, class Size, class T, class BinaryPredicate>
3980 ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
3981 Size count, const T& value,
3982 BinaryPredicate pred);
3983 // _lib.alg.modifying.operations_, modifying sequence operations:
3984 // _lib.alg.copy_, copy:
3985 T template<class InputIterator, class OutputIterator>
3986 OutputIterator copy(InputIterator first, InputIterator last,
3987 OutputIterator result);
3988 T template<class BidirectionalIterator1, class BidirectionalIterator2>
3989 BidirectionalIterator2
3990 copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
3991 BidirectionalIterator2 result);
3992 // _lib.alg.swap_, swap:
3993 T template<class T> void swap(T& a, T& b);
3994 T template<class ForwardIterator1, class ForwardIterator2>
3995 ForwardIterator2 swap_ranges(ForwardIterator1 first1,
3996 ForwardIterator1 last1, ForwardIterator2 first2);
3997 T template<class ForwardIterator1, class ForwardIterator2>
3998 void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
3999 T template<class InputIterator, class OutputIterator, class UnaryOperation>
4000 OutputIterator transform(InputIterator first, InputIterator last,
4001 OutputIterator result, UnaryOperation op);
4002 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4003 class BinaryOperation>
4004 OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
4005 InputIterator2 first2, OutputIterator result,
4006 BinaryOperation binary_op);
4008 T template<class ForwardIterator, class T>
4009 void replace(ForwardIterator first, ForwardIterator last,
4010 const T& old_value, const T& new_value);
4011 T template<class ForwardIterator, class Predicate, class T>
4012 void replace_if(ForwardIterator first, ForwardIterator last,
4013 Predicate pred, const T& new_value);
4014 T template<class InputIterator, class OutputIterator, class T>
4015 OutputIterator replace_copy(InputIterator first, InputIterator last,
4016 OutputIterator result,
4017 const T& old_value, const T& new_value);
4018 T template<class Iterator, class OutputIterator, class Predicate, class T>
4019 OutputIterator replace_copy_if(Iterator first, Iterator last,
4020 OutputIterator result,
4021 Predicate pred, const T& new_value);
4022 T template<class ForwardIterator, class T>
4023 void fill(ForwardIterator first, ForwardIterator last, const T& value);
4024 T template<class OutputIterator, class Size, class T>
4025 void fill_n(OutputIterator first, Size n, const T& value);
4026 T template<class ForwardIterator, class Generator>
4027 void generate(ForwardIterator first, ForwardIterator last, Generator gen);
4028 T template<class OutputIterator, class Size, class Generator>
4029 void generate_n(OutputIterator first, Size n, Generator gen);
4030 T template<class ForwardIterator, class T>
4031 ForwardIterator remove(ForwardIterator first, ForwardIterator last,
4032 const T& value);
4033 T template<class ForwardIterator, class Predicate>
4034 ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
4036 T template<class InputIterator, class OutputIterator, class T>
4037 OutputIterator remove_copy(InputIterator first, InputIterator last,
4038 OutputIterator result, const T& value);
4039 T template<class InputIterator, class OutputIterator, class Predicate>
4040 OutputIterator remove_copy_if(InputIterator first, InputIterator last,
4041 OutputIterator result, Predicate pred);
4042 T template<class ForwardIterator>
4043 ForwardIterator unique(ForwardIterator first, ForwardIterator last);
4044 T template<class ForwardIterator, class BinaryPredicate>
4045 ForwardIterator unique(ForwardIterator first, ForwardIterator last,
4046 BinaryPredicate pred);
4047 T template<class InputIterator, class OutputIterator>
4048 OutputIterator unique_copy(InputIterator first, InputIterator last,
4049 OutputIterator result);
4050 T template<class InputIterator, class OutputIterator, class BinaryPredicate>
4051 OutputIterator unique_copy(InputIterator first, InputIterator last,
4052 OutputIterator result, BinaryPredicate pred);
4053 T template<class BidirectionalIterator>
4054 void reverse(BidirectionalIterator first, BidirectionalIterator last);
4055 T template<class BidirectionalIterator, class OutputIterator>
4056 OutputIterator reverse_copy(BidirectionalIterator first,
4057 BidirectionalIterator last,
4058 OutputIterator result);
4060 T template<class ForwardIterator>
4061 void rotate(ForwardIterator first, ForwardIterator middle,
4062 ForwardIterator last);
4063 T template<class ForwardIterator, class OutputIterator>
4064 OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,
4065 ForwardIterator last, OutputIterator result);
4066 T template<class RandomAccessIterator>
4067 void random_shuffle(RandomAccessIterator first,
4068 RandomAccessIterator last);
4069 T template<class RandomAccessIterator, class RandomNumberGenerator>
4070 void random_shuffle(RandomAccessIterator first,
4071 RandomAccessIterator last,
4072 RandomNumberGenerator& rand);
4073 // _lib.alg.partitions_, partitions:
4074 T template<class BidirectionalIterator, class Predicate>
4075 BidirectionalIterator partition(BidirectionalIterator first,
4076 BidirectionalIterator last,
4078 T template<class BidirectionalIterator, class Predicate>
4079 BidirectionalIterator stable_partition(BidirectionalIterator first,
4080 BidirectionalIterator last,
4082 // _lib.alg.sorting_, sorting and related operations:
4083 // _lib.alg.sort_, sorting:
4084 T template<class RandomAccessIterator>
4085 void sort(RandomAccessIterator first, RandomAccessIterator last);
4086 T template<class RandomAccessIterator, class Compare>
4087 void sort(RandomAccessIterator first, RandomAccessIterator last,
4089 T template<class RandomAccessIterator>
4090 void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
4091 T template<class RandomAccessIterator, class Compare>
4092 void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
4094 T template<class RandomAccessIterator>
4095 void partial_sort(RandomAccessIterator first,
4096 RandomAccessIterator middle,
4097 RandomAccessIterator last);
4098 T template<class RandomAccessIterator, class Compare>
4099 void partial_sort(RandomAccessIterator first,
4100 RandomAccessIterator middle,
4101 RandomAccessIterator last, Compare comp);
4102 T template<class InputIterator, class RandomAccessIterator>
4103 RandomAccessIterator
4104 partial_sort_copy(InputIterator first, InputIterator last,
4105 RandomAccessIterator result_first,
4106 RandomAccessIterator result_last);
4107 T template<class InputIterator, class RandomAccessIterator, class Compare>
4108 RandomAccessIterator
4109 partial_sort_copy(InputIterator first, InputIterator last,
4110 RandomAccessIterator result_first,
4111 RandomAccessIterator result_last,
4114 T template<class RandomAccessIterator>
4115 void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
4116 RandomAccessIterator last);
4117 T template<class RandomAccessIterator, class Compare>
4118 void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
4119 RandomAccessIterator last, Compare comp);
4120 // _lib.alg.binary.search_, binary search:
4121 T template<class ForwardIterator, class T>
4122 ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
4123 const T& value);
4124 T template<class ForwardIterator, class T, class Compare>
4125 ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
4126 const T& value, Compare comp);
4127 T template<class ForwardIterator, class T>
4128 ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
4129 const T& value);
4130 T template<class ForwardIterator, class T, class Compare>
4131 ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
4132 const T& value, Compare comp);
4133 T template<class ForwardIterator, class T>
4134 pair<ForwardIterator, ForwardIterator>
4135 equal_range(ForwardIterator first, ForwardIterator last,
4136 const T& value);
4137 T template<class ForwardIterator, class T, class Compare>
4138 pair<ForwardIterator, ForwardIterator>
4139 equal_range(ForwardIterator first, ForwardIterator last,
4140 const T& value, Compare comp);
4141 T template<class ForwardIterator, class T>
4142 bool binary_search(ForwardIterator first, ForwardIterator last,
4143 const T& value);
4144 T template<class ForwardIterator, class T, class Compare>
4145 bool binary_search(ForwardIterator first, ForwardIterator last,
4146 const T& value, Compare comp);
4147 // _lib.alg.merge_, merge:
4148 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4149 OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
4150 InputIterator2 first2, InputIterator2 last2,
4151 OutputIterator result);
4152 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4154 OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
4155 InputIterator2 first2, InputIterator2 last2,
4156 OutputIterator result, Compare comp);
4157 T template<class BidirectionalIterator>
4158 void inplace_merge(BidirectionalIterator first,
4159 BidirectionalIterator middle,
4160 BidirectionalIterator last);
4161 T template<class BidirectionalIterator, class Compare>
4162 void inplace_merge(BidirectionalIterator first,
4163 BidirectionalIterator middle,
4164 BidirectionalIterator last, Compare comp);
4166 // _lib.alg.set.operations_, set operations:
4167 T template<class InputIterator1, class InputIterator2>
4168 bool includes(InputIterator1 first1, InputIterator1 last1,
4169 InputIterator2 first2, InputIterator2 last2);
4170 T template<class InputIterator1, class InputIterator2, class Compare>
4171 bool includes(InputIterator1 first1, InputIterator1 last1,
4172 InputIterator2 first2, InputIterator2 last2, Compare comp);
4173 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4174 OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
4175 InputIterator2 first2, InputIterator2 last2,
4176 OutputIterator result);
4177 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4179 OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
4180 InputIterator2 first2, InputIterator2 last2,
4181 OutputIterator result, Compare comp);
4182 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4183 OutputIterator set_intersection
4184 (InputIterator1 first1, InputIterator1 last1,
4185 InputIterator2 first2, InputIterator2 last2,
4186 OutputIterator result);
4187 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4189 OutputIterator set_intersection
4190 (InputIterator1 first1, InputIterator1 last1,
4191 InputIterator2 first2, InputIterator2 last2,
4192 OutputIterator result, Compare comp);
4193 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4194 OutputIterator set_difference
4195 (InputIterator1 first1, InputIterator1 last1,
4196 InputIterator2 first2, InputIterator2 last2,
4197 OutputIterator result);
4198 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4200 OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,
4201 InputIterator2 first2, InputIterator2 last2,
4202 OutputIterator result, Compare comp);
4203 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4205 set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
4206 InputIterator2 first2, InputIterator2 last2,
4207 OutputIterator result);
4208 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4211 set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
4212 InputIterator2 first2, InputIterator2 last2,
4213 OutputIterator result, Compare comp);
4214 // _lib.alg.heap.operations_, heap operations:
4215 T template<class RandomAccessIterator>
4216 void push_heap(RandomAccessIterator first, RandomAccessIterator last);
4217 T template<class RandomAccessIterator, class Compare>
4218 void push_heap(RandomAccessIterator first, RandomAccessIterator last,
4221 T template<class RandomAccessIterator>
4222 void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
4223 T template<class RandomAccessIterator, class Compare>
4224 void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
4226 T template<class RandomAccessIterator>
4227 void make_heap(RandomAccessIterator first, RandomAccessIterator last);
4228 T template<class RandomAccessIterator, class Compare>
4229 void make_heap(RandomAccessIterator first, RandomAccessIterator last,
4231 T template<class RandomAccessIterator>
4232 void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
4233 T template<class RandomAccessIterator, class Compare>
4234 void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
4236 // _lib.alg.min.max_, minimum and maximum:
4237 T template<class T> const T& min(const T& a, const T& b);
4238 T template<class T, class Compare>
4239 const T& min(const T& a, const T& b, Compare comp);
4240 T template<class T> const T& max(const T& a, const T& b);
4241 T template<class T, class Compare>
4242 const T& max(const T& a, const T& b, Compare comp);
4243 T template<class ForwardIterator>
4244 ForwardIterator min_element(ForwardIterator first, ForwardIterator last);
4245 T template<class ForwardIterator, class Compare>
4246 ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
4248 T template<class ForwardIterator>
4249 ForwardIterator max_element(ForwardIterator first, ForwardIterator last);
4250 T template<class ForwardIterator, class Compare>
4251 ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
4253 T template<class InputIterator1, class InputIterator2>
4254 bool lexicographical_compare
4255 (InputIterator1 first1, InputIterator1 last1,
4256 InputIterator2 first2, InputIterator2 last2);
4257 T template<class InputIterator1, class InputIterator2, class Compare>
4258 bool lexicographical_compare
4259 (InputIterator1 first1, InputIterator1 last1,
4260 InputIterator2 first2, InputIterator2 last2,
4263 // _lib.alg.permutation.generators_, permutations
4264 T template<class BidirectionalIterator>
4265 bool next_permutation(BidirectionalIterator first,
4266 BidirectionalIterator last);
4267 T template<class BidirectionalIterator, class Compare>
4268 bool next_permutation(BidirectionalIterator first,
4269 BidirectionalIterator last, Compare comp);
4270 T template<class BidirectionalIterator>
4271 bool prev_permutation(BidirectionalIterator first,
4272 BidirectionalIterator last);
4273 T template<class BidirectionalIterator, class Compare>
4274 bool prev_permutation(BidirectionalIterator first,
4275 BidirectionalIterator last, Compare comp);
4278 25.4 C library algorithms [lib.alg.c.library]
4280 1 Header <cstdlib> (partial, Table 2):
4282 Table 2--Header <cstdlib> synopsis
4284 Functions: bsearch qsort
4287 X extern "C" void *bsearch(const void *key, const void *base,
4288 size_t nmemb, size_t size,
4289 int (*compar)(const void *, const void *));
4290 X extern "C++" void *bsearch(const void *key, const void *base,
4291 size_t nmemb, size_t size,
4292 int (*compar)(const void *, const void *));
4294 X extern "C" void qsort(void* base, size_t nmemb, size_t size,
4295 int (*compar)(const void*, const void*));
4296 X extern "C++" void qsort(void* base, size_t nmemb, size_t size,
4297 int (*compar)(const void*, const void*));
4301 26.2 Complex numbers [lib.complex.numbers]
4304 26.2.1 Header <complex> synopsis [lib.complex.synopsis]
4306 T template<class T> class complex;
4307 T template<> class complex<float>;
4308 T template<> class complex<double>;
4309 T template<> class complex<long double>;
4310 // _lib.complex.ops_ operators:
4311 T template<class T>
4312 complex<T> operator+(const complex<T>&, const complex<T>&);
4313 T template<class T> complex<T> operator+(const complex<T>&, const T&);
4314 T template<class T> complex<T> operator+(const T&, const complex<T>&);
4315 T template<class T> complex<T> operator-
4316 (const complex<T>&, const complex<T>&);
4317 T template<class T> complex<T> operator-(const complex<T>&, const T&);
4318 T template<class T> complex<T> operator-(const T&, const complex<T>&);
4319 T template<class T> complex<T> operator*
4320 (const complex<T>&, const complex<T>&);
4321 T template<class T> complex<T> operator*(const complex<T>&, const T&);
4322 T template<class T> complex<T> operator*(const T&, const complex<T>&);
4323 T template<class T> complex<T> operator/
4324 (const complex<T>&, const complex<T>&);
4325 T template<class T> complex<T> operator/(const complex<T>&, const T&);
4326 T template<class T> complex<T> operator/(const T&, const complex<T>&);
4327 T template<class T> complex<T> operator+(const complex<T>&);
4328 T template<class T> complex<T> operator-(const complex<T>&);
4329 T template<class T> bool operator==
4330 (const complex<T>&, const complex<T>&);
4331 T template<class T> bool operator==(const complex<T>&, const T&);
4332 T template<class T> bool operator==(const T&, const complex<T>&);
4333 T template<class T> bool operator!=(const complex<T>&, const complex<T>&);
4334 T template<class T> bool operator!=(const complex<T>&, const T&);
4335 T template<class T> bool operator!=(const T&, const complex<T>&);
4336 T template<class T, class charT, class traits>
4337 basic_istream<charT, traits>&
4338 operator>>(basic_istream<charT, traits>&, complex<T>&);
4340 T template<class T, class charT, class traits>
4341 basic_ostream<charT, traits>&
4342 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
4343 // _lib.complex.value.ops_ values:
4344 T template<class T> T real(const complex<T>&);
4345 T template<class T> T imag(const complex<T>&);
4347 T template<class T> T abs(const complex<T>&);
4348 T template<class T> T arg(const complex<T>&);
4349 T template<class T> T norm(const complex<T>&);
4350 T template<class T> complex<T> conj(const complex<T>&);
4351 T template<class T> complex<T> polar(const T&, const T&);
4352 // _lib.complex.transcendentals_ transcendentals:
4353 T template<class T> complex<T> cos (const complex<T>&);
4354 T template<class T> complex<T> cosh (const complex<T>&);
4355 T template<class T> complex<T> exp (const complex<T>&);
4356 T template<class T> complex<T> log (const complex<T>&);
4357 T template<class T> complex<T> log10(const complex<T>&);
4358 T template<class T> complex<T> pow(const complex<T>&, int);
4359 T template<class T> complex<T> pow(const complex<T>&, const T&);
4360 T template<class T> complex<T> pow(const complex<T>&, const complex<T>&);
4361 T template<class T> complex<T> pow(const T&, const complex<T>&);
4362 T template<class T> complex<T> sin (const complex<T>&);
4363 T template<class T> complex<T> sinh (const complex<T>&);
4364 T template<class T> complex<T> sqrt (const complex<T>&);
4365 T template<class T> complex<T> tan (const complex<T>&);
4366 T template<class T> complex<T> tanh (const complex<T>&);
4369 26.2.2 Template class complex [lib.complex]
4371 template<class T>
4374 T typedef T value_type;
4376 T complex(const T& re = T(), const T& im = T());
4377 T complex(const complex&);
4378 T template<class X> complex(const complex<X>&);
4383 T complex<T>& operator= (const T&);
4384 T complex<T>& operator+=(const T&);
4385 T complex<T>& operator-=(const T&);
4386 T complex<T>& operator*=(const T&);
4387 T complex<T>& operator/=(const T&);
4389 T complex& operator=(const complex&);
4390 T template<class X> complex<T>& operator= (const complex<X>&);
4391 T template<class X> complex<T>& operator+=(const complex<X>&);
4392 T template<class X> complex<T>& operator-=(const complex<X>&);
4393 T template<class X> complex<T>& operator*=(const complex<X>&);
4394 T template<class X> complex<T>& operator/=(const complex<X>&);
4397 T template<class T> complex<T> operator+
4398 (const complex<T>&, const complex<T>&);
4399 T template<class T> complex<T> operator+(const complex<T>&, const T&);
4400 T template<class T> complex<T> operator+(const T&, const complex<T>&);
4402 T template<class T> complex<T> operator-
4403 (const complex<T>&, const complex<T>&);
4404 T template<class T> complex<T> operator-(const complex<T>&, const T&);
4405 T template<class T> complex<T> operator-(const T&, const complex<T>&);
4407 T template<class T> complex<T> operator*
4408 (const complex<T>&, const complex<T>&);
4409 T template<class T> complex<T> operator*(const complex<T>&, const T&);
4410 T template<class T> complex<T> operator*(const T&, const complex<T>&);
4412 T template<class T> complex<T> operator/
4413 (const complex<T>&, const complex<T>&);
4414 T template<class T> complex<T> operator/(const complex<T>&, const T&);
4415 T template<class T> complex<T> operator/(const T&, const complex<T>&);
4417 T template<class T> complex<T> operator+(const complex<T>&);
4418 T template<class T> complex<T> operator-(const complex<T>&);
4420 T template<class T> bool operator==(const complex<T>&, const complex<T>&);
4421 T template<class T> bool operator==(const complex<T>&, const T&);
4422 T template<class T> bool operator==(const T&, const complex<T>&);
4424 T template<class T> bool operator!=(const complex<T>&, const complex<T>&);
4425 T template<class T> bool operator!=(const complex<T>&, const T&);
4426 T template<class T> bool operator!=(const T&, const complex<T>&);
4428 T template<class T, class charT, class traits>
4429 basic_istream<charT, traits>&
4430 operator>>(basic_istream<charT, traits>&, complex<T>&);
4432 T template<class T, class charT, class traits>
4433 basic_ostream<charT, traits>&
4434 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
4437 26.2.3 complex specializations [lib.complex.special]
4439 T template<> class complex<float> {
4441 T typedef float value_type;
4443 T complex(float re = 0.0f, float im = 0.0f);
4444 T explicit complex(const complex<double>&);
4445 T explicit complex(const complex<long double>&);
4446 T float real() const;
4447 T float imag() const;
4449 T complex<float>& operator= (float);
4450 T complex<float>& operator+=(float);
4451 T complex<float>& operator-=(float);
4452 T complex<float>& operator*=(float);
4453 T complex<float>& operator/=(float);
4455 T complex<float>& operator=(const complex<float>&);
4456 T template<class X> complex<float>& operator= (const complex<X>&);
4457 T template<class X> complex<float>& operator+=(const complex<X>&);
4458 T template<class X> complex<float>& operator-=(const complex<X>&);
4459 T template<class X> complex<float>& operator*=(const complex<X>&);
4460 T template<class X> complex<float>& operator/=(const complex<X>&);
4462 T template<> class complex<double> {
4464 T typedef double value_type;
4466 T complex(double re = 0.0, double im = 0.0);
4467 T complex(const complex<float>&);
4468 T explicit complex(const complex<long double>&);
4469 T double real() const;
4470 T double imag() const;
4472 T complex<double>& operator= (double);
4473 T complex<double>& operator+=(double);
4474 T complex<double>& operator-=(double);
4475 T complex<double>& operator*=(double);
4476 T complex<double>& operator/=(double);
4478 T complex<double>& operator=(const complex<double>&);
4479 T template<class X> complex<double>& operator= (const complex<X>&);
4480 T template<class X> complex<double>& operator+=(const complex<X>&);
4481 T template<class X> complex<double>& operator-=(const complex<X>&);
4482 T template<class X> complex<double>& operator*=(const complex<X>&);
4483 T template<class X> complex<double>& operator/=(const complex<X>&);
4486 T template<> class complex<long double> {
4488 T typedef long double value_type;
4490 T complex(long double re = 0.0L, long double im = 0.0L);
4491 T complex(const complex<float>&);
4492 T complex(const complex<double>&);
4493 T long double real() const;
4494 T long double imag() const;
4496 T complex<long double>& operator=(const complex<long double>&);
4497 T complex<long double>& operator= (long double);
4498 T complex<long double>& operator+=(long double);
4499 T complex<long double>& operator-=(long double);
4500 T complex<long double>& operator*=(long double);
4501 T complex<long double>& operator/=(long double);
4503 T template<class X> complex<long double>& operator= (const complex<X>&);
4504 T template<class X> complex<long double>& operator+=(const complex<X>&);
4505 T template<class X> complex<long double>& operator-=(const complex<X>&);
4506 T template<class X> complex<long double>& operator*=(const complex<X>&);
4507 T template<class X> complex<long double>& operator/=(const complex<X>&);
4510 26.3 Numeric arrays [lib.numarray]
4512 26.3.1 Header <valarray> synopsis [lib.valarray.synopsis]
4514 T template<class T> class valarray; // An array of type T
4516 T template<class T> class slice_array;
4518 T template<class T> class gslice_array;
4519 T template<class T> class mask_array; // a masked array
4520 T template<class T> class indirect_array; // an indirected array
4522 T template<class T> valarray<T> operator*
4523 (const valarray<T>&, const valarray<T>&);
4524 T template<class T> valarray<T> operator* (const valarray<T>&, const T&);
4525 T template<class T> valarray<T> operator* (const T&, const valarray<T>&);
4526 T template<class T> valarray<T> operator/
4527 (const valarray<T>&, const valarray<T>&);
4528 T template<class T> valarray<T> operator/ (const valarray<T>&, const T&);
4529 T template<class T> valarray<T> operator/ (const T&, const valarray<T>&);
4530 T template<class T> valarray<T> operator%
4531 (const valarray<T>&, const valarray<T>&);
4532 T template<class T> valarray<T> operator% (const valarray<T>&, const T&);
4533 T template<class T> valarray<T> operator% (const T&, const valarray<T>&);
4534 T template<class T> valarray<T> operator+
4535 (const valarray<T>&, const valarray<T>&);
4536 T template<class T> valarray<T> operator+ (const valarray<T>&, const T&);
4537 T template<class T> valarray<T> operator+ (const T&, const valarray<T>&);
4538 T template<class T> valarray<T> operator-
4539 (const valarray<T>&, const valarray<T>&);
4540 T template<class T> valarray<T> operator- (const valarray<T>&, const T&);
4541 T template<class T> valarray<T> operator- (const T&, const valarray<T>&);
4542 T template<class T> valarray<T> operator^
4543 (const valarray<T>&, const valarray<T>&);
4544 T template<class T> valarray<T> operator^ (const valarray<T>&, const T&);
4545 T template<class T> valarray<T> operator^ (const T&, const valarray<T>&);
4546 T template<class T> valarray<T> operator&
4547 (const valarray<T>&, const valarray<T>&);
4548 T template<class T> valarray<T> operator& (const valarray<T>&, const T&);
4549 T template<class T> valarray<T> operator& (const T&, const valarray<T>&);
4550 T template<class T> valarray<T> operator|
4551 (const valarray<T>&, const valarray<T>&);
4552 T template<class T> valarray<T> operator| (const valarray<T>&, const T&);
4553 T template<class T> valarray<T> operator| (const T&, const valarray<T>&);
4554 T template<class T> valarray<T> operator<<
4555 (const valarray<T>&, const valarray<T>&);
4556 T template<class T> valarray<T> operator<<(const valarray<T>&, const T&);
4557 T template<class T> valarray<T> operator<<(const T&, const valarray<T>&);
4558 T template<class T> valarray<T> operator>>
4559 (const valarray<T>&, const valarray<T>&);
4560 T template<class T> valarray<T> operator>>(const valarray<T>&, const T&);
4561 T template<class T> valarray<T> operator>>(const T&, const valarray<T>&);
4562 T template<class T> valarray<bool> operator&&
4563 (const valarray<T>&, const valarray<T>&);
4564 T template<class T> valarray<bool> operator&&(const valarray<T>&, const T&);
4565 T template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
4566 T template<class T> valarray<bool> operator||
4567 (const valarray<T>&, const valarray<T>&);
4568 T template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
4569 T template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
4571 T template<class T>
4572 valarray<bool> operator==(const valarray<T>&, const valarray<T>&);
4573 T template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
4574 T template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
4575 T template<class T>
4576 valarray<bool> operator!=(const valarray<T>&, const valarray<T>&);
4577 T template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
4578 T template<class T> valarray<bool> operator!=(const T&, const valarray<T>&);
4579 T template<class T>
4580 valarray<bool> operator< (const valarray<T>&, const valarray<T>&);
4581 T template<class T> valarray<bool> operator< (const valarray<T>&, const T&);
4582 T template<class T> valarray<bool> operator< (const T&, const valarray<T>&);
4583 T template<class T>
4584 valarray<bool> operator> (const valarray<T>&, const valarray<T>&);
4585 T template<class T> valarray<bool> operator> (const valarray<T>&, const T&);
4586 T template<class T> valarray<bool> operator> (const T&, const valarray<T>&);
4587 T template<class T>
4588 valarray<bool> operator<=(const valarray<T>&, const valarray<T>&);
4589 T template<class T> valarray<bool> operator<=(const valarray<T>&, const T&);
4590 T template<class T> valarray<bool> operator<=(const T&, const valarray<T>&);
4591 T template<class T>
4592 valarray<bool> operator>=(const valarray<T>&, const valarray<T>&);
4593 T template<class T> valarray<bool> operator>=(const valarray<T>&, const T&);
4594 T template<class T> valarray<bool> operator>=(const T&, const valarray<T>&);
4595 T template<class T> valarray<T> abs (const valarray<T>&);
4596 T template<class T> valarray<T> acos (const valarray<T>&);
4597 T template<class T> valarray<T> asin (const valarray<T>&);
4598 T template<class T> valarray<T> atan (const valarray<T>&);
4599 T template<class T> valarray<T> atan2
4600 (const valarray<T>&, const valarray<T>&);
4601 T template<class T> valarray<T> atan2(const valarray<T>&, const T&);
4602 T template<class T> valarray<T> atan2(const T&, const valarray<T>&);
4603 T template<class T> valarray<T> cos (const valarray<T>&);
4604 T template<class T> valarray<T> cosh (const valarray<T>&);
4605 T template<class T> valarray<T> exp (const valarray<T>&);
4606 T template<class T> valarray<T> log (const valarray<T>&);
4607 T template<class T> valarray<T> log10(const valarray<T>&);
4608 T template<class T> valarray<T> pow(const valarray<T>&, const valarray<T>&);
4609 T template<class T> valarray<T> pow(const valarray<T>&, const T&);
4610 T template<class T> valarray<T> pow(const T&, const valarray<T>&);
4611 T template<class T> valarray<T> sin (const valarray<T>&);
4612 T template<class T> valarray<T> sinh (const valarray<T>&);
4613 T template<class T> valarray<T> sqrt (const valarray<T>&);
4614 T template<class T> valarray<T> tan (const valarray<T>&);
4615 T template<class T> valarray<T> tanh (const valarray<T>&);
4619 26.3.2 Template class valarray [lib.template.valarray]
4621 T template<class T> class valarray {
4623 T typedef T value_type;
4625 // _lib.valarray.cons_ construct/destroy:
4627 T explicit valarray(size_t);
4628 T valarray(const T&, size_t);
4629 T valarray(const T*, size_t);
4630 T valarray(const valarray&);
4631 T valarray(const slice_array<T>&);
4632 T valarray(const gslice_array<T>&);
4633 T valarray(const mask_array<T>&);
4634 T valarray(const indirect_array<T>&);
4637 // _lib.valarray.assign_ assignment:
4638 T valarray<T>& operator=(const valarray<T>&);
4639 T valarray<T>& operator=(const T&);
4640 T valarray<T>& operator=(const slice_array<T>&);
4641 T valarray<T>& operator=(const gslice_array<T>&);
4642 T valarray<T>& operator=(const mask_array<T>&);
4643 T valarray<T>& operator=(const indirect_array<T>&);
4644 // _lib.valarray.access_ element access:
4645 T T operator[](size_t) const;
4646 T T& operator[](size_t);
4647 // _lib.valarray.sub_ subset operations:
4648 T valarray<T> operator[](slice) const;
4649 T slice_array<T> operator[](slice);
4650 T valarray<T> operator[](const gslice&) const;
4651 T gslice_array<T> operator[](const gslice&);
4652 T valarray<T> operator[](const valarray<bool>&) const;
4653 T mask_array<T> operator[](const valarray<bool>&);
4654 T valarray<T> operator[](const valarray<size_t>&) const;
4655 T indirect_array<T> operator[](const valarray<size_t>&);
4656 // _lib.valarray.unary_ unary operators:
4657 T valarray<T> operator+() const;
4658 T valarray<T> operator-() const;
4659 T valarray<T> operator~() const;
4660 T valarray<T> operator!() const;
4661 // _lib.valarray.cassign_ computed assignment:
4662 T valarray<T>& operator*= (const T&);
4663 T valarray<T>& operator/= (const T&);
4664 T valarray<T>& operator%= (const T&);
4665 T valarray<T>& operator+= (const T&);
4666 T valarray<T>& operator-= (const T&);
4667 T valarray<T>& operator^= (const T&);
4668 T valarray<T>& operator&= (const T&);
4669 T valarray<T>& operator|= (const T&);
4670 T valarray<T>& operator<<=(const T&);
4671 T valarray<T>& operator>>=(const T&);
4672 T valarray<T>& operator*= (const valarray<T>&);
4673 T valarray<T>& operator/= (const valarray<T>&);
4674 T valarray<T>& operator%= (const valarray<T>&);
4675 T valarray<T>& operator+= (const valarray<T>&);
4676 T valarray<T>& operator-= (const valarray<T>&);
4677 T valarray<T>& operator^= (const valarray<T>&);
4678 T valarray<T>& operator|= (const valarray<T>&);
4679 T valarray<T>& operator&= (const valarray<T>&);
4680 T valarray<T>& operator<<=(const valarray<T>&);
4681 T valarray<T>& operator>>=(const valarray<T>&);
4682 // _lib.valarray.members_ member functions:
4683 T size_t size() const;
4688 T valarray<T> shift (int) const;
4689 T valarray<T> cshift(int) const;
4690 T valarray<T> apply(T func(T)) const;
4691 T valarray<T> apply(T func(const T&)) const;
4692 T void resize(size_t sz, T c = T());
4698 26.3.4 Class slice [lib.class.slice]
4703 T slice(size_t, size_t, size_t);
4705 T size_t start() const;
4706 T size_t size() const;
4707 T size_t stride() const;
4713 26.3.5 Template class slice_array [lib.template.slice.array]
4715 T template <class T> class slice_array {
4717 T typedef T value_type;
4719 T void operator= (const valarray<T>&) const;
4720 T void operator*= (const valarray<T>&) const;
4721 T void operator/= (const valarray<T>&) const;
4722 T void operator%= (const valarray<T>&) const;
4723 T void operator+= (const valarray<T>&) const;
4724 T void operator-= (const valarray<T>&) const;
4725 T void operator^= (const valarray<T>&) const;
4726 T void operator&= (const valarray<T>&) const;
4727 T void operator|= (const valarray<T>&) const;
4728 T void operator<<=(const valarray<T>&) const;
4729 T void operator>>=(const valarray<T>&) const;
4730 T void operator=(const T&);
4734 T slice_array(const slice_array&);
4735 T slice_array& operator=(const slice_array&);
4741 26.3.6 The gslice class [lib.class.gslice]
4746 T gslice(size_t s, const valarray<size_t>& l, const valarray<size_t>& d);
4748 T size_t start() const;
4749 T valarray<size_t> size() const;
4750 T valarray<size_t> stride() const;
4754 26.3.7 Template class gslice_array [lib.template.gslice.array]
4756 T template <class T> class gslice_array {
4758 T typedef T value_type;
4760 T void operator= (const valarray<T>&) const;
4761 T void operator*= (const valarray<T>&) const;
4762 T void operator/= (const valarray<T>&) const;
4763 T void operator%= (const valarray<T>&) const;
4764 T void operator+= (const valarray<T>&) const;
4765 T void operator-= (const valarray<T>&) const;
4766 T void operator^= (const valarray<T>&) const;
4767 T void operator&= (const valarray<T>&) const;
4768 T void operator|= (const valarray<T>&) const;
4769 T void operator<<=(const valarray<T>&) const;
4770 T void operator>>=(const valarray<T>&) const;
4771 T void operator=(const T&);
4775 T gslice_array(const gslice_array&);
4776 T gslice_array& operator=(const gslice_array&);
4780 26.3.8 Template class mask_array [lib.template.mask.array]
4782 T template <class T> class mask_array {
4784 T typedef T value_type;
4786 T void operator= (const valarray<T>&) const;
4787 T void operator*= (const valarray<T>&) const;
4788 T void operator/= (const valarray<T>&) const;
4789 T void operator%= (const valarray<T>&) const;
4790 T void operator+= (const valarray<T>&) const;
4791 T void operator-= (const valarray<T>&) const;
4792 T void operator^= (const valarray<T>&) const;
4793 T void operator&= (const valarray<T>&) const;
4794 T void operator|= (const valarray<T>&) const;
4795 T void operator<<=(const valarray<T>&) const;
4796 T void operator>>=(const valarray<T>&) const;
4797 T void operator=(const T&);
4801 T mask_array(const mask_array&);
4802 T mask_array& operator=(const mask_array&);
4803 // remainder implementation defined
4807 26.3.9 Template class [lib.template.indirect.array]
4810 T template <class T> class indirect_array {
4812 T typedef T value_type;
4814 T void operator= (const valarray<T>&) const;
4815 T void operator*= (const valarray<T>&) const;
4816 T void operator/= (const valarray<T>&) const;
4817 T void operator%= (const valarray<T>&) const;
4818 T void operator+= (const valarray<T>&) const;
4819 T void operator-= (const valarray<T>&) const;
4820 T void operator^= (const valarray<T>&) const;
4821 T void operator&= (const valarray<T>&) const;
4822 T void operator|= (const valarray<T>&) const;
4823 T void operator<<=(const valarray<T>&) const;
4824 T void operator>>=(const valarray<T>&) const;
4825 T void operator=(const T&);
4826 T ~indirect_array();
4829 T indirect_array(const indirect_array&);
4830 T indirect_array& operator=(const indirect_array&);
4831 // remainder implementation defined
4834 26.4 Generalized numeric operations [lib.numeric.ops]
4836 Header <numeric> synopsis
4838 T template <class InputIterator, class T>
4839 T accumulate(InputIterator first, InputIterator last, T init);
4841 T template <class InputIterator, class T, class BinaryOperation>
4842 T accumulate(InputIterator first, InputIterator last, T init,
4843 BinaryOperation binary_op);
4845 T template <class InputIterator1, class InputIterator2, class T>
4846 T inner_product(InputIterator1 first1, InputIterator1 last1,
4847 InputIterator2 first2, T init);
4849 T template <class InputIterator1, class InputIterator2, class T,
4850 class BinaryOperation1, class BinaryOperation2>
4851 T inner_product(InputIterator1 first1, InputIterator1 last1,
4852 InputIterator2 first2, T init,
4853 BinaryOperation1 binary_op1,
4854 BinaryOperation2 binary_op2);
4856 T template <class InputIterator, class OutputIterator>
4857 OutputIterator partial_sum(InputIterator first,
4859 OutputIterator result);
4861 T template <class InputIterator, class OutputIterator,
4862 class BinaryOperation>
4863 OutputIterator partial_sum(InputIterator first,
4865 OutputIterator result,
4866 BinaryOperation binary_op);
4868 T template <class InputIterator, class OutputIterator>
4869 OutputIterator adjacent_difference(InputIterator first,
4871 OutputIterator result);
4873 T template <class InputIterator, class OutputIterator,
4874 class BinaryOperation>
4875 OutputIterator adjacent_difference(InputIterator first,
4877 OutputIterator result,
4878 BinaryOperation binary_op);
4881 26.5 C Library [lib.c.math]
4883 Table 2--Header <cmath> synopsis
4886 X acos cos fmod modf tan
4887 X asin cosh frexp pow tanh
4888 X atan exp ldexp sin
4889 X atan2 fabs log sinh
4890 X ceil floor log10 sqrt
4892 Table 3--Header <cstdlib> synopsis
4894 X Types: div_t ldiv_t
4899 X long abs(long); // labs()
4900 X ldiv_t div(long, long); // ldiv()
4902 X float abs (float);
4903 X float acos (float);
4904 X float asin (float);
4905 X float atan (float);
4906 X float atan2(float, float);
4907 X float ceil (float);
4908 X float cos (float);
4909 X float cosh (float);
4910 X float exp (float);
4911 X float fabs (float);
4912 X float floor(float);
4913 X float fmod (float, float);
4914 X float frexp(float, int*);
4915 X float ldexp(float, int);
4916 X float log (float);
4917 X float log10(float);
4918 X float modf (float, float*);
4919 X float pow (float, float);
4920 X float pow (float, int);
4921 X float sin (float);
4922 X float sinh (float);
4923 X float sqrt (float);
4924 X float tan (float);
4925 X float tanh (float);
4927 X double abs(double); // fabs()
4928 X double pow(double, int);
4930 X long double abs (long double);
4931 X long double acos (long double);
4932 X long double asin (long double);
4933 X long double atan (long double);
4934 X long double atan2(long double, long double);
4935 X long double ceil (long double);
4936 X long double cos (long double);
4937 X long double cosh (long double);
4938 X long double exp (long double);
4939 X long double fabs (long double);
4940 X long double floor(long double);
4941 X long double fmod (long double, long double);
4942 X long double frexp(long double, int*);
4943 X long double ldexp(long double, int);
4944 X long double log (long double);
4945 X long double log10(long double);
4946 X long double modf (long double, long double*);
4947 X long double pow (long double, long double);
4948 X long double pow (long double, int);
4949 X long double sin (long double);
4950 X long double sinh (long double);
4951 X long double sqrt (long double);
4952 X long double tan (long double);
4953 X long double tanh (long double);
4955 Header <iosfwd> synopsis
4957 X template<class charT> class char_traits;
4958 X template<> class char_traits<char>;
4959 X template<> class char_traits<wchar_t>;
4960 X template<class T> class allocator;
4961 X template <class charT, class traits = char_traits<charT> >
4964 X template <class charT, class traits = char_traits<charT> >
4965 class basic_streambuf;
4967 X template <class charT, class traits = char_traits<charT> >
4968 class basic_istream;
4970 X template <class charT, class traits = char_traits<charT> >
4971 class basic_ostream;
4973 X template <class charT, class traits = char_traits<charT> >
4974 class basic_iostream;
4976 X template <class charT, class traits = char_traits<charT>,
4977 class Allocator = allocator<charT> >
4978 class basic_stringbuf;
4980 X template <class charT, class traits = char_traits<charT>,
4981 class Allocator = allocator<charT> >
4982 class basic_istringstream;
4984 X template <class charT, class traits = char_traits<charT>,
4985 class Allocator = allocator<charT> >
4986 class basic_ostringstream;
4988 X template <class charT, class traits = char_traits<charT>,
4989 class Allocator = allocator<charT> >
4990 class basic_stringstream;
4992 X template <class charT, class traits = char_traits<charT> >
4993 class basic_filebuf;
4995 X template <class charT, class traits = char_traits<charT> >
4996 class basic_ifstream;
4998 X template <class charT, class traits = char_traits<charT> >
4999 class basic_ofstream;
5001 X template <class charT, class traits = char_traits<charT> >
5002 class basic_fstream;
5003 X template <class charT, class traits = char_traits<charT> >
5004 class istreambuf_iterator;
5006 X template <class charT, class traits = char_traits<charT> >
5007 class ostreambuf_iterator;
5008 X typedef basic_ios<char> ios;
5009 X typedef basic_ios<wchar_t> wios;
5010 X typedef basic_streambuf<char> streambuf;
5011 X typedef basic_istream<char> istream;
5012 X typedef basic_ostream<char> ostream;
5013 X typedef basic_iostream<char> iostream;
5014 X typedef basic_stringbuf<char> stringbuf;
5015 X typedef basic_istringstream<char> istringstream;
5016 X typedef basic_ostringstream<char> ostringstream;
5017 X typedef basic_stringstream<char> stringstream;
5018 X typedef basic_filebuf<char> filebuf;
5019 X typedef basic_ifstream<char> ifstream;
5020 X typedef basic_ofstream<char> ofstream;
5021 X typedef basic_fstream<char> fstream;
5022 X typedef basic_streambuf<wchar_t> wstreambuf;
5023 X typedef basic_istream<wchar_t> wistream;
5024 X typedef basic_ostream<wchar_t> wostream;
5025 X typedef basic_iostream<wchar_t> wiostream;
5026 X typedef basic_stringbuf<wchar_t> wstringbuf;
5027 X typedef basic_istringstream<wchar_t> wistringstream;
5028 X typedef basic_ostringstream<wchar_t> wostringstream;
5029 X typedef basic_stringstream<wchar_t> wstringstream;
5031 X typedef basic_filebuf<wchar_t> wfilebuf;
5032 X typedef basic_ifstream<wchar_t> wifstream;
5033 X typedef basic_ofstream<wchar_t> wofstream;
5034 X typedef basic_fstream<wchar_t> wfstream;
5035 X template <class state> class fpos;
5036 X typedef fpos<char_traits<char>::state_type> streampos;
5037 X typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
5039 27.3 Standard iostream objects [lib.iostream.objects]
5041 Header <iostream> synopsis
5043 T [must also include <istream> and <ostream>]
5044 T extern istream cin;
5045 T extern ostream cout;
5046 T extern ostream cerr;
5047 T extern ostream clog;
5049 T extern wistream wcin;
5050 T extern wostream wcout;
5051 T extern wostream wcerr;
5052 T extern wostream wclog;
5054 27.4 Iostreams base classes [lib.iostreams.base]
5056 Header <ios> synopsis
5058 #include <iosfwd>
5060 T typedef OFF_T streamoff;
5061 T typedef SZ_T streamsize;
5062 T template <class stateT> class fpos;
5065 template <class charT, class traits = char_traits<charT> >
5067 // _lib.std.ios.manip_, manipulators:
5068 T ios_base& boolalpha (ios_base& str);
5069 T ios_base& noboolalpha(ios_base& str);
5070 T ios_base& showbase (ios_base& str);
5071 T ios_base& noshowbase (ios_base& str);
5072 T ios_base& showpoint (ios_base& str);
5073 T ios_base& noshowpoint(ios_base& str);
5074 T ios_base& showpos (ios_base& str);
5075 T ios_base& noshowpos (ios_base& str);
5076 T ios_base& skipws (ios_base& str);
5077 T ios_base& noskipws (ios_base& str);
5078 T ios_base& nouppercase(ios_base& str);
5079 T ios_base& uppercase (ios_base& str);
5080 M ios_base& unitbuf (ios_base& str);
5081 M ios_base& nounitbuf (ios_base& str);
5082 // _lib.adjustfield.manip_ adjustfield:
5083 T ios_base& internal (ios_base& str);
5084 T ios_base& left (ios_base& str);
5085 T ios_base& right (ios_base& str);
5086 // _lib.basefield.manip_ basefield:
5087 T ios_base& dec (ios_base& str);
5088 T ios_base& hex (ios_base& str);
5089 T ios_base& oct (ios_base& str);
5091 // _lib.floatfield.manip_ floatfield:
5092 T ios_base& fixed (ios_base& str);
5093 T ios_base& scientific (ios_base& str);
5096 27.4.2 Class ios_base [lib.ios.base]
5101 T typedef T1 fmtflags;
5102 T static const fmtflags boolalpha;
5103 T static const fmtflags dec;
5104 T static const fmtflags fixed;
5105 T static const fmtflags hex;
5106 T static const fmtflags internal;
5107 T static const fmtflags left;
5108 T static const fmtflags oct;
5109 T static const fmtflags right;
5110 T static const fmtflags scientific;
5111 T static const fmtflags showbase;
5112 T static const fmtflags showpoint;
5113 T static const fmtflags showpos;
5114 T static const fmtflags skipws;
5115 X static const fmtflags unitbuf;
5116 T static const fmtflags uppercase;
5117 T static const fmtflags adjustfield;
5118 T static const fmtflags basefield;
5119 T static const fmtflags floatfield;
5122 T static const iostate badbit;
5123 T static const iostate eofbit;
5124 T static const iostate failbit;
5125 T static const iostate goodbit;
5126 T typedef T3 openmode;
5127 T static const openmode app;
5128 T static const openmode ate;
5129 T static const openmode binary;
5130 T static const openmode in;
5131 T static const openmode out;
5132 T static const openmode trunc;
5133 T typedef T4 seekdir;
5134 T static const seekdir beg;
5135 T static const seekdir cur;
5136 T static const seekdir end;
5138 // _lib.fmtflags.state_ fmtflags state:
5139 T fmtflags flags() const;
5140 T fmtflags flags(fmtflags fmtfl);
5141 T fmtflags setf(fmtflags fmtfl);
5142 T fmtflags setf(fmtflags fmtfl, fmtflags mask);
5143 T void unsetf(fmtflags mask);
5144 T streamsize precision() const;
5145 T streamsize precision(streamsize prec);
5146 T streamsize width() const;
5147 T streamsize width(streamsize wide);
5148 // _lib.ios.base.locales_ locales:
5149 T locale imbue(const locale& loc);
5150 T locale getloc() const;
5151 // _lib.ios.base.storage_ storage:
5152 T static int xalloc();
5153 T long& iword(int index);
5154 T void*& pword(int index);
5156 T virtual ~ios_base();
5157 // _lib.ios.base.callback_ callbacks;
5158 T enum event { erase_event, imbue_event, copyfmt_event };
5159 T typedef void (*event_callback)(event, ios_base&, int index);
5160 T void register_callback(event_call_back fn, int index);
5161 T static bool sync_with_stdio(bool sync = true);
5166 27.4.2.1.1 Class ios_base::failure [lib.ios::failure]
5168 T class ios_base::failure : public exception {
5170 T explicit failure(const string& msg);
5171 T virtual ~failure();
5172 T virtual const char* what() const throw();
5176 27.4.2.1.6 Class ios_base::Init [lib.ios::Init]
5178 T class ios_base::Init {
5185 27.4.3 Template class fpos [lib.fpos]
5187 X template <class stateT> class fpos {
5189 // _lib.fpos.members_ Members
5190 T stateT state() const;
5191 T void state(stateT);
5193 T stateT st; // exposition only
5197 27.4.5 Template class basic_ios [lib.ios]
5199 template <class charT, class traits = char_traits<charT> >
5200 X class basic_ios : public ios_base {
5204 T typedef charT char_type;
5205 T typedef typename traits::int_type int_type;
5206 T typedef typename traits::pos_type pos_type;
5207 T typedef typename traits::off_type off_type;
5208 T typedef traits traits_type;
5209 T operator void*() const
5210 T bool operator!() const
5211 T iostate rdstate() const;
5212 T void clear(iostate state = goodbit);
5213 T void setstate(iostate state);
5214 T bool good() const;
5216 T bool fail() const;
5218 T iostate exceptions() const;
5219 T void exceptions(iostate except);
5220 // _lib.basic.ios.cons_ Constructor/destructor:
5221 T explicit basic_ios(basic_streambuf<charT,traits>* sb);
5222 T virtual ~basic_ios();
5223 // _lib.basic.ios.members_ Members:
5224 T basic_ostream<charT,traits>* tie() const;
5225 T basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr);
5226 T basic_streambuf<charT,traits>* rdbuf() const;
5227 T basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb);
5228 X basic_ios& copyfmt(const basic_ios& rhs);
5229 T char_type fill() const;
5230 T char_type fill(char_type ch);
5231 // _lib.ios.base.locales_ locales:
5232 T locale imbue(const locale& loc);
5233 X char narrow(char_type c, char dfault) const;
5234 X char_type widen(char c) const;
5237 T void init(basic_streambuf<charT,traits>* sb);
5239 T basic_ios(const basic_ios& ); // not defined
5240 T basic_ios& operator=(const basic_ios&); // not defined
5244 27.5 Stream buffers [lib.stream.buffers]
5246 Header <streambuf> synopsis
5248 X template <class charT, class traits = char_traits<charT> >
5249 class basic_streambuf;
5250 T typedef basic_streambuf<char> streambuf;
5251 T typedef basic_streambuf<wchar_t> wstreambuf;
5253 27.5.2 Template class [lib.streambuf]
5254 basic_streambuf<charT,traits>
5256 template <class charT, class traits = char_traits<charT> >
5257 X class basic_streambuf {
5261 T typedef charT char_type;
5262 T typedef typename traits::int_type int_type;
5263 T typedef typename traits::pos_type pos_type;
5264 T typedef typename traits::off_type off_type;
5265 T typedef traits traits_type;
5266 T virtual ~basic_streambuf();
5267 // _lib.streambuf.locales_ locales:
5268 T locale pubimbue(const locale &loc);
5269 T locale getloc() const;
5270 // _lib.streambuf.buffer_ buffer and positioning:
5271 T basic_streambuf<char_type,traits>*
5272 pubsetbuf(char_type* s, streamsize n);
5273 T pos_type pubseekoff(off_type off, ios_base::seekdir way,
5274 ios_base::openmode which =
5275 ios_base::in | ios_base::out);
5276 T pos_type pubseekpos(pos_type sp,
5277 ios_base::openmode which =
5278 ios_base::in | ios_base::out);
5281 // Get and put areas:
5282 // _lib.streambuf.pub.get_ Get area:
5283 T streamsize in_avail();
5284 T int_type snextc();
5285 T int_type sbumpc();
5287 T streamsize sgetn(char_type* s, streamsize n);
5288 // _lib.streambuf.pub.pback_ Putback:
5289 X int_type sputbackc(char_type c);
5290 X int_type sungetc();
5291 // _lib.streambuf.pub.put_ Put area:
5292 T int_type sputc(char_type c);
5293 X streamsize sputn(const char_type* s, streamsize n);
5295 T basic_streambuf();
5296 // _lib.streambuf.get.area_ Get area:
5297 T char_type* eback() const;
5298 T char_type* gptr() const;
5299 T char_type* egptr() const;
5300 T void gbump(int n);
5301 T void setg(char_type* gbeg, char_type* gnext, char_type* gend);
5302 // _lib.streambuf.put.area_ Put area:
5303 T char_type* pbase() const;
5304 T char_type* pptr() const;
5305 T char_type* epptr() const;
5306 T void pbump(int n);
5307 T void setp(char_type* pbeg, char_type* pend);
5308 // _lib.streambuf.virtuals_ virtual functions:
5309 // _lib.streambuf.virt.locales_ Locales:
5310 T virtual void imbue(const locale &loc);
5311 // _lib.streambuf.virt.buffer_ Buffer management and positioning:
5312 T virtual basic_streambuf<char_type,traits>*
5313 setbuf(char_type* s, streamsize n);
5314 T virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5315 ios_base::openmode which = ios_base::in | ios_base::out);
5316 T virtual pos_type seekpos(pos_type sp,
5317 ios_base::openmode which = ios_base::in | ios_base::out);
5318 T virtual int sync();
5319 // _lib.streambuf.virt.get_ Get area:
5320 T virtual int showmanyc();
5321 T virtual streamsize xsgetn(char_type* s, streamsize n);
5322 T virtual int_type underflow();
5323 T virtual int_type uflow();
5324 // _lib.streambuf.virt.pback_ Putback:
5325 T virtual int_type pbackfail(int_type c = traits::eof());
5326 // _lib.streambuf.virt.put_ Put area:
5327 X virtual streamsize xsputn(const char_type* s, streamsize n);
5328 T virtual int_type overflow (int_type c = traits::eof());
5331 27.6 Formatting and manipulators [lib.iostream.format]
5333 Header <istream> synopsis
5335 T template <class charT, class traits = char_traits<charT> >
5336 class basic_istream;
5337 T typedef basic_istream<char> istream;
5338 T typedef basic_istream<wchar_t> wistream;
5340 T template <class charT, class traits = char_traits<charT> >
5341 class basic_iostream;
5342 T typedef basic_iostream<char> iostream;
5343 T typedef basic_iostream<wchar_t> wiostream;
5345 X template <class charT, class traits>
5346 basic_istream<charT,traits>& ws(basic_istream<charT,traits>& is);
5348 Header <ostream> synopsis
5350 X template <class charT, class traits = char_traits<charT> >
5351 class basic_ostream;
5352 T typedef basic_ostream<char> ostream;
5353 T typedef basic_ostream<wchar_t> wostream;
5355 T template <class charT, class traits>
5356 basic_ostream<charT,traits>& endl(basic_ostream<charT,traits>& os);
5357 T template <class charT, class traits>
5358 basic_ostream<charT,traits>& ends(basic_ostream<charT,traits>& os);
5359 T template <class charT, class traits>
5360 basic_ostream<charT,traits>& flush(basic_ostream<charT,traits>& os);
5362 Header <iomanip> synopsis
5364 // Types T1, T2, ... are unspecified implementation types
5365 T T1 resetiosflags(ios_base::fmtflags mask);
5366 T T2 setiosflags (ios_base::fmtflags mask);
5367 T T3 setbase(int base);
5368 T template<charT> T4 setfill(charT c);
5369 T T5 setprecision(int n);
5373 27.6.1.1 Template class basic_istream [lib.istream]
5375 template <class charT, class traits = char_traits<charT> >
5376 T class basic_istream : virtual public basic_ios<charT,traits> {
5378 // Types (inherited from basic_ios (_lib.ios_)):
5379 T typedef charT char_type;
5380 T typedef typename traits::int_type int_type;
5381 T typedef typename traits::pos_type pos_type;
5382 T typedef typename traits::off_type off_type;
5383 T typedef traits traits_type;
5384 // _lib.istream.cons_ Constructor/destructor:
5385 T explicit basic_istream(basic_streambuf<charT,traits>* sb);
5386 T virtual ~basic_istream();
5387 // _lib.istream::sentry_ Prefix/suffix:
5390 // _lib.istream.formatted_ Formatted input:
5391 T basic_istream<charT,traits>& operator>>
5392 (basic_istream<charT,traits>& (*pf)(basic_istream<charT,traits>&))
5393 T basic_istream<charT,traits>& operator>>
5394 (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&))
5395 T basic_istream<charT,traits>& operator>>
5396 (ios_base& (*pf)(ios_base&))
5397 S basic_istream<charT,traits>& operator>>(bool& n);
5398 S basic_istream<charT,traits>& operator>>(short& n);
5399 S basic_istream<charT,traits>& operator>>(unsigned short& n);
5400 S basic_istream<charT,traits>& operator>>(int& n);
5401 S basic_istream<charT,traits>& operator>>(unsigned int& n);
5402 S basic_istream<charT,traits>& operator>>(long& n);
5403 S basic_istream<charT,traits>& operator>>(unsigned long& n);
5404 S basic_istream<charT,traits>& operator>>(float& f);
5405 S basic_istream<charT,traits>& operator>>(double& f);
5406 S basic_istream<charT,traits>& operator>>(long double& f);
5407 S basic_istream<charT,traits>& operator>>(void*& p);
5408 S basic_istream<charT,traits>& operator>>
5409 (basic_streambuf<char_type,traits>* sb);
5410 // _lib.istream.unformatted_ Unformatted input:
5411 T streamsize gcount() const;
5413 S basic_istream<charT,traits>& get(char_type& c);
5414 S basic_istream<charT,traits>& get(char_type* s, streamsize n);
5415 S basic_istream<charT,traits>& get(char_type* s, streamsize n,
5417 S basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& sb);
5418 S basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& sb,
5420 S basic_istream<charT,traits>& getline(char_type* s, streamsize n);
5421 S basic_istream<charT,traits>& getline(char_type* s, streamsize n,
5423 S basic_istream<charT,traits>& ignore
5424 (streamsize n = 1, int_type delim = traits::eof());
5426 S basic_istream<charT,traits>& read (char_type* s, streamsize n);
5427 S streamsize readsome(char_type* s, streamsize n);
5428 S basic_istream<charT,traits>& putback(char_type c);
5429 S basic_istream<charT,traits>& unget();
5433 S basic_istream<charT,traits>& seekg(pos_type);
5434 S basic_istream<charT,traits>& seekg(off_type, ios_base::seekdir);
5437 // _lib.istream::extractors_ character extraction templates:
5438 S template<class charT, class traits>
5439 basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&,
5441 S template<class traits>
5442 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5443 unsigned char&);
5444 S template<class traits>
5445 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5448 S template<class charT, class traits>
5449 basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&,
5451 S template<class traits>
5452 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5454 S template<class traits>
5455 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5458 27.6.1.1.2 Class basic_istream::sentry [lib.istream::sentry]
5461 template <class charT,class traits = char_traits<charT> >
5462 S class basic_istream<charT,traits>::sentry {
5463 typedef traits traits_type;
5464 S bool ok_; // exposition only
5466 S explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
5468 S operator bool() const { return ok_; }
5470 T sentry(const sentry&); // not defined
5471 T sentry& operator=(const sentry&); // not defined
5475 27.6.1.5 Template class basic_iostream [lib.iostreamclass]
5477 template <class charT, class traits = char_traits<charT> >
5478 T class basic_iostream :
5479 public basic_istream<charT,traits>,
5480 public basic_ostream<charT,traits> {
5482 // constructor/destructor
5483 T explicit basic_iostream(basic_streambuf<charT,traits>* sb);
5484 T virtual ~basic_iostream();
5488 27.6.2.1 Template class basic_ostream [lib.ostream]
5490 template <class charT, class traits = char_traits<charT> >
5491 X class basic_ostream : virtual public basic_ios<charT,traits> {
5493 // Types (inherited from basic_ios (_lib.ios_)):
5494 T typedef charT char_type;
5495 T typedef typename traits::int_type int_type;
5496 T typedef typename traits::pos_type pos_type;
5497 T typedef typename traits::off_type off_type;
5498 T typedef traits traits_type;
5499 // _lib.ostream.cons_ Constructor/destructor:
5500 T explicit basic_ostream(basic_streambuf<char_type,traits>* sb);
5501 T virtual ~basic_ostream();
5502 // _lib.ostream::sentry_ Prefix/suffix:
5504 // _lib.ostream.formatted_ Formatted output:
5505 T basic_ostream<charT,traits>& operator<<
5506 (basic_ostream<charT,traits>& (*pf)(basic_ostream<charT,traits>&));
5507 T basic_ostream<charT,traits>& operator<<
5508 (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&));
5509 T basic_ostream<charT,traits>& operator<<
5510 (ios_base& (*pf)(ios_base&));
5511 T basic_ostream<charT,traits>& operator<<(bool n);
5512 T basic_ostream<charT,traits>& operator<<(short n);
5513 T basic_ostream<charT,traits>& operator<<(unsigned short n);
5514 T basic_ostream<charT,traits>& operator<<(int n);
5515 T basic_ostream<charT,traits>& operator<<(unsigned int n);
5516 T basic_ostream<charT,traits>& operator<<(long n);
5517 T basic_ostream<charT,traits>& operator<<(unsigned long n);
5518 S basic_ostream<charT,traits>& operator<<(float f);
5519 S basic_ostream<charT,traits>& operator<<(double f);
5520 S basic_ostream<charT,traits>& operator<<(long double f);
5521 T basic_ostream<charT,traits>& operator<<(const void* p);
5522 X basic_ostream<charT,traits>& operator<<
5523 (basic_streambuf<char_type,traits>* sb);
5524 // _lib.ostream.unformatted_ Unformatted output:
5525 T basic_ostream<charT,traits>& put(char_type c);
5526 T basic_ostream<charT,traits>& write(const char_type* s, streamsize n);
5527 X basic_ostream<charT,traits>& flush();
5529 // _lib.ostream.seeks_ seeks:
5531 S basic_ostream<charT,traits>& seekp(pos_type);
5532 S basic_ostream<charT,traits>& seekp(off_type, ios_base::seekdir);
5534 // _lib.ostream.inserters.character_ character inserters
5535 X template<class charT, class traits>
5536 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5538 X template<class charT, class traits>
5539 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5542 X template<class traits>
5543 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5545 // signed and unsigned
5546 X template<class traits>
5547 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5549 X template<class traits>
5550 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5552 X template<class charT, class traits>
5553 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5555 X template<class charT, class traits>
5556 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5558 // partial specializationss
5559 X template<class traits>
5560 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5562 // signed and unsigned
5563 X template<class traits>
5564 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5565 const signed char*);
5566 X template<class traits>
5567 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5568 const unsigned char*);
5571 27.6.2.3 Class basic_ostream::sentry [lib.ostream::sentry]
5573 template <class charT,class traits = char_traits<charT> >
5574 X class basic_ostream<charT,traits>::sentry {
5575 bool ok_; // exposition only
5577 X explicit sentry(basic_ostream<charT,traits>& os);
5579 X operator bool() const { return ok_; }
5581 X sentry(const sentry&); // not defined
5582 X sentry& operator=(const sentry&); // not defined
5585 27.7 String-based streams [lib.string.streams]
5587 Header <sstream> synopsis
5589 X template <class charT, class traits = char_traits<charT>,
5590 class Allocator = allocator<charT> >
5591 class basic_stringbuf;
5593 T typedef basic_stringbuf<char> stringbuf;
5594 T typedef basic_stringbuf<wchar_t> wstringbuf;
5596 template <class charT, class traits = char_traits<charT>,
5597 class Allocator = allocator<charT> >
5598 X class basic_istringstream;
5600 T typedef basic_istringstream<char> istringstream;
5601 T typedef basic_istringstream<wchar_t> wistringstream;
5603 template <class charT, class traits = char_traits<charT>,
5604 class Allocator = allocator<charT> >
5605 X class basic_ostringstream;
5606 T typedef basic_ostringstream<char> ostringstream;
5607 T typedef basic_ostringstream<wchar_t> wostringstream;
5609 template <class charT, class traits = char_traits<charT>,
5610 class Allocator = allocator<charT> >
5611 X class basic_stringstream;
5612 T typedef basic_stringstream<char> stringstream;
5613 T typedef basic_stringstream<wchar_t> wstringstream;
5615 27.7.1 Template class basic_stringbuf [lib.stringbuf]
5617 template <class charT, class traits = char_traits<charT>,
5618 class Allocator = allocator<charT> >
5619 X class basic_stringbuf : public basic_streambuf<charT,traits> {
5621 T typedef charT char_type;
5622 T typedef typename traits::int_type int_type;
5623 T typedef typename traits::pos_type pos_type;
5624 T typedef typename traits::off_type off_type;
5625 T typedef traits traits_type;
5626 // _lib.stringbuf.cons_ Constructors:
5627 S explicit basic_stringbuf(ios_base::openmode which
5628 = ios_base::in | ios_base::out);
5629 S explicit basic_stringbuf
5630 (const basic_string<charT,traits,Allocator>& str,
5631 ios_base::openmode which = ios_base::in | ios_base::out);
5632 // _lib.stringbuf.members_ Get and set:
5633 S basic_string<charT,traits,Allocator> str() const;
5634 S void str(const basic_string<charT,traits,Allocator>& s);
5637 // _lib.stringbuf.virtuals_ Overridden virtual functions:
5638 S virtual int_type underflow();
5639 S virtual int_type pbackfail(int_type c = traits::eof());
5640 S virtual int_type overflow (int_type c = traits::eof());
5641 S virtual basic_streambuf<charT,traits>* setbuf(charT*, streamsize);
5643 S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5644 ios_base::openmode which
5645 = ios_base::in | ios_base::out);
5646 S virtual pos_type seekpos(pos_type sp,
5647 ios_base::openmode which
5648 = ios_base::in | ios_base::out);
5652 27.7.2 Template class basic_istringstream [lib.istringstream]
5654 template <class charT, class traits = char_traits<charT>,
5655 class Allocator = allocator<charT> >
5656 X class basic_istringstream : public basic_istream<charT,traits> {
5658 T typedef charT char_type;
5659 T typedef typename traits::int_type int_type;
5660 T typedef typename traits::pos_type pos_type;
5661 T typedef typename traits::off_type off_type;
5662 T typedef traits traits_type;
5663 // _lib.istringstream.cons_ Constructors:
5664 S explicit basic_istringstream(ios_base::openmode which = ios_base::in);
5665 S explicit basic_istringstream(
5666 const basic_string<charT,traits,Allocator>& str,
5667 ios_base::openmode which = ios_base::in);
5669 // _lib.istringstream.members_ Members:
5670 S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
5671 S basic_string<charT,traits,Allocator> str() const;
5672 S void str(const basic_string<charT,traits,Allocator>& s);
5674 // basic_stringbuf<charT,traits,Allocator> sb; exposition only
5677 27.7.3 Class basic_ostringstream [lib.ostringstream]
5679 template <class charT, class traits = char_traits<charT>,
5680 class Allocator = allocator<charT> >
5681 X class basic_ostringstream : public basic_ostream<charT,traits> {
5685 T typedef charT char_type;
5686 T typedef typename traits::int_type int_type;
5687 T typedef typename traits::pos_type pos_type;
5688 T typedef typename traits::off_type off_type;
5689 // _lib.ostringstream.cons_ Constructors/destructor:
5690 S explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
5691 S explicit basic_ostringstream(
5692 const basic_string<charT,traits,Allocator>& str,
5693 ios_base::openmode which = ios_base::out);
5694 // _lib.ostringstream.members_ Members:
5695 S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
5696 S basic_string<charT,traits,Allocator> str() const;
5697 S void str(const basic_string<charT,traits,Allocator>& s);
5701 27.7.4 Template class basic_stringstream [lib.stringstream]
5703 template <class charT, class traits = char_traits<charT>,
5704 class Allocator = allocator<charT> >
5705 X class basic_stringstream
5706 : public basic_iostream<charT,traits> {
5709 T typedef charT char_type;
5710 T typedef typename traits::int_type int_type;
5711 T typedef typename traits::pos_type pos_type;
5712 T typedef typename traits::off_type off_type;
5713 // constructors/destructors
5714 S explicit basic_stringstream(
5715 ios_base::openmode which = ios_base::out|ios_base::in);
5716 S explicit basic_stringstream(
5717 const basic_string<charT,traits,Allocator>& str,
5718 ios_base::openmode which = ios_base::out|ios_base::in);
5720 S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
5721 S basic_string<charT,traits,Allocator> str() const;
5722 S void str(const basic_string<charT,traits,Allocator>& str);
5727 27.8.1 File streams [lib.fstreams]
5730 Header <fstream> synopsis
5732 X template <class charT, class traits = char_traits<charT> >
5733 class basic_filebuf;
5734 T typedef basic_filebuf<char> filebuf;
5735 T typedef basic_filebuf<wchar_t> wfilebuf;
5737 X template <class charT, class traits = char_traits<charT> >
5738 class basic_ifstream;
5739 T typedef basic_ifstream<char> ifstream;
5740 T typedef basic_ifstream<wchar_t> wifstream;
5742 X template <class charT, class traits = char_traits<charT> >
5743 class basic_ofstream;
5744 T typedef basic_ofstream<char> ofstream;
5745 T typedef basic_ofstream<wchar_t> wofstream;
5747 X template <class charT, class traits = char_traits<charT> >
5748 class basic_fstream;
5749 T typedef basic_fstream<char> fstream;
5750 T typedef basic_fstream<wchar_t> wfstream;
5752 27.8.1.1 Template class basic_filebuf [lib.filebuf]
5754 template <class charT, class traits = char_traits<charT> >
5755 X class basic_filebuf : public basic_streambuf<charT,traits> {
5757 T typedef charT char_type;
5758 T typedef typename traits::int_type int_type;
5759 T typedef typename traits::pos_type pos_type;
5760 T typedef typename traits::off_type off_type;
5761 T typedef traits traits_type;
5762 // _lib.filebuf.cons_ Constructors/destructor:
5764 X virtual ~basic_filebuf();
5765 // _lib.filebuf.members_ Members:
5766 T bool is_open() const;
5767 X basic_filebuf<charT,traits>* open
5768 (const char* s, ios_base::openmode mode);
5769 X basic_filebuf<charT,traits>* close();
5771 // _lib.filebuf.virtuals_ Overridden virtual functions:
5772 X virtual streamsize showmanyc();
5773 X virtual int_type underflow();
5774 X virtual int_type uflow();
5775 X virtual int_type pbackfail(int_type c = traits::eof());
5776 X virtual int_type overflow (int_type c = traits::eof());
5777 S virtual basic_streambuf<charT,traits>*
5778 setbuf(char_type* s, streamsize n);
5779 S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5780 ios_base::openmode which
5781 = ios_base::in | ios_base::out);
5782 S virtual pos_type seekpos(pos_type sp, ios_base::openmode which
5783 = ios_base::in | ios_base::out);
5784 S virtual int sync();
5785 S virtual void imbue(const locale& loc);
5790 27.8.1.5 Template class basic_ifstream [lib.ifstream]
5792 template <class charT, class traits = char_traits<charT> >
5793 X class basic_ifstream : public basic_istream<charT,traits> {
5795 T typedef charT char_type;
5796 T typedef typename traits::int_type int_type;
5797 T typedef typename traits::pos_type pos_type;
5798 T typedef typename traits::off_type off_type;
5799 T typedef traits traits_type;
5800 // _lib.ifstream.cons_ Constructors:
5802 S explicit basic_ifstream(const char* s,
5803 ios_base::openmode mode = ios_base::in);
5804 // _lib.ifstream.members_ Members:
5805 S basic_filebuf<charT,traits>* rdbuf() const;
5807 S void open(const char* s, ios_base::openmode mode = ios_base::in);
5812 27.8.1.8 Template class basic_ofstream [lib.ofstream]
5814 template <class charT, class traits = char_traits<charT> >
5815 X class basic_ofstream : public basic_ostream<charT,traits> {
5817 T typedef charT char_type;
5818 T typedef typename traits::int_type int_type;
5819 T typedef typename traits::pos_type pos_type;
5820 T typedef typename traits::off_type off_type;
5821 T typedef traits traits_type;
5822 // _lib.ofstream.cons_ Constructors:
5824 X explicit basic_ofstream(const char* s,
5825 ios_base::openmode mode
5827 // _lib.ofstream.members_ Members:
5828 X basic_filebuf<charT,traits>* rdbuf() const;
5830 X void open(const char* s, ios_base::openmode mode = ios_base::out);
5835 27.8.1.11 Template class basic_fstream [lib.fstream]
5837 template <class charT, class traits=char_traits<charT> >
5838 X class basic_fstream
5839 : public basic_iostream<charT,traits> {
5841 T typedef charT char_type;
5842 T typedef typename traits::int_type int_type;
5843 T typedef typename traits::pos_type pos_type;
5844 T typedef typename traits::off_type off_type;
5845 T typedef traits traits_type;
5846 // constructors/destructor
5848 S explicit basic_fstream(
5850 ios_base::openmode mode = ios_base::in|ios_base::out);
5853 S basic_filebuf<charT,traits>* rdbuf() const;
5857 ios_base::openmode mode = ios_base::in|ios_base::out);
5863 27.8.2 C Library files [lib.c.files]
5866 Table 13--Header <cstdio> synopsis
5868 X BUFSIZ L_tmpnam SEEK_SET TMP_MAX
5869 X EOF NULL <cstdio> stderr _IOFBF
5870 X FILENAME_MAX SEEK_CUR stdin _IOLBF
5871 X FOPEN_MAX SEEK_END stdout _IONBF
5873 X Types: FILE fpos_t size_t <cstdio>
5875 X clearerr fgets fscanf gets rewind
5876 X fclose fopen fseek perror scanf tmpnam
5877 X feof fprintf fsetpos printf setbuf ungetc
5878 X ferror fputc ftell putc setvbuf vprintf
5879 X fflush fputs fwrite puts sprintf vfprintf
5880 X fgetc fread getc remove sscanf vsprintf
5881 X fgetpos freopen getchar putchar rename tmpfile
5886 1.5 Standard C library headers [depr.c.headers]
5888 X <assert.h> <iso646.h> <setjmp.h> <stdio.h> <wchar.h>
5889 <ctype.h> <limits.h> <signal.h> <stdlib.h> <wctype.h>
5890 <errno.h> <locale.h> <stdarg.h> <string.h>
5891 <float.h> <math.h> <stddef.h> <time.h>
5893 1.6 Old iostreams members [depr.ios.members]
5895 [Note: these should be #ifdef'd to permit diagnostics if used.]
5899 T typedef T1 io_state;
5900 T typedef T2 open_mode;
5901 T typedef T3 seek_dir;
5902 T typedef OFF_T streamoff;
5903 T typedef OFF_T streampos;
5904 // remainder unchanged
5908 [Note: these should be #ifdef'd to permit diagnostics if used.]
5910 template<class charT, class traits = char_traits<charT> >
5911 class basic_streambuf {
5914 // remainder unchanged
5918 8 An implementation may provide the following member functions that
5919 overload signatures specified in clause _lib.iostreams_:
5921 [Note: the following overloads should be #ifdef'd to permit
5922 diagnostics to be emitted, by default, if used.]
5924 template<class charT, class Traits> class basic_ios {
5926 M void clear(io_state state);
5927 M void setstate(io_state state);
5928 // remainder unchanged
5932 M void exceptions(io_state);
5933 // remainder unchanged
5935 template<class charT, class traits = char_traits<charT> >
5936 class basic_streambuf {
5938 M pos_type pubseekoff(off_type off, ios_base::seek_dir way,
5939 ios_base::open_mode which = ios_base::in | ios_base::out);
5940 M pos_type pubseekpos(pos_type sp,
5941 ios_base::open_mode which = ios_base::in | ios_base::out);
5942 // remainder unchanged
5944 template <class charT, class traits = char_traits<charT> >
5945 class basic_filebuf : public basic_streambuf<charT,traits> {
5947 M basic_filebuf<charT,traits>* open
5948 (const char* s, ios_base::open_mode mode);
5949 // remainder unchanged
5951 template <class charT, class traits = char_traits<charT> >
5952 class basic_ifstream : public basic_istream<charT,traits> {
5954 M void open(const char* s, ios_base::open_mode mode = in);
5955 // remainder unchanged
5957 template <class charT, class traits = char_traits<charT> >
5958 class basic_ofstream : public basic_ostream<charT,traits> {
5960 M void open(const char* s, ios_base::open_mode mode = out | trunc);
5961 // remainder unchanged
5967 1.7.1 Class strstreambuf [depr.strstreambuf]
5969 [Note: It should be possible to adopt these components with only
5970 minor changes from the 2.8 version of the library.]
5972 M class strstreambuf : public basic_streambuf<char> {
5974 M explicit strstreambuf(streamsize alsize_arg = 0);
5975 M strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
5976 M strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
5977 M strstreambuf(const char* gnext_arg, streamsize n);
5978 M strstreambuf(signed char* gnext_arg, streamsize n,
5979 signed char* pbeg_arg = 0);
5980 M strstreambuf(const signed char* gnext_arg, streamsize n);
5981 M strstreambuf(unsigned char* gnext_arg, streamsize n,
5982 unsigned char* pbeg_arg = 0);
5983 M strstreambuf(const unsigned char* gnext_arg, streamsize n);
5984 M virtual ~strstreambuf();
5985 M void freeze(bool freezefl = true);
5989 M virtual int_type overflow (int_type c = EOF);
5990 M virtual int_type pbackfail(int_type c = EOF);
5991 M virtual int_type underflow();
5992 M virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5993 ios_base::openmode which
5994 = ios_base::in | ios_base::out);
5995 M virtual pos_type seekpos(pos_type sp, ios_base::openmode which
5996 = ios_base::in | ios_base::out);
5997 M virtual streambuf<char>* setbuf(char* s, streamsize n);
6000 1.7.4 Class strstream [depr.strstream]
6003 : public basic_iostream<char> {
6006 M typedef char char_type;
6007 M typedef typename char_traits<char>::int_type int_type
6008 M typedef typename char_traits<char>::pos_type pos_type;
6009 M typedef typename char_traits<char>::off_type off_type;
6010 // consturctors/destructor
6012 M strstream(char* s, int n,
6013 ios_base::openmode mode = ios_base::in|ios_base::out);
6014 M virtual ~strstream();
6016 M strstreambuf* rdbuf() const;
6017 M void freeze(bool freezefl = true);
6018 M int pcount() const;
6026 <sect3 id="standard.1998.specific" xreflabel="Implementation Specific">
6027 <title>Implementation Specific Behavior</title>
6030 The ISO standard defines the following phrase:
6036 <code>[1.3.5] implementation-defined behavior</code>
6040 Behavior, for a well-formed program construct and correct data, that
6041 depends on the implementation <emphasis>and that each implementation
6042 shall document</emphasis>.
6049 We do so here, for the C++ library only. Behavior of the
6050 compiler, linker, runtime loader, and other elements of "the
6051 implementation" are documented elsewhere. Everything listed
6052 in Annex B, Implementation Qualities, are also part of the
6053 compiler, not the library.
6056 For each entry, we give the section number of the standard, when
6057 applicable. This list is probably incomplet and inkorrekt.
6060 <emphasis>[1.9]/11 #3</emphasis> If <code>isatty(3)</code> is true, then
6061 interactive stream support is implied.
6064 <emphasis>[17.4.4.5]</emphasis> Non-reentrant functions are probably best
6065 discussed in the various sections on multithreading (see above).
6067 <!-- [17.4.4.8]/3 says any function that doesn't have an exception-spec
6068 can throw whatever we want; see also its footnote. Let's list those
6069 in the sections where the function itself occurs.
6071 <para><emphasis>[18.1]/4</emphasis> The type of <code>NULL</code> is described
6072 <ulink url="../18_support/howto.html#1">here</ulink>.
6074 <para><emphasis>[18.3]/8</emphasis> Even though it's listed in the library
6075 sections, libstdc++ has zero control over what the cleanup code hands
6076 back to the runtime loader. Talk to the compiler people. :-)
6078 <para><emphasis>[18.4.2.1]/5</emphasis> (bad_alloc),
6079 <emphasis>[18.5.2]/5</emphasis> (bad_cast),
6080 <emphasis>[18.5.3]/5</emphasis> (bad_typeid),
6081 <emphasis>[18.6.1]/8</emphasis> (exception),
6082 <emphasis>[18.6.2.1]/5</emphasis> (bad_exception): The <code>what()</code>
6083 member function of class <code>std::exception</code>, and these other
6084 classes publicly derived from it, simply returns the name of the
6085 class. But they are the <emphasis>mangled</emphasis> names; you will need to call
6086 <code>c++filt</code> and pass the names as command-line parameters to
6087 demangle them, or call a
6088 <ulink url="../18_support/howto.html#5">runtime demangler function</ulink>.
6089 (The classes in <code><stdexcept></code> have constructors which
6090 require an argument to use later for <code>what()</code> calls, so the
6091 problem of <code>what()</code>'s value does not arise in most
6092 user-defined exceptions.)
6094 <para><emphasis>[18.5.1]/7</emphasis> The return value of
6095 <code>std::type_info::name()</code> is the mangled type name (see the
6096 previous entry for more).
6098 <para><emphasis>[20.1.5]/5</emphasis> <emphasis>"Implementors are encouraged to
6099 supply libraries that can accept allocators that encapsulate more
6100 general memory models and that support non-equal instances. In such
6101 implementations, any requirements imposed on allocators by containers
6102 beyond those requirements that appear in Table 32, and the semantics
6103 of containers and algorithms when allocator instances compare
6104 non-equal, are implementation-defined."</emphasis> As yet we don't
6105 have any allocators which compare non-equal, so we can't describe how
6108 <para><emphasis>[21.1.3.1]/3,4</emphasis>,
6109 <emphasis>[21.1.3.2]/2</emphasis>,
6110 <emphasis>[23.*]'s foo::iterator</emphasis>,
6111 <emphasis>[27.*]'s foo::*_type</emphasis>,
6112 <emphasis>others...</emphasis>
6113 Nope, these types are called implementation-defined because you
6114 shouldn't be taking advantage of their underlying types. Listing them
6115 here would defeat the purpose. :-)
6117 <para><emphasis>[21.1.3.1]/5</emphasis> I don't really know about the mbstate_t
6118 stuff... see the <ulink url="../22_locale/howto.html">chapter 22 notes</ulink>
6119 for what does exist.
6121 <para><emphasis>[22.*]</emphasis> Anything and everything we have on locale
6122 implementation will be described
6123 <ulink url="../22_locale/howto.html">over here</ulink>.
6125 <para><emphasis>[26.2.8]/9</emphasis> I have no idea what
6126 <code>complex<T></code>'s pow(0,0) returns.
6128 <para><emphasis>[27.4.2.4]/2</emphasis> Calling
6129 <code>std::ios_base::sync_with_stdio</code> after I/O has already been
6130 performed on the standard stream objects will
6131 flush the buffers, and <!-- this line might go away -->
6132 destroy and recreate the underlying buffer instances. Whether or not
6133 the previously-written I/O is destroyed in this process depends mostly
6134 on the --enable-libio choice: for stdio, if the written data is
6135 already in the stdio buffer, the data may be completely safe!
6137 <para><emphasis>[27.6.1.1.2]</emphasis>,
6138 <emphasis>[27.6.2.3]</emphasis> The I/O sentry ctor and dtor can perform
6139 additional work than the minimum required. We are not currently taking
6140 advantage of this yet.
6142 <para><emphasis>[27.7.1.3]/16</emphasis>,
6143 <emphasis>[27.8.1.4]/10</emphasis>
6144 The effects of <code>pubsetbuf/setbuf</code> are described
6145 <ulink url="../27_io/howto.html#2">in this chapter</ulink>.
6147 <para><emphasis>[27.8.1.4]/16</emphasis> Calling <code>fstream::sync</code> when
6148 a get area exists will... whatever <code>fflush()</code> does, I think.