2 Completion Checklist for the Standard C++ Library
8 X - Partially implemented, or buggy.
9 T - Implemented, pending test/inspection.
10 V - Verified to pass all available test suites.
11 Q - Qualified by inspection for non-testable correctness.
12 P - Portability verified.
16 Only status codes appear in column 0. Notes relating to conformance
17 issues appear [in brackets].
19 Note that this checklist does not (yet) include all emendations
20 recommended by the ISO Library Working Group: (restricted site)
21 http://www.cygnus.com/iso/wp/html/fdis/lwg-issues.html
22 The LWG has announced its intention to release a public version
23 of the issues list, URL to be added here. XXX
25 Detailed explanation of status codes:
27 M - Missing: The name is not visible to programs that include
28 the specified header, either at compile or link stage.
30 S - Present as stub: A program can use the name, but no implementation
31 is provided. Programs that use the name link correctly, but
32 cannot usefully be run.
34 X - Partially implemented, or buggy: Some implementation has been
35 provided, but it is known or believed not to conform fully.
36 It may have an incorrect base class, wrong namespace, wrong
37 storage class, or simply not fully implement requirements.
38 However, it may be sufficiently usable to help test other
41 T - Implemented, pending test/inspection: Implementation believed
42 to be complete, and informal testing suggests it is ready for
45 V - Verified, passes all test suites: Verified to satisfy all
46 generically testable conformance requirements.
48 Q - Qualified by inspection for non-testable correctness:
49 Inspected, "implementation-defined" documentation accepted,
50 local usability criteria satisfied, formally inspected for
51 other untestable conformance. (Untestable requirements
52 include exception-safety, thread-safety, worst-case
53 complexity, memory cleanliness, usefulness.)
55 P - Portability verified: Qualified on all primary target platforms.
57 C - Certified: Formally certified to have passed all tests,
58 inspections, qualifications; approved under "signing authority"
59 to be used to satisfy contractual guarantees.
61 ----------------------------------------------------------------------
62 <algorithm> <iomanip> <list> <ostream> <streambuf>
63 <bitset> <ios> <locale> <queue> <string>
64 <complex> <iosfwd> <map> <set> <typeinfo>
65 X <deque> <iostream> <memory> <sstream> <utility>
66 <exception> <istream> <new> <stack> <valarray>
67 <fstream> <iterator> <numeric> <stdexcept> <vector>
70 [C header names must be in std:: to qualify. Related to shadow/ dir.]
71 <cassert> <ciso646> <csetjmp> <cstdio> <ctime>
72 <cctype> <climits> <csignal> <cstdlib> <cwchar>
73 X <cerrno> <clocale> <cstdarg> <cstring> <cwctype>
74 <cfloat> <cmath> <cstddef>
77 X errno, declared or defined in <cerrno>.
80 X setjmp(jmp_buf), declared or defined in <csetjmp>
81 X va_end(va_list), declared or defined in <cstdarg>
84 X clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,
85 X ptrdiff_t, sig_atomic_t, size_t, time_t, tm, va_list,
86 X wctrans_t, wctype_t, and wint_t.
88 1 Which of the functions in the C++ Standard Library are not reentrant
89 subroutines is implementation-defined.
91 18.1 Types [lib.support.types]
98 18.2 Implementation properties [lib.support.limits]
100 <limits>, <climits>, and <cfloat>
102 18.2.1 Numeric limits [lib.limits]
104 [Note: the numeric_limits templates are now automatically
107 X template<class T> class numeric_limits;
109 T enum float_round_style;
110 T enum float_denorm_style;
112 T template<> class numeric_limits<bool>;
114 T template<> class numeric_limits<char>;
115 T template<> class numeric_limits<signed char>;
116 T template<> class numeric_limits<unsigned char>;
117 T template<> class numeric_limits<wchar_t>;
119 T template<> class numeric_limits<short>;
120 T template<> class numeric_limits<int>;
121 T template<> class numeric_limits<long>;
122 T template<> class numeric_limits<unsigned short>;
123 T template<> class numeric_limits<unsigned int>;
124 T template<> class numeric_limits<unsigned long>;
126 X template<> class numeric_limits<float>;
127 X template<> class numeric_limits<double>;
128 X template<> class numeric_limits<long double>;
130 18.2.1.1 Template class numeric_limits [lib.numeric.limits]
131 T template<class T> class numeric_limits {
133 T static const bool is_specialized = false;
134 T static T min() throw();
135 T static T max() throw();
136 T static const int digits = 0;
137 T static const int digits10 = 0;
138 T static const bool is_signed = false;
139 T static const bool is_integer = false;
140 T static const bool is_exact = false;
141 T static const int radix = 0;
142 T static T epsilon() throw();
143 T static T round_error() throw();
145 T static const int min_exponent = 0;
146 T static const int min_exponent10 = 0;
147 T static const int max_exponent = 0;
148 T static const int max_exponent10 = 0;
150 T static const bool has_infinity = false;
151 T static const bool has_quiet_NaN = false;
152 T static const bool has_signaling_NaN = false;
153 T static const float_denorm_style has_denorm = denorm_absent;
154 T static const bool has_denorm_loss = false;
155 T static T infinity() throw();
156 T static T quiet_NaN() throw();
157 T static T signaling_NaN() throw();
158 T static T denorm_min() throw();
160 T static const bool is_iec559 = false;
161 T static const bool is_bounded = false;
162 T static const bool is_modulo = false;
164 T static const bool traps = false;
165 T static const bool tinyness_before = false;
166 T static const float_round_style round_style = round_toward_zero;
169 18.2.1.3 Type float_round_style [lib.round.style]
171 T enum float_round_style {
172 T round_indeterminate = -1,
173 T round_toward_zero = 0,
174 T round_to_nearest = 1,
175 T round_toward_infinity = 2,
176 T round_toward_neg_infinity = 3
179 18.2.1.4 Type float_denorm_style [lib.denorm.style]
181 T enum float_denorm_style {
182 T denorm_indeterminate = -1;
184 T denorm present = 1;
187 18.2.1.5 numeric_limits specializations [lib.numeric.special]
189 [Note: see Note at 18.2.1. ]
191 18.2.2 C Library [lib.c.limits]
193 1 Header <climits> (Table 3):
194 CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX
195 X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX
196 CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX
198 3 Header <cfloat> (Table 4):
200 DBL_DIG DBL_MIN_EXP FLT_MIN_10_EXP LDBL_MAX_10_EXP
201 DBL_EPSILON FLT_DIG FLT_MIN_EXP LDBL_MAX_EXP
202 DBL_MANT_DIG FLT_EPSILON FLT_RADIX LDBL_MIN
203 X DBL_MAX FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP
204 DBL_MAX_10_EXP FLT_MAX LDBL_DIG LDBL_MIN_EXP
205 DBL_MAX_EXP FLT_MAX_10_EXP LDBL_EPSILON
206 DBL_MIN FLT_MAX_EXP LDBL_MANT_DIG
207 DBL_MIN_10_EXP FLT_MIN LDBL_MAX
210 1 Header <cstdlib> (partial), Table 5:
211 X EXIT_FAILURE EXIT_SUCCESS
215 S extern "C" int atexit(void (*f)(void))
216 S extern "C++" int atexit(void (*f)(void))
219 18.4 Dynamic memory management [lib.support.dynamic]
221 Header <new> synopsis
224 T struct nothrow_t {};
225 T extern const nothrow_t nothrow;
226 T typedef void (*new_handler)();
227 T new_handler set_new_handler(new_handler new_p) throw();
229 T void* operator new(std::size_t size) throw(std::bad_alloc);
230 T void* operator new(std::size_t size, const std::nothrow_t&) throw();
231 T void operator delete(void* ptr) throw();
232 T void operator delete(void* ptr, const std::nothrow_t&) throw();
233 T void* operator new[](std::size_t size) throw(std::bad_alloc);
234 T void* operator new[](std::size_t size, const std::nothrow_t&) throw();
235 T void operator delete[](void* ptr) throw();
236 T void operator delete[](void* ptr, const std::nothrow_t&) throw();
237 T void* operator new (std::size_t size, void* ptr) throw();
238 T void* operator new[](std::size_t size, void* ptr) throw();
239 T void operator delete (void* ptr, void*) throw();
240 T void operator delete[](void* ptr, void*) throw();
242 18.4.2.1 Class bad_alloc [lib.bad.alloc]
244 T class bad_alloc : public exception {
246 T bad_alloc() throw();
247 T bad_alloc(const bad_alloc&) throw();
248 T bad_alloc& operator=(const bad_alloc&) throw();
249 T virtual ~bad_alloc() throw();
250 T virtual const char* what() const throw();
254 T new_handler set_new_handler(new_handler new_p) throw();
257 Header <typeinfo> synopsis
263 18.5.1 - Class type_info [lib.type.info]
267 T virtual ~type_info();
268 T bool operator==(const type_info& rhs) const;
269 T bool operator!=(const type_info& rhs) const;
270 T bool before(const type_info& rhs) const;
271 T const char* name() const;
273 T type_info(const type_info& rhs);
274 T type_info& operator=(const type_info& rhs);
277 18.5.2 - Class bad_cast [lib.bad.cast]
279 T bad_cast() throw();
280 T virtual const char* bad_cast::what() const throw();
282 18.5.3 Class bad_typeid [lib.bad.typeid]
284 T class bad_typeid : public exception {
286 T bad_typeid() throw();
287 T bad_typeid(const bad_typeid&) throw();
288 T bad_typeid& operator=(const bad_typeid&) throw();
289 T virtual ~bad_typeid() throw();
290 T virtual const char* what() const throw();
293 18.6 Exception handling [lib.support.exception]
295 T Header <exception> synopsis
298 T class bad_exception;
300 T typedef void (*unexpected_handler)();
301 T unexpected_handler set_unexpected(unexpected_handler f) throw();
303 T typedef void (*terminate_handler)();
304 T terminate_handler set_terminate(terminate_handler f) throw();
306 T bool uncaught_exception();
308 18.6.1 Class exception [lib.exception]
312 T exception() throw();
313 T exception(const exception&) throw();
314 T exception& operator=(const exception&) throw();
315 T virtual ~exception() throw();
316 T virtual const char* what() const throw();
319 18.6.2.1 Class bad_exception [lib.bad.exception]
320 T class bad_exception : public exception {
322 T bad_exception() throw();
323 T bad_exception(const bad_exception&) throw();
324 T bad_exception& operator=(const bad_exception&) throw();
325 T virtual ~bad_exception() throw();
326 T virtual const char* what() const throw();
329 18.7 Other runtime support [lib.support.runtime]
331 1 Headers <cstdarg> (variable arguments), <csetjmp> (nonlocal jumps),
332 <ctime> (system clock clock(), time()), <csignal> (signal handling),
333 and <cstdlib> (runtime environment getenv(), system()).
335 Table 6--Header <cstdarg> synopsis
336 Macros: va_arg va_end va_start
339 Table 7--Header <csetjmp> synopsis
345 Table 8--Header <ctime> synopsis
347 Macros: CLOCKS_PER_SEC
351 Table 9--Header <csignal> synopsis
353 X Macros: SIGABRT SIGILL SIGSEGV SIG_DFL
354 SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR
356 Functions: raise signal
358 Table 10--Header <cstdlib> synopsis
360 X Functions: getenv system
362 19.1 Exception classes [lib.std.exceptions]
364 Header <stdexcept> synopsis
367 T class domain_error;
368 T class invalid_argument;
369 T class length_error;
370 T class out_of_range;
371 T class runtime_error;
373 T class overflow_error;
374 T class underflow_error;
376 19.1.1 Class logic_error [lib.logic.error]
377 T class logic_error : public exception {
379 T explicit logic_error(const string& what_arg);
382 19.1.2 Class domain_error [lib.domain.error]
384 T class domain_error : public logic_error {
386 T explicit domain_error(const string& what_arg);
389 19.1.3 Class invalid_argument [lib.invalid.argument]
391 T class invalid_argument : public logic_error {
393 T explicit invalid_argument(const string& what_arg);
396 19.1.4 Class length_error [lib.length.error]
398 T class length_error : public logic_error {
400 T explicit length_error(const string& what_arg);
403 19.1.5 Class out_of_range [lib.out.of.range]
405 T class out_of_range : public logic_error {
407 T explicit out_of_range(const string& what_arg);
411 19.1.6 Class runtime_error [lib.runtime.error]
413 T class runtime_error : public exception {
415 T explicit runtime_error(const string& what_arg);
419 19.1.7 Class range_error [lib.range.error]
421 T class range_error : public runtime_error {
423 T explicit range_error(const string& what_arg);
426 19.1.8 Class overflow_error [lib.overflow.error]
428 T class overflow_error : public runtime_error {
430 T explicit overflow_error(const string& what_arg);
434 19.1.9 Class underflow_error [lib.underflow.error]
436 T class underflow_error : public runtime_error {
438 T explicit underflow_error(const string& what_arg);
442 19.2 Assertions [lib.assertions]
444 Table 2--Header <cassert> synopsis
448 19.3 Error numbers [lib.errno]
450 Table 3--Header <cerrno> synopsis
452 X |Macros: EDOM ERANGE errno |
455 20.2 Utility components [lib.utility]
457 Header <utility> synopsis
459 // _lib.operators_, operators:
460 X namespace rel_ops {
461 T template<class T> bool operator!=(const T&, const T&);
462 T template<class T> bool operator> (const T&, const T&);
463 T template<class T> bool operator<=(const T&, const T&);
464 T template<class T> bool operator>=(const T&, const T&);
466 // _lib.pairs_, pairs:
467 T template <class T1, class T2> struct pair;
468 T template <class T1, class T2>
469 bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);
470 T template <class T1, class T2>
471 bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
472 T template <class T1, class T2>
473 bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);
474 T template <class T1, class T2>
475 bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
476 T template <class T1, class T2>
477 bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
478 T template <class T1, class T2>
479 bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
480 T template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
483 20.2.2 Pairs [lib.pairs]
485 T template <class T1, class T2>
487 T typedef T1 first_type;
488 T typedef T2 second_type;
493 T pair(const T1& x, const T2& y);
494 T template<class U, class V> pair(const pair<U, V> &p);
497 20.3 Function objects [lib.function.objects]
499 Header <functional> synopsis
502 V template <class Arg, class Result> struct unary_function;
503 V template <class Arg1, class Arg2, class Result> struct binary_function;
505 // _lib.arithmetic.operations_, arithmetic operations:
506 V template <class T> struct plus;
507 V template <class T> struct minus;
508 V template <class T> struct multiplies;
509 V template <class T> struct divides;
510 V template <class T> struct modulus;
511 V template <class T> struct negate;
512 // _lib.comparisons_, comparisons:
513 V template <class T> struct equal_to;
514 V template <class T> struct not_equal_to;
515 V template <class T> struct greater;
516 V template <class T> struct less;
517 V template <class T> struct greater_equal;
518 V template <class T> struct less_equal;
519 // _lib.logical.operations_, logical operations:
520 V template <class T> struct logical_and;
521 V template <class T> struct logical_or;
522 V template <class T> struct logical_not;
523 // _lib.negators_, negators:
524 template <class Predicate> struct unary_negate;
525 V template <class Predicate>
526 unary_negate<Predicate> not1(const Predicate&);
527 V template <class Predicate> struct binary_negate;
528 V template <class Predicate>
529 binary_negate<Predicate> not2(const Predicate&);
530 // _lib.binders_, binders:
531 V template <class Operation> class binder1st;
532 V template <class Operation, class T>
533 binder1st<Operation> bind1st(const Operation&, const T&);
534 V template <class Operation> class binder2nd;
535 V template <class Operation, class T>
536 binder2nd<Operation> bind2nd(const Operation&, const T&);
537 // _lib.function.pointer.adaptors_, adaptors:
538 V template <class Arg, class Result> class pointer_to_unary_function;
539 V template <class Arg, class Result>
540 pointer_to_unary_function<Arg,Result> ptr_fun(Result (*)(Arg));
541 V template <class Arg1, class Arg2, class Result>
542 class pointer_to_binary_function;
543 V template <class Arg1, class Arg2, class Result>
544 pointer_to_binary_function<Arg1,Arg2,Result>
545 ptr_fun(Result (*)(Arg1,Arg2));
547 // _lib.member.pointer.adaptors_, adaptors:
548 V template<class S, class T> class mem_fun_t;
549 V template<class S, class T, class A> class mem_fun1_t;
550 V template<class S, class T>
551 mem_fun_t<S,T> mem_fun(S (T::*f)());
552 V template<class S, class T, class A>
553 mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));
554 V template<class S, class T> class mem_fun_ref_t;
555 V template<class S, class T, class A> class mem_fun1_ref_t;
556 V template<class S, class T>
557 mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)());
558 V template<class S, class T, class A>
559 mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));
561 V template <class S, class T> class const_mem_fun_t;
562 V template <class S, class T, class A> class const_mem_fun1_t;
563 V template <class S, class T>
564 const_mem_fun_t<S,T> mem_fun(S (T::*f)() const);
565 V template <class S, class T, class A>
566 const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);
567 V template <class S, class T> class const_mem_fun_ref_t;
568 V template <class S, class T, class A> class const_mem_fun1_ref_t;
569 V template <class S, class T>
570 const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const);
571 V template <class S, class T, class A>
572 const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
575 20.3.1 Base [lib.base]
577 V template <class Arg, class Result>
578 struct unary_function {
579 V typedef Arg argument_type;
580 V typedef Result result_type;
582 V template <class Arg1, class Arg2, class Result>
583 struct binary_function {
584 V typedef Arg1 first_argument_type;
585 V typedef Arg2 second_argument_type;
586 V typedef Result result_type;
589 20.3.2 Arithmetic operations [lib.arithmetic.operations]
591 T template <class T> struct plus : binary_function<T,T,T> {
592 V T operator()(const T& x, const T& y) const;
595 T template <class T> struct minus : binary_function<T,T,T> {
596 V T operator()(const T& x, const T& y) const;
599 T template <class T> struct multiplies : binary_function<T,T,T> {
600 V T operator()(const T& x, const T& y) const;
603 T template <class T> struct divides : binary_function<T,T,T> {
604 V T operator()(const T& x, const T& y) const;
607 T template <class T> struct modulus : binary_function<T,T,T> {
608 V T operator()(const T& x, const T& y) const;
611 T template <class T> struct negate : unary_function<T,T> {
612 V T operator()(const T& x) const;
615 20.3.3 Comparisons [lib.comparisons]
617 T template <class T> struct equal_to : binary_function<T,T,bool> {
618 V bool operator()(const T& x, const T& y) const;
621 T template <class T> struct not_equal_to : binary_function<T,T,bool> {
622 V bool operator()(const T& x, const T& y) const;
625 T template <class T> struct greater : binary_function<T,T,bool> {
626 V bool operator()(const T& x, const T& y) const;
629 T template <class T> struct less : binary_function<T,T,bool> {
630 V bool operator()(const T& x, const T& y) const;
633 T template <class T> struct greater_equal : binary_function<T,T,bool> {
634 V bool operator()(const T& x, const T& y) const;
637 T template <class T> struct less_equal : binary_function<T,T,bool> {
638 V bool operator()(const T& x, const T& y) const;
641 20.3.4 Logical operations [lib.logical.operations]
643 T template <class T> struct logical_and : binary_function<T,T,bool> {
644 V bool operator()(const T& x, const T& y) const;
647 T template <class T> struct logical_or : binary_function<T,T,bool> {
648 V bool operator()(const T& x, const T& y) const;
651 T template <class T> struct logical_not : unary_function<T,bool> {
652 V bool operator()(const T& x) const;
655 20.3.5 Negators [lib.negators]
657 T template <class Predicate>
659 : public unary_function<typename Predicate::argument_type,bool> {
661 T explicit unary_negate(const Predicate& pred);
662 V bool operator()(const typename Predicate::argument_type& x) const;
665 T template <class Predicate>
667 : public binary_function<typename Predicate::first_argument_type,
668 typename Predicate::second_argument_type, bool> {
670 T explicit binary_negate(const Predicate& pred);
671 V bool operator()(const typename Predicate::first_argument_type& x,
672 const typename Predicate::second_argument_type& y) const;
676 20.3.6 Binders [lib.binders]
678 20.3.6.1 Template class binder1st [lib.binder.1st]
679 T template <class Operation>
681 : public unary_function<typename Operation::second_argument_type,
682 typename Operation::result_type> {
685 T typename Operation::first_argument_type value;
687 V binder1st(const Operation& x,
688 const typename Operation::first_argument_type& y);
689 V typename Operation::result_type
690 operator()(const typename Operation::second_argument_type& x) const;
693 20.3.6.2 bind1st [lib.bind.1st]
695 V template <class Operation, class T>
696 binder1st<Operation> bind1st(const Operation& op, const T& x);
698 20.3.6.3 Template class binder2nd [lib.binder.2nd]
699 T template <class Operation>
701 : public unary_function<typename Operation::first_argument_type,
702 typename Operation::result_type> {
705 T typename Operation::second_argument_type value;
707 V binder2nd(const Operation& x,
708 const typename Operation::second_argument_type& y);
709 V typename Operation::result_type
710 operator()(const typename Operation::first_argument_type& x) const;
713 20.3.6.4 bind2nd [lib.bind.2nd]
715 T template <class Operation, class T>
716 binder2nd<Operation> bind2nd(const Operation& op, const T& x);
719 20.3.7 Adaptors for pointers to [lib.function.pointer.adaptors]
722 1 To allow pointers to (unary and binary) functions to work with func-
723 tion adaptors the library provides:
725 T template <class Arg, class Result>
726 class pointer_to_unary_function : public unary_function<Arg, Result> {
728 T explicit pointer_to_unary_function(Result (*f)(Arg));
729 V Result operator()(Arg x) const;
732 T template <class Arg, class Result>
733 pointer_to_unary_function<Arg, Result> ptr_fun(Result (*f)(Arg));
735 T template <class Arg1, class Arg2, class Result>
736 class pointer_to_binary_function :
737 public binary_function<Arg1,Arg2,Result> {
739 T explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
740 V Result operator()(Arg1 x, Arg2 y) const;
744 20.3.8 Adaptors for pointers to [lib.member.pointer.adaptors]
747 T template <class S, class T> class mem_fun_t
748 : public unary_function<T*, S> {
750 T explicit mem_fun_t(S (T::*p)());
751 V S operator()(T* p) const;
754 T template <class S, class T, class A> class mem_fun1_t
755 : public binary_function<T*, A, S> {
757 T explicit mem_fun1_t(S (T::*p)(A));
758 V S operator()(T* p, A x) const;
761 V template<class S, class T> mem_fun_t<S,T>
762 mem_fun(S (T::*f)());
763 V template<class S, class T, class A> mem_fun1_t<S,T,A>
764 mem_fun(S (T::*f)(A));
766 T template <class S, class T> class mem_fun_ref_t
767 : public unary_function<T, S> {
769 T explicit mem_fun_ref_t(S (T::*p)());
770 V S operator()(T& p) const;
773 T template <class S, class T, class A> class mem_fun1_ref_t
774 : public binary_function<T, A, S> {
776 T explicit mem_fun1_ref_t(S (T::*p)(A));
777 V S operator()(T& p, A x) const;
780 T template<class S, class T> mem_fun_ref_t<S,T>
781 mem_fun_ref(S (T::*f)());
783 T template<class S, class T, class A> mem_fun1_ref_t<S,T,A>
784 mem_fun_ref(S (T::*f)(A));
786 T template <class S, class T> class const_mem_fun_t
787 : public unary_function<T*, S> {
789 T explicit const_mem_fun_t(S (T::*p)() const);
790 V S operator()(const T* p) const;
793 T template <class S, class T, class A> class const_mem_fun1_t
794 : public binary_function<T*, A, S> {
796 T explicit const mem_fun1_t(S (T::*p)(A) const);
797 V S operator()(const T* p, A x) const;
800 V template<class S, class T> const_mem_fun_t<S,T>
801 mem_fun(S (T::*f)() const);
802 V template<class S, class T, class A> const_mem_fun1_t<S,T,A>
803 mem_fun(S (T::*f)(A) const);
805 T template <class S, class T> class const_mem_fun_ref_t
806 : public unary_function<T, S> {
808 T explicit const_mem_fun_ref_t(S (T::*p)() const);
809 V S operator()(const T& p) const;
812 T template <class S, class T, class A> class const_mem_fun1_ref_t
813 : public binary_function<T, A, S> {
815 T explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
816 V S operator()(const T& p, A x) const;
819 T template<class S, class T> const_mem_fun_ref_t<S,T>
820 mem_fun_ref(S (T::*f)() const);
822 T template<class S, class T, class A> const_mem_fun1_ref_t<S,T,A>
823 mem_fun_ref(S (T::*f)(A) const);
825 20.4 Memory [lib.memory]
827 Header <memory> synopsis
829 // _lib.default.allocator_, the default allocator:
830 T template <class T> class allocator;
831 T template <> class allocator<void>;
832 T template <class T, class U>
833 bool operator==(const allocator<T>&, const allocator<U>&) throw();
834 T template <class T, class U>
835 bool operator!=(const allocator<T>&, const allocator<U>&) throw();
836 // _lib.storage.iterator_, raw storage iterator:
837 T template <class OutputIterator, class T> class raw_storage_iterator;
838 // _lib.temporary.buffer_, temporary buffers:
840 pair<T*,ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
842 void return_temporary_buffer(T* p);
843 // _lib.specialized.algorithms_, specialized algorithms:
844 T template <class InputIterator, class ForwardIterator>
846 uninitialized_copy(InputIterator first, InputIterator last,
847 ForwardIterator result);
848 T template <class ForwardIterator, class T>
849 void uninitialized_fill(ForwardIterator first, ForwardIterator last,
851 T template <class ForwardIterator, class Size, class T>
852 void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
853 // _lib.auto.ptr_, pointers:
854 X template<class X> class auto_ptr;
857 20.4.1 The default allocator [lib.default.allocator]
859 T template <class T> class allocator;
860 // specialize for void:
861 T template <> class allocator<void> {
863 T typedef void* pointer;
864 T typedef const void* const_pointer;
865 // reference-to-void members are impossible.
866 T typedef void value_type;
867 T template <class U> struct rebind { typedef allocator<U> other; };
870 T template <class T> class allocator {
872 T typedef size_t size_type;
873 T typedef ptrdiff_t difference_type;
874 T typedef T* pointer;
875 T typedef const T* const_pointer;
876 T typedef T& reference;
877 T typedef const T& const_reference;
878 T typedef T value_type;
879 T template <class U> struct rebind { typedef allocator<U> other; };
880 T allocator() throw();
881 T allocator(const allocator&) throw();
882 T template <class U> allocator(const allocator<U>&) throw();
883 T ~allocator() throw();
884 T pointer address(reference x) const;
885 T const_pointer address(const_reference x) const;
887 size_type, allocator<void>::const_pointer hint = 0);
888 T void deallocate(pointer p, size_type n);
889 T size_type max_size() const throw();
890 T void construct(pointer p, const T& val);
891 T void destroy(pointer p);
894 20.4.1.2 allocator globals [lib.allocator.globals]
896 T template <class T1, class T2>
897 bool operator==(const allocator<T1>&, const allocator<T2>&) throw();
898 T template <class T1, class T2>
899 bool operator!=(const allocator<T1>&, const allocator<T2>&) throw();
901 20.4.2 Raw storage iterator [lib.storage.iterator]
903 T template <class OutputIterator, class T>
904 class raw_storage_iterator
905 : public iterator<output_iterator_tag,void,void,void,void> {
907 T explicit raw_storage_iterator(OutputIterator x);
908 T raw_storage_iterator<OutputIterator,T>& operator*();
909 T raw_storage_iterator<OutputIterator,T>& operator=(const T& element);
910 T raw_storage_iterator<OutputIterator,T>& operator++();
911 T raw_storage_iterator<OutputIterator,T> operator++(int);
914 20.4.3 Temporary buffers [lib.temporary.buffer]
917 pair<T*, ptrdiff_t> get_temporary_buffer(ptrdiff_t n);
919 T template <class T> void return_temporary_buffer(T* p);
921 20.4.4 Specialized algorithms [lib.specialized.algorithms]
923 20.4.4.1 uninitialized_copy [lib.uninitialized.copy]
925 V template <class InputIterator, class ForwardIterator>
927 uninitialized_copy(InputIterator first, InputIterator last,
928 ForwardIterator result);
930 20.4.4.2 uninitialized_fill [lib.uninitialized.fill]
932 V template <class ForwardIterator, class T>
933 void uninitialized_fill(ForwardIterator first, ForwardIterator last,
936 20.4.4.3 uninitialized_fill_n [lib.uninitialized.fill.n]
938 V template <class ForwardIterator, class Size, class T>
939 void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
941 20.4.5 Template class auto_ptr [lib.auto.ptr]
943 X template<class X> class auto_ptr {
944 template <class Y> struct auto_ptr_ref {};
946 T typedef X element_type;
947 // _lib.auto.ptr.cons_ construct/copy/destroy:
948 T explicit auto_ptr(X* p =0) throw();
949 T auto_ptr(auto_ptr&) throw();
950 T template<class Y> auto_ptr(auto_ptr<Y>&) throw();
951 T auto_ptr& operator=(auto_ptr&) throw();
952 T template<class Y> auto_ptr& operator=(auto_ptr<Y>&) throw();
953 T ~auto_ptr() throw();
954 // _lib.auto.ptr.members_ members:
955 T X& operator*() const throw();
956 T X* operator->() const throw();
957 T X* get() const throw();
958 T X* release() throw();
959 T void reset(X* p =0) throw();
961 // _lib.auto.ptr.conv_ conversions:
962 X auto_ptr(auto_ptr_ref<X>) throw();
963 X template<class Y> operator auto_ptr_ref<Y>() throw();
964 X template<class Y> operator auto_ptr<Y>() throw();
967 20.4.6 C Library [lib.c.malloc]
969 Table 7--Header <cstdlib> synopsis
971 X Functions: calloc malloc
975 Table 8--Header <cstring> synopsis
979 X Functions: memchr memcmp
980 X memcpy memmove memset
982 Table 9--Header <ctime> synopsis
985 X Types: size_t clock_t time_t
988 X asctime clock difftime localtime strftime
989 X ctime gmtime mktime time
991 21.1.1 Character traits requirements [lib.char.traits.require]
993 2 The struct template
994 T template<class charT> struct char_traits;
995 shall be provided in the header <string> as a basis for explicit spe-
999 21.1.3.1 struct [lib.char.traits.specializations.char]
1003 struct char_traits<char> {
1004 T typedef char char_type;
1005 T typedef int int_type;
1006 T typedef streamoff off_type;
1007 T typedef streampos pos_type;
1008 T typedef mbstate_t state_type;
1010 T static void assign(char_type& c1, const char_type& c2);
1011 T static bool eq(const char_type& c1, const char_type& c2);
1012 T static bool lt(const char_type& c1, const char_type& c2);
1014 T static int compare(const char_type* s1, const char_type* s2, size_t n);
1015 T static size_t length(const char_type* s);
1016 T static const char_type* find(const char_type* s, size_t n,
1017 const char_type& a);
1018 T static char_type* move(char_type* s1, const char_type* s2, size_t n);
1019 T static char_type* copy(char_type* s1, const char_type* s2, size_t n);
1020 T static char_type* assign(char_type* s, size_t n, char_type a);
1022 T static int_type not_eof(const int_type& c);
1023 T static char_type to_char_type(const int_type& c);
1024 T static int_type to_int_type(const char_type& c);
1025 T static bool eq_int_type(const int_type& c1, const int_type& c2);
1026 T static int_type eof();
1029 21.1.3.2 struct [lib.char.traits.specializations.wchar.t]
1030 char_traits<wchar_t>
1033 struct char_traits<wchar_t> {
1034 V typedef wchar_t char_type;
1035 V typedef wint_t int_type;
1036 V typedef streamoff off_type;
1037 V typedef wstreampos pos_type;
1038 V typedef mbstate_t state_type;
1040 V static void assign(char_type& c1, const char_type& c2);
1041 V static bool eq(const char_type& c1, const char_type& c2);
1042 V static bool lt(const char_type& c1, const char_type& c2);
1044 V static int compare(const char_type* s1, const char_type* s2, size_t n);
1045 V static size_t length(const char_type* s);
1046 V static const char_type* find(const char_type* s, size_t n,
1047 const char_type& a);
1048 V static char_type* move(char_type* s1, const char_type* s2, size_t n);
1049 V static char_type* copy(char_type* s1, const char_type* s2, size_t n);
1050 V static char_type* assign(char_type* s, size_t n, char_type a);
1052 V static int_type not_eof(const int_type& c);
1053 V static char_type to_char_type(const int_type& c);
1054 V static int_type to_int_type(const char_type& c);
1055 V static bool eq_int_type(const int_type& c1, const int_type& c2);
1056 V static int_type eof();
1059 21.2 String classes [lib.string.classes]
1061 // _lib.char.traits_, character traits:
1062 V template<class charT>
1064 V template <> struct char_traits<char>;
1065 V template <> struct char_traits<wchar_t>;
1067 // _lib.basic.string_, basic_string:
1068 V template<class charT, class traits = char_traits<charT>,
1069 class Allocator = allocator<charT> >
1071 V template<class charT, class traits, class Allocator>
1072 basic_string<charT,traits,Allocator>
1073 operator+(const basic_string<charT,traits,Allocator>& lhs,
1074 const basic_string<charT,traits,Allocator>& rhs);
1075 V template<class charT, class traits, class Allocator>
1076 basic_string<charT,traits,Allocator>
1077 operator+(const charT* lhs,
1078 const basic_string<charT,traits,Allocator>& rhs);
1079 V template<class charT, class traits, class Allocator>
1080 basic_string<charT,traits,Allocator>
1081 operator+(charT lhs, const basic_string<charT,traits,Allocator>& rhs);
1082 V template<class charT, class traits, class Allocator>
1083 basic_string<charT,traits,Allocator>
1084 operator+(const basic_string<charT,traits,Allocator>& lhs,
1086 V template<class charT, class traits, class Allocator>
1087 basic_string<charT,traits,Allocator>
1088 operator+(const basic_string<charT,traits,Allocator>& lhs, charT rhs);
1090 V template<class charT, class traits, class Allocator>
1091 bool operator==(const basic_string<charT,traits,Allocator>& lhs,
1092 const basic_string<charT,traits,Allocator>& rhs);
1093 V template<class charT, class traits, class Allocator>
1094 bool operator==(const charT* lhs,
1095 const basic_string<charT,traits,Allocator>& rhs);
1096 V template<class charT, class traits, class Allocator>
1097 bool operator==(const basic_string<charT,traits,Allocator>& lhs,
1099 V template<class charT, class traits, class Allocator>
1100 bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
1101 const basic_string<charT,traits,Allocator>& rhs);
1102 V template<class charT, class traits, class Allocator>
1103 bool operator!=(const charT* lhs,
1104 const basic_string<charT,traits,Allocator>& rhs);
1105 V template<class charT, class traits, class Allocator>
1106 bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
1108 V template<class charT, class traits, class Allocator>
1109 bool operator< (const basic_string<charT,traits,Allocator>& lhs,
1110 const basic_string<charT,traits,Allocator>& rhs);
1111 V template<class charT, class traits, class Allocator>
1112 bool operator< (const basic_string<charT,traits,Allocator>& lhs,
1114 V template<class charT, class traits, class Allocator>
1115 bool operator< (const charT* lhs,
1116 const basic_string<charT,traits,Allocator>& rhs);
1117 V template<class charT, class traits, class Allocator>
1118 bool operator> (const basic_string<charT,traits,Allocator>& lhs,
1119 const basic_string<charT,traits,Allocator>& rhs);
1120 V template<class charT, class traits, class Allocator>
1121 bool operator> (const basic_string<charT,traits,Allocator>& lhs,
1123 V template<class charT, class traits, class Allocator>
1124 bool operator> (const charT* lhs,
1125 const basic_string<charT,traits,Allocator>& rhs);
1126 V template<class charT, class traits, class Allocator>
1127 bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
1128 const basic_string<charT,traits,Allocator>& rhs);
1129 V template<class charT, class traits, class Allocator>
1130 bool operator<=(const basic_string<charT,traits,Allocator>& lhs,
1132 V template<class charT, class traits, class Allocator>
1133 bool operator<=(const charT* lhs,
1134 const basic_string<charT,traits,Allocator>& rhs);
1135 V template<class charT, class traits, class Allocator>
1136 bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
1137 const basic_string<charT,traits,Allocator>& rhs);
1138 V template<class charT, class traits, class Allocator>
1139 bool operator>=(const basic_string<charT,traits,Allocator>& lhs,
1141 V template<class charT, class traits, class Allocator>
1142 bool operator>=(const charT* lhs,
1143 const basic_string<charT,traits,Allocator>& rhs);
1145 // _lib.string.special_:
1146 V template<class charT, class traits, class Allocator>
1147 void swap(basic_string<charT,traits,Allocator>& lhs,
1148 basic_string<charT,traits,Allocator>& rhs);
1149 V template<class charT, class traits, class Allocator>
1150 basic_istream<charT,traits>&
1151 operator>>(basic_istream<charT,traits>& is,
1152 basic_string<charT,traits,Allocator>& str);
1153 T template<class charT, class traits, class Allocator>
1154 basic_ostream<charT, traits>&
1155 operator<<(basic_ostream<charT, traits>& os,
1156 const basic_string<charT,traits,Allocator>& str);
1157 V template<class charT, class traits, class Allocator>
1158 basic_istream<charT,traits>&
1159 getline(basic_istream<charT,traits>& is,
1160 basic_string<charT,traits,Allocator>& str,
1162 V template<class charT, class traits, class Allocator>
1163 basic_istream<charT,traits>&
1164 getline(basic_istream<charT,traits>& is,
1165 basic_string<charT,traits,Allocator>& str);
1166 V typedef basic_string<char> string;
1167 T typedef basic_string<wchar_t> wstring;
1170 21.3 Template class basic_string [lib.basic.string]
1173 template<class charT, class traits = char_traits<charT>,
1174 class Allocator = allocator<charT> >
1175 class basic_string {
1178 typedef traits traits_type;
1179 typedef typename traits::char_type value_type;
1180 typedef Allocator allocator_type;
1181 typedef typename Allocator::size_type size_type;
1182 typedef typename Allocator::difference_type difference_type;
1183 typedef typename Allocator::reference reference;
1184 typedef typename Allocator::const_reference const_reference;
1185 typedef typename Allocator::pointer pointer;
1186 typedef typename Allocator::const_pointer const_pointer;
1187 typedef implementation defined iterator;
1188 typedef implementation defined const_iterator;
1189 typedef std::reverse_iterator<iterator> reverse_iterator;
1190 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
1191 static const size_type npos = -1;
1193 // _lib.string.cons_ construct/copy/destroy:
1194 V explicit basic_string(const Allocator& a = Allocator());
1195 V basic_string(const basic_string& str, size_type pos = 0,
1196 size_type n = npos, const Allocator& a = Allocator());
1197 V basic_string(const charT* s,
1198 size_type n, const Allocator& a = Allocator());
1199 V basic_string(const charT* s, const Allocator& a = Allocator());
1200 V basic_string(size_type n, charT c, const Allocator& a = Allocator());
1201 V template<class InputIterator>
1202 basic_string(InputIterator begin, InputIterator end,
1203 const Allocator& a = Allocator());
1205 V basic_string& operator=(const basic_string& str);
1206 V basic_string& operator=(const charT* s);
1207 V basic_string& operator=(charT c);
1208 // _lib.string.iterators_ iterators:
1210 V const_iterator begin() const;
1212 V const_iterator end() const;
1214 V reverse_iterator rbegin();
1215 V const_reverse_iterator rbegin() const;
1216 V reverse_iterator rend();
1217 V const_reverse_iterator rend() const;
1218 // _lib.string.capacity_ capacity:
1219 V size_type size() const;
1220 V size_type length() const;
1221 V size_type max_size() const;
1222 V void resize(size_type n, charT c);
1223 V void resize(size_type n);
1224 V size_type capacity() const;
1225 V void reserve(size_type res_arg = 0);
1227 V bool empty() const;
1228 // _lib.string.access_ element access:
1229 V const_reference operator[](size_type pos) const;
1230 V reference operator[](size_type pos);
1231 V const_reference at(size_type n) const;
1232 V reference at(size_type n);
1233 // _lib.string.modifiers_ modifiers:
1234 V basic_string& operator+=(const basic_string& str);
1235 V basic_string& operator+=(const charT* s);
1236 V basic_string& operator+=(charT c);
1237 V basic_string& append(const basic_string& str);
1238 V basic_string& append(const basic_string& str, size_type pos,
1240 V basic_string& append(const charT* s, size_type n);
1241 V basic_string& append(const charT* s);
1242 V basic_string& append(size_type n, charT c);
1243 V template<class InputIterator>
1244 basic_string& append(InputIterator first, InputIterator last);
1245 V void push_back(const charT);
1247 V basic_string& assign(const basic_string&);
1248 V basic_string& assign(const basic_string& str, size_type pos,
1250 V basic_string& assign(const charT* s, size_type n);
1251 V basic_string& assign(const charT* s);
1252 V basic_string& assign(size_type n, charT c);
1253 V template<class InputIterator>
1254 basic_string& assign(InputIterator first, InputIterator last);
1255 V basic_string& insert(size_type pos1, const basic_string& str);
1256 V basic_string& insert(size_type pos1, const basic_string& str,
1257 size_type pos2, size_type n);
1258 V basic_string& insert(size_type pos, const charT* s, size_type n);
1259 V basic_string& insert(size_type pos, const charT* s);
1260 V basic_string& insert(size_type pos, size_type n, charT c);
1261 V iterator insert(iterator p, charT c);
1262 V void insert(iterator p, size_type n, charT c);
1263 V template<class InputIterator>
1264 void insert(iterator p, InputIterator first, InputIterator last);
1265 V basic_string& erase(size_type pos = 0, size_type n = npos);
1266 V iterator erase(iterator position);
1267 V iterator erase(iterator first, iterator last);
1268 V basic_string& replace(size_type pos1, size_type n1,
1269 const basic_string& str);
1270 V basic_string& replace(size_type pos1, size_type n1,
1271 const basic_string& str,
1272 size_type pos2, size_type n2);
1273 V basic_string& replace(size_type pos, size_type n1, const charT* s,
1275 V basic_string& replace(size_type pos, size_type n1, const charT* s);
1276 V basic_string& replace(size_type pos, size_type n1, size_type n2,
1278 V basic_string& replace(iterator i1, iterator i2, const basic_string& str);
1279 V basic_string& replace(iterator i1, iterator i2, const charT* s,
1281 V basic_string& replace(iterator i1, iterator i2, const charT* s);
1282 V basic_string& replace(iterator i1, iterator i2,
1283 size_type n, charT c);
1284 V template<class InputIterator>
1285 basic_string& replace(iterator i1, iterator i2,
1286 InputIterator j1, InputIterator j2);
1287 V size_type copy(charT* s, size_type n, size_type pos = 0) const;
1288 V void swap(basic_string<charT,traits,Allocator>&);
1289 // _lib.string.ops_ string operations:
1290 V const charT* c_str() const; // explicit
1291 V const charT* data() const;
1292 V allocator_type get_allocator() const;
1293 V size_type find (const basic_string& str, size_type pos = 0) const;
1294 V size_type find (const charT* s, size_type pos, size_type n) const;
1295 V size_type find (const charT* s, size_type pos = 0) const;
1296 V size_type find (charT c, size_type pos = 0) const;
1297 V size_type rfind(const basic_string& str, size_type pos = npos) const;
1298 V size_type rfind(const charT* s, size_type pos, size_type n) const;
1299 V size_type rfind(const charT* s, size_type pos = npos) const;
1300 V size_type rfind(charT c, size_type pos = npos) const;
1302 V size_type find_first_of(const basic_string& str,
1303 size_type pos = 0) const;
1304 V size_type find_first_of(const charT* s,
1305 size_type pos, size_type n) const;
1306 V size_type find_first_of(const charT* s, size_type pos = 0) const;
1307 V size_type find_first_of(charT c, size_type pos = 0) const;
1308 V size_type find_last_of (const basic_string& str,
1309 size_type pos = npos) const;
1310 V size_type find_last_of (const charT* s,
1311 size_type pos, size_type n) const;
1312 V size_type find_last_of (const charT* s, size_type pos = npos) const;
1313 V size_type find_last_of (charT c, size_type pos = npos) const;
1314 V size_type find_first_not_of(const basic_string& str,
1315 size_type pos = 0) const;
1316 V size_type find_first_not_of(const charT* s, size_type pos,
1318 V size_type find_first_not_of(const charT* s, size_type pos = 0) const;
1319 V size_type find_first_not_of(charT c, size_type pos = 0) const;
1320 V size_type find_last_not_of (const basic_string& str,
1321 size_type pos = npos) const;
1322 V size_type find_last_not_of (const charT* s, size_type pos,
1324 V size_type find_last_not_of (const charT* s,
1325 size_type pos = npos) const;
1326 V size_type find_last_not_of (charT c, size_type pos = npos) const;
1327 V basic_string substr(size_type pos = 0, size_type n = npos) const;
1328 V int compare(const basic_string& str) const;
1329 V int compare(size_type pos1, size_type n1,
1330 const basic_string& str) const;
1331 V int compare(size_type pos1, size_type n1,
1332 const basic_string& str,
1333 size_type pos2, size_type n2) const;
1334 V int compare(const charT* s) const;
1335 V int compare(size_type pos1, size_type n1,
1336 const charT* s, size_type n2 = npos) const;
1340 21.4 Null-terminated sequence utilities [lib.c.strings]
1342 Table 10--Header <cctype> synopsis
1344 isalnum isdigit isprint isupper tolower
1345 X isalpha isgraph ispunct isxdigit toupper
1346 iscntrl islower isspace
1348 Table 11--Header <cwctype> synopsis
1350 X Macro: WEOF <cwctype>
1351 X Types: wctrans_t wctype_t wint_t <cwctype>
1353 X iswalnum iswctype iswlower iswspace towctrans wctrans
1354 X iswalpha iswdigit iswprint iswupper towlower wctype
1355 X iswcntrl iswgraph iswpunct iswxdigit towupper
1357 Table 12--Header <cstring> synopsis
1359 X Macro: NULL <cstring>
1360 X Type: size_t <cstring>
1362 X memchr strcat strcspn strncpy strtok
1363 X memcmp strchr strerror strpbrk strxfrm
1364 X memcpy strcmp strlen strrchr
1365 X memmove strcoll strncat strspn
1366 X memset strcpy strncmp strstr
1368 Table 13--Header <cwchar> synopsis
1369 Macros: NULL <cwchar> WCHAR_MAX WCHAR_MIN WEOF <cwchar>
1370 Types: mbstate_t wint_t <cwchar> size_t
1372 X btowc getwchar ungetwc wcscpy wcsrtombs wmemchr
1373 X fgetwc mbrlen vfwprintf wcscspn wcsspn wmemcmp
1374 X fgetws mbrtowc vswprintf wcsftime wcsstr wmemcpy
1375 X fputwc mbsinit vwprintf wcslen wcstod wmemmove
1376 X fputws mbsrtowcs wcrtomb wcsncat wcstok wmemset
1377 X fwide putwc wcscat wcsncmp wcstol wprintf
1378 X fwprintf putwchar wcschr wcsncpy wcstoul wscanf
1379 X fwscanf swprintf wcscmp wcspbrk wcsxfrm
1380 X getwc swscanf wcscoll wcsrchr wctob
1382 Table 14--Header <cstdlib> synopsis
1386 X atol mblen strtod wctomb
1387 X atof mbstowcs strtol wcstombs
1388 X atoi mbtowc strtoul
1390 X const char* strchr(const char* s, int c);
1391 X char* strchr( char* s, int c);
1393 X const char* strpbrk(const char* s1, const char* s2);
1394 X char* strpbrk( char* s1, const char* s2);
1396 X const char* strrchr(const char* s, int c);
1397 X char* strrchr( char* s, int c);
1399 X const char* strstr(const char* s1, const char* s2);
1400 X char* strstr( char* s1, const char* s2);
1402 X const void* memchr(const void* s, int c, size_t n);
1403 X void* memchr( void* s, int c, size_t n);
1405 X const wchar_t* wcschr(const wchar_t* s, wchar_t c);
1406 X wchar_t* wcschr( wchar_t* s, wchar_t c);
1408 X const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
1409 X wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
1411 X const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
1412 X wchar_t* wcsrchr( wchar_t* s, wchar_t c);
1414 X const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
1415 X wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
1417 X const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
1418 X wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
1420 [for initial efforts on the above, see shadow/string.h]
1422 22.1 Locales [lib.locales]
1424 Header <locale> synopsis
1426 // _lib.locale_, locale:
1428 T template <class Facet> const Facet& use_facet(const locale&);
1429 T template <class Facet> bool has_facet(const locale&) throw();
1431 // _lib.locale.convenience_, convenience interfaces:
1432 T template <class charT> bool isspace (charT c, const locale& loc);
1433 T template <class charT> bool isprint (charT c, const locale& loc);
1434 T template <class charT> bool iscntrl (charT c, const locale& loc);
1435 T template <class charT> bool isupper (charT c, const locale& loc);
1436 T template <class charT> bool islower (charT c, const locale& loc);
1437 T template <class charT> bool isalpha (charT c, const locale& loc);
1438 T template <class charT> bool isdigit (charT c, const locale& loc);
1439 T template <class charT> bool ispunct (charT c, const locale& loc);
1440 T template <class charT> bool isxdigit(charT c, const locale& loc);
1441 T template <class charT> bool isalnum (charT c, const locale& loc);
1442 T template <class charT> bool isgraph (charT c, const locale& loc);
1443 T template <class charT> charT toupper(charT c, const locale& loc);
1444 T template <class charT> charT tolower(charT c, const locale& loc);
1445 // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
1447 T template <class charT> class ctype;
1448 T template <> class ctype<char>; // specialization
1449 S template <class charT> class ctype_byname;
1450 S template <> class ctype_byname<char>; // specialization
1451 T class codecvt_base;
1452 X template <class internT, class externT, class stateT> class codecvt;
1453 S template <class internT, class externT, class stateT> class codecvt_byname;
1454 // _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
1455 X template <class charT, class InputIterator> class num_get;
1456 X template <class charT, class OutputIterator> class num_put;
1457 T template <class charT> class numpunct;
1458 S template <class charT> class numpunct_byname;
1459 // _lib.category.collate_, collation:
1460 T template <class charT> class collate;
1461 S template <class charT> class collate_byname;
1462 // _lib.category.time_, date and time:
1464 S template <class charT, class InputIterator> class time_get;
1465 S template <class charT, class InputIterator> class time_get_byname;
1466 S template <class charT, class OutputIterator> class time_put;
1467 S template <class charT, class OutputIterator> class time_put_byname;
1468 // _lib.category.monetary_, money:
1470 S template <class charT, class InputIterator> class money_get;
1471 S template <class charT, class OutputIterator> class money_put;
1472 S template <class charT, bool Intl> class moneypunct;
1473 S template <class charT, bool Intl> class moneypunct_byname;
1474 // _lib.category.messages_, message retrieval:
1475 T class messages_base;
1476 S template <class charT> class messages;
1477 S template <class charT> class messages_byname;
1480 22.1.1 Class locale [lib.locale]
1487 T typedef int category;
1488 T static const category // values assigned here are for exposition only
1490 T collate = 0x010, ctype = 0x020,
1491 T monetary = 0x040, numeric = 0x080,
1492 T time = 0x100, messages = 0x200,
1493 T all = collate | ctype | monetary | numeric | time | messages;
1494 // construct/copy/destroy:
1496 T locale(const locale& other) throw()
1497 X explicit locale(const char* std_name);
1498 X locale(const locale& other, const char* std_name, category);
1499 T template <class Facet> locale(const locale& other, Facet* f);
1500 T locale(const locale& other, const locale& one, category);
1501 T ~locale() throw(); // non-virtual
1502 T const locale& operator=(const locale& other) throw();
1503 T template <class Facet> locale combine(const locale& other) const;
1504 // locale operations:
1505 X basic_string<char> name() const;
1506 T bool operator==(const locale& other) const;
1507 T bool operator!=(const locale& other) const;
1508 T template <class charT, class Traits, class Allocator>
1509 bool operator()(const basic_string<charT,Traits,Allocator>& s1,
1510 const basic_string<charT,Traits,Allocator>& s2) const;
1511 // global locale objects:
1512 T static locale global(const locale&);
1513 T static const locale& classic();
1516 22.1.1.1 locale types [lib.locale.types]
1518 22.1.1.1.1 Type locale::category [lib.locale.category]
1520 T typedef int category;
1522 T none, collate, ctype, monetary, numeric, time, and messages
1524 [required locale members]
1525 T collate<char>, collate<wchar_t>
1526 T ctype<char>, ctype<wchar_t>
1527 T codecvt<char,char,mbstate_t>,
1528 S codecvt<wchar_t,char,mbstate_t>
1529 T moneypunct<char>, moneypunct<wchar_t>
1530 T moneypunct<char,true>, moneypunct<wchar_t,true>,
1531 S money_get<char>, money_get<wchar_t
1532 S money_put<char>, money_put<wchar_t>
1533 T numpunct<char>, numpunct<wchar_t>,
1534 X num_get<char>, num_get<wchar_t>
1535 X num_put<char>, num_put<wchar_t>
1536 S time_get<char>, time_get<wchar_t>,
1537 S time_put<char>, time_put<wchar_t>
1538 S messages<char>, messages<wchar_t>
1540 [required instantiations]
1541 S collate_byname<char>, collate_byname<wchar_t>
1542 S ctype_byname<char>, ctype_byname<wchar_t>
1543 S codecvt_byname<char,char,mbstate_t>,
1544 S codecvt_byname<wchar_t,char,mbstate_t>
1545 S moneypunct_byname<char,International>,
1546 S moneypunct_byname<wchar_t,International>,
1547 S money_get<C,InputIterator>,
1548 S money_put<C,OutputIterator>
1549 S numpunct_byname<char>, numpunct_byname<wchar_t>
1550 X num_get<C,InputIterator>, num_put<C,OutputIterator>
1551 S time_get<char,InputIterator>,
1552 S time_get_byname<char,InputIterator>,
1553 S time_get<wchar_t,OutputIterator>,
1554 S time_get_byname<wchar_t,OutputIterator>,
1555 S time_put<char,OutputIterator>,
1556 S time_put_byname<char,OutputIterator>,
1557 S time_put<wchar_t,OutputIterator>
1558 S time_put_byname<wchar_t,OutputIterator>
1559 S messages_byname<char>, messages_byname<wchar_t>
1562 22.1.1.1.2 Class locale::facet [lib.locale.facet]
1564 T class locale::facet {
1566 T explicit facet(size_t refs = 0);
1569 T facet(const facet&); // not defined
1570 T void operator=(const facet&); // not defined
1575 22.1.1.1.3 Class locale::id [lib.locale.id]
1577 T class locale::id {
1581 T void operator=(const id&); // not defined
1582 T id(const id&); // not defined
1587 22.2.1 The ctype category [lib.category.ctype]
1589 T class ctype_base {
1591 T enum mask { // numeric values are for exposition only.
1592 T space=, print=, cntrl=, upper=, lower=,
1593 T alpha=, digit=, punct=, xdigit=,
1599 22.2.1.1 Template class ctype [lib.locale.ctype]
1601 T template <class charT>
1602 class ctype : public locale::facet, public ctype_base {
1604 T typedef charT char_type;
1605 T explicit ctype(size_t refs = 0);
1606 T bool is(mask m, charT c) const;
1607 T const charT* is(const charT* low, const charT* high, mask* vec) const;
1608 T const charT* scan_is(mask m,
1609 const charT* low, const charT* high) const;
1610 T const charT* scan_not(mask m,
1611 const charT* low, const charT* high) const;
1612 T charT toupper(charT c) const;
1613 T const charT* toupper(charT* low, const charT* high) const;
1614 T charT tolower(charT c) const;
1615 T const charT* tolower(charT* low, const charT* high) const;
1616 T charT widen(char c) const;
1617 T const char* widen(const char* low, const char* high, charT* to) const;
1618 T char narrow(charT c, char dfault) const;
1619 T const charT* narrow(const charT* low, const charT*, char dfault,
1621 T static locale::id id;
1624 T ~ctype(); // virtual
1625 T virtual bool do_is(mask m, charT c) const;
1626 T virtual const charT* do_is(const charT* low, const charT* high,
1628 T virtual const charT* do_scan_is(mask m,
1629 const charT* low, const charT* high) const;
1630 T virtual const charT* do_scan_not(mask m,
1631 const charT* low, const charT* high) const;
1632 T virtual charT do_toupper(charT) const;
1633 T virtual const charT* do_toupper(charT* low, const charT* high) const;
1634 T virtual charT do_tolower(charT) const;
1635 T virtual const charT* do_tolower(charT* low, const charT* high) const;
1636 T virtual charT do_widen(char) const;
1637 T virtual const char* do_widen(const char* low, const char* high,
1639 T virtual char do_narrow(charT, char dfault) const;
1640 T virtual const charT* do_narrow(const charT* low, const charT* high,
1641 char dfault, char* dest) const;
1645 22.2.1.2 Template class ctype_byname [lib.locale.ctype.byname]
1647 X template <class charT>
1648 class ctype_byname : public ctype<charT> {
1650 T typedef ctype<charT>::mask mask;
1651 S explicit ctype_byname(const char*, size_t refs = 0);
1653 S ~ctype_byname(); // virtual
1654 S virtual bool do_is(mask m, charT c) const;
1655 S virtual const charT* do_is(const charT* low, const charT* high,
1657 S virtual const char* do_scan_is(mask m,
1658 const charT* low, const charT* high) const;
1659 S virtual const char* do_scan_not(mask m,
1660 const charT* low, const charT* high) const;
1661 S virtual charT do_toupper(charT) const;
1662 S virtual const charT* do_toupper(charT* low, const charT* high) const;
1663 S virtual charT do_tolower(charT) const;
1664 S virtual const charT* do_tolower(charT* low, const charT* high) const;
1665 S virtual charT do_widen(char) const;
1666 S virtual const char* do_widen(const char* low, const char* high,
1668 S virtual char do_narrow(charT, char dfault) const;
1669 S virtual const charT* do_narrow(const charT* low, const charT* high,
1670 char dfault, char* dest) const;
1673 22.2.1.3 ctype specializations [lib.facet.ctype.special]
1675 T template <> class ctype<char>
1676 : public locale::facet, public ctype_base {
1678 T typedef char char_type;
1679 T explicit ctype(const mask* tab = 0, bool del = false,
1681 T bool is(mask m, char c) const;
1682 T const char* is(const char* low, const char* high, mask* vec) const;
1683 T const char* scan_is (mask m,
1684 const char* low, const char* high) const;
1685 T const char* scan_not(mask m,
1686 const char* low, const char* high) const;
1687 T char toupper(char c) const;
1688 T const char* toupper(char* low, const char* high) const;
1689 T char tolower(char c) const;
1690 T const char* tolower(char* low, const char* high) const;
1691 T char widen(char c) const;
1692 T const char* widen(const char* low, const char* high, char* to) const;
1693 T char narrow(char c, char dfault) const;
1694 T const char* narrow(const char* low, const char* high, char dfault,
1696 T static locale::id id;
1697 T static const size_t table_size = IMPLEMENTATION_DEFINED;
1700 T const mask* table() const throw();
1701 T static const mask* classic_table() throw();
1702 T ~ctype(); // virtual
1703 T virtual char do_toupper(char c) const;
1704 T virtual const char* do_toupper(char* low, const char* high) const;
1705 T virtual char do_tolower(char c) const;
1706 T virtual const char* do_tolower(char* low, const char* high) const;
1708 T virtual char do_widen(char c) const;
1709 T virtual const char* do_widen(const char* low,
1712 T virtual char do_narrow(char c, char dfault) const;
1713 T virtual const char* do_narrow(const char* low,
1715 char dfault, char* to) const;
1719 22.2.1.4 Class [lib.locale.ctype.byname.special]
1722 X template <> class ctype_byname<char> : public ctype<char> {
1724 S explicit ctype_byname(const char*, size_t refs = 0);
1726 S ~ctype_byname(); // virtual
1727 S virtual char do_toupper(char c) const;
1728 S virtual const char* do_toupper(char* low, const char* high) const;
1729 S virtual char do_tolower(char c) const;
1730 S virtual const char* do_tolower(char* low, const char* high) const;
1732 S virtual char do_widen(char c) const;
1733 S virtual const char* do_widen(char* low,
1736 S virtual char do_widen(char c) const;
1737 S virtual const char* do_widen(char* low, const char* high) const;
1743 22.2.1.5 Template class codecvt [lib.locale.codecvt]
1745 T class codecvt_base {
1747 T enum result { ok, partial, error, noconv };
1750 T template <class internT, class externT, class stateT>
1751 class codecvt : public locale::facet, public codecvt_base {
1753 T typedef internT intern_type;
1754 T typedef externT extern_type;
1755 T typedef stateT state_type;
1756 T explicit codecvt(size_t refs = 0)
1757 T result out(stateT& state,
1758 const internT* from, const internT* from_end, const internT*& from_next,
1759 externT* to, externT* to_limit, externT*& to_next) const;
1760 T result unshift(stateT& state,
1761 externT* to, externT* to_limit, externT*& to_next) const;
1762 T result in(stateT& state,
1763 const externT* from, const externT* from_end, const externT*& from_next,
1764 internT* to, internT* to_limit, internT*& to_next) const;
1765 T int encoding() const throw();
1766 T bool always_noconv() const throw();
1767 T int length(const stateT&, const externT* from, const externT* end,
1769 T int max_length() const throw();
1770 T static locale::id id;
1773 T ~codecvt(); // virtual
1774 T virtual result do_out(stateT& state,
1775 const internT* from, const internT* from_end, const internT*& from_next,
1776 externT* to, externT* to_limit, externT*& to_next) const;
1777 T virtual result do_in(stateT& state,
1778 T const externT* from, const externT* from_end, const externT*& from_next,
1779 internT* to, internT* to_limit, internT*& to_next) const;
1780 T virtual result do_unshift(stateT& state,
1781 externT* to, externT* to_limit, externT*& to_next) const;
1782 T virtual int do_encoding() const throw();
1783 T virtual bool do_always_noconv() const throw();
1784 T virtual int do_length(const stateT&, const externT* from,
1785 const externT* end, size_t max) const;
1786 T virtual int do_max_length() const throw();
1791 22.2.1.6 Template class [lib.locale.codecvt.byname]
1794 X template <class internT, class externT, class stateT>
1795 class codecvt_byname : public codecvt<internT, externT, stateT> {
1797 S explicit codecvt_byname(const char*, size_t refs = 0);
1799 S ~codecvt_byname(); // virtual
1800 S virtual result do_out(stateT& state,
1801 const internT* from, const internT* from_end, const internT*& from_next,
1802 externT* to, externT* to_limit, externT*& to_next) const;
1803 S virtual result do_in(stateT& state,
1804 const externT* from, const externT* from_end, const externT*& from_next,
1805 internT* to, internT* to_limit, internT*& to_next) const;
1806 S virtual result do_unshift(stateT& state,
1807 externT* to, externT* to_limit, externT*& to_next) const;
1808 S virtual int do_encoding() const throw();
1809 S virtual bool do_always_noconv() const throw();
1810 S virtual int do_length(const stateT&, const externT* from,
1811 const externT* end, size_t max) const;
1812 S virtual result do_unshift(stateT& state,
1813 externT* to, externT* to_limit, externT*& to_next) const;
1814 S virtual int do_max_length() const throw();
1818 22.2.2.1 Template class num_get [lib.locale.num.get]
1820 X template <class charT, class InputIterator = istreambuf_iterator<charT> >
1821 class num_get : public locale::facet {
1823 T typedef charT char_type;
1824 T typedef InputIterator iter_type;
1825 T explicit num_get(size_t refs = 0);
1826 T iter_type get(iter_type in, iter_type end, ios_base&,
1827 ios_base::iostate& err, bool& v) const;
1828 T iter_type get(iter_type in, iter_type end, ios_base& ,
1829 ios_base::iostate& err, long& v) const;
1830 T iter_type get(iter_type in, iter_type end, ios_base&,
1831 ios_base::iostate& err, unsigned short& v) const;
1832 T iter_type get(iter_type in, iter_type end, ios_base&,
1833 ios_base::iostate& err, unsigned int& v) const;
1834 T iter_type get(iter_type in, iter_type end, ios_base&,
1835 ios_base::iostate& err, unsigned long& v) const;
1836 T iter_type get(iter_type in, iter_type end, ios_base&,
1837 ios_base::iostate& err, float& v) const;
1838 T iter_type get(iter_type in, iter_type end, ios_base&,
1839 ios_base::iostate& err, double& v) const;
1840 T iter_type get(iter_type in, iter_type end, ios_base&,
1841 ios_base::iostate& err, long double& v) const;
1842 T iter_type get(iter_type in, iter_type end, ios_base&,
1843 ios_base::iostate& err, void*& v) const;
1844 T static locale::id id;
1847 T ~num_get(); // virtual
1848 T virtual iter_type do_get(iter_type, iter_type, ios_base&,
1849 ios_base::iostate& err, bool& v) const;
1850 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1851 ios_base::iostate& err, long& v) const;
1852 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1853 ios_base::iostate& err, unsigned short& v) const;
1854 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1855 ios_base::iostate& err, unsigned int& v) const;
1856 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1857 ios_base::iostate& err, unsigned long& v) const;
1858 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1859 ios_base::iostate& err, float& v) const;
1860 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1861 ios_base::iostate& err, double& v) const;
1862 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1863 ios_base::iostate& err, long double& v) const;
1864 S virtual iter_type do_get(iter_type, iter_type, ios_base&,
1865 ios_base::iostate& err, void*& v) const;
1870 22.2.2.2 Template class num_put [lib.locale.nm.put]
1872 X template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
1873 class num_put : public locale::facet {
1875 T typedef charT char_type;
1876 T typedef OutputIterator iter_type;
1877 T explicit num_put(size_t refs = 0);
1878 T iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const;
1879 T iter_type put(iter_type s, ios_base& f, char_type fill, long v) const;
1880 T iter_type put(iter_type s, ios_base& f, char_type fill,
1881 unsigned long v) const;
1882 T iter_type put(iter_type s, ios_base& f, char_type fill,
1884 T iter_type put(iter_type s, ios_base& f, char_type fill,
1885 long double v) const;
1886 T iter_type put(iter_type s, ios_base& f, char_type fill,
1887 const void* v) const;
1888 T static locale::id id;
1890 T ~num_put(); // virtual
1891 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1893 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1895 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1896 unsigned long) const;
1897 S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1899 S virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1900 long double v) const;
1901 T virtual iter_type do_put(iter_type, ios_base&, char_type fill,
1902 const void* v) const;
1906 22.2.3.1 Template class numpunct [lib.locale.numpunct]
1908 T template <class charT>
1909 class numpunct : public locale::facet {
1911 T typedef charT char_type;
1912 T typedef basic_string<charT> string_type;
1913 T explicit numpunct(size_t refs = 0);
1914 T char_type decimal_point() const;
1915 T char_type thousands_sep() const;
1916 T string grouping() const;
1917 T string_type truename() const;
1918 T string_type falsename() const;
1919 T static locale::id id;
1921 T ~numpunct(); // virtual
1922 T virtual char_type do_decimal_point() const;
1923 T virtual char_type do_thousands_sep() const;
1924 T virtual string do_grouping() const;
1925 T virtual string_type do_truename() const; // for bool
1926 T virtual string_type do_falsename() const; // for bool
1932 22.2.3.2 Template class [lib.locale.numpunct.byname]
1935 X template <class charT>
1936 class numpunct_byname : public numpunct<charT> {
1937 // this class is specialized for char and wchar_t.
1939 T typedef charT char_type;
1940 T typedef basic_string<charT> string_type;
1941 S explicit numpunct_byname(const char*, size_t refs = 0);
1943 S ~numpunct_byname(); // virtual
1944 S virtual char_type do_decimal_point() const;
1945 S virtual char_type do_thousands_sep() const;
1946 S virtual string do_grouping() const;
1947 S virtual string_type do_truename() const; // for bool
1948 S virtual string_type do_falsename() const; // for bool
1952 22.2.4.1 Template class collate [lib.locale.collate]
1954 T template <class charT>
1955 class collate : public locale::facet {
1957 T typedef charT char_type;
1958 T typedef basic_string<charT> string_type;
1959 T explicit collate(size_t refs = 0);
1960 T int compare(const charT* low1, const charT* high1,
1961 const charT* low2, const charT* high2) const;
1962 T string_type transform(const charT* low, const charT* high) const;
1963 T long hash(const charT* low, const charT* high) const;
1964 T static locale::id id;
1966 T ~collate(); // virtual
1967 T virtual int do_compare(const charT* low1, const charT* high1,
1968 const charT* low2, const charT* high2) const;
1969 T virtual string_type do_transform
1970 (const charT* low, const charT* high) const;
1971 T virtual long do_hash (const charT* low, const charT* high) const;
1975 22.2.4.2 Template class [lib.locale.collate.byname]
1978 X template <class charT>
1979 class collate_byname : public collate<charT> {
1981 T typedef basic_string<charT> string_type;
1982 T explicit collate_byname(const char*, size_t refs = 0);
1984 S ~collate_byname(); // virtual
1985 S virtual int do_compare(const charT* low1, const charT* high1,
1986 const charT* low2, const charT* high2) const;
1987 S virtual string_type do_transform
1988 (const charT* low, const charT* high) const;
1989 S virtual long do_hash (const charT* low, const charT* high) const;
1993 22.2.5.1 Template class time_get [lib.locale.time.get]
1997 T enum dateorder { no_order, dmy, mdy, ymd, ydm };
2000 [Note: semantics of time_get members are implementation-defined.
2001 To complete implementation requires documenting behavior.]
2003 X template <class charT, class InputIterator = istreambuf_iterator<charT> >
2004 class time_get : public locale::facet, public time_base {
2006 T typedef charT char_type;
2007 T typedef InputIterator iter_type;
2008 T explicit time_get(size_t refs = 0);
2010 T dateorder date_order() const { return do_date_order(); }
2011 T iter_type get_time(iter_type s, iter_type end, ios_base& f,
2012 ios_base::iostate& err, tm* t) const;
2013 T iter_type get_date(iter_type s, iter_type end, ios_base& f,
2014 ios_base::iostate& err, tm* t) const;
2015 T iter_type get_weekday(iter_type s, iter_type end, ios_base& f,
2016 ios_base::iostate& err, tm* t) const;
2017 T iter_type get_monthname(iter_type s, iter_type end, ios_base& f,
2018 ios_base::iostate& err, tm* t) const;
2019 T iter_type get_year(iter_type s, iter_type end, ios_base& f,
2020 ios_base::iostate& err, tm* t) const;
2021 T static locale::id id;
2023 ~time_get(); // virtual
2024 X virtual dateorder do_date_order() const;
2025 S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
2026 ios_base::iostate& err, tm* t) const;
2027 S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
2028 ios_base::iostate& err, tm* t) const;
2029 S virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
2030 ios_base::iostate& err, tm* t) const;
2031 S virtual iter_type do_get_monthname(iter_type s, ios_base&,
2032 ios_base::iostate& err, tm* t) const;
2033 S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
2034 ios_base::iostate& err, tm* t) const;
2039 22.2.5.2 Template class [lib.locale.time.get.byname]
2042 X template <class charT, class InputIterator = istreambuf_iterator<charT> >
2043 class time_get_byname : public time_get<charT, InputIterator> {
2045 T typedef time_base::dateorder dateorder;
2046 T typedef InputIterator iter_type
2048 S explicit time_get_byname(const char*, size_t refs = 0);
2050 S ~time_get_byname(); // virtual
2051 S virtual dateorder do_date_order() const;
2052 S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
2053 ios_base::iostate& err, tm* t) const;
2054 S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
2055 ios_base::iostate& err, tm* t) const;
2056 T virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
2057 ios_base::iostate& err, tm* t) const;
2058 T virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&,
2059 ios_base::iostate& err, tm* t) const;
2060 S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
2061 ios_base::iostate& err, tm* t) const;
2065 22.2.5.3 Template class time_put [lib.locale.time.put]
2067 X template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
2068 class time_put : public locale::facet {
2070 T typedef charT char_type;
2071 T typedef OutputIterator iter_type;
2072 T explicit time_put(size_t refs = 0);
2073 // the following is implemented in terms of other member functions.
2074 S iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
2075 const charT* pattern, const charT* pat_end) const;
2076 T iter_type put(iter_type s, ios_base& f, char_type fill,
2077 const tm* tmb, char format, char modifier = 0) const;
2078 T static locale::id id;
2080 T ~time_put(); // virtual
2081 S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
2082 char format, char modifier) const;
2087 22.2.5.4 Template class [lib.locale.time.put.byname]
2090 T template <class charT, class OutputIterator = ostreambuf_iterator<charT> >
2091 class time_put_byname : public time_put<charT, OutputIterator>
2094 T typedef charT char_type;
2095 T typedef OutputIterator iter_type;
2097 T explicit time_put_byname(const char*, size_t refs = 0);
2099 T ~time_put_byname(); // virtual
2100 S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
2101 char format, char modifier) const;
2105 22.2.6.1 Template class money_get [lib.locale.money.get]
2107 X template <class charT,
2108 class InputIterator = istreambuf_iterator<charT> >
2109 class money_get : public locale::facet {
2111 T typedef charT char_type;
2112 T typedef InputIterator iter_type;
2113 T typedef basic_string<charT> string_type;
2114 T explicit money_get(size_t refs = 0);
2115 T iter_type get(iter_type s, iter_type end, bool intl,
2116 ios_base& f, ios_base::iostate& err,
2117 long double& units) const;
2118 T iter_type get(iter_type s, iter_type end, bool intl,
2119 ios_base& f, ios_base::iostate& err,
2120 string_type& digits) const;
2121 T static locale::id id;
2123 T ~money_get(); // virtual
2124 S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
2125 ios_base::iostate& err, long double& units) const;
2126 S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
2127 ios_base::iostate& err, string_type& digits) const;
2130 22.2.6.2 Template class money_put [lib.locale.money.put]
2132 X template <class charT,
2133 class OutputIterator = ostreambuf_iterator<charT> >
2134 class money_put : public locale::facet {
2136 T typedef charT char_type;
2137 T typedef OutputIterator iter_type;
2138 T typedef basic_string<charT> string_type;
2139 T explicit money_put(size_t refs = 0);
2140 T iter_type put(iter_type s, bool intl, ios_base& f,
2141 char_type fill, long double units) const;
2142 T iter_type put(iter_type s, bool intl, ios_base& f,
2143 char_type fill, const string_type& digits) const;
2144 T static locale::id id;
2147 T ~money_put(); // virtual
2149 do_put(iter_type, bool, ios_base&, char_type fill,
2150 long double units) const;
2152 do_put(iter_type, bool, ios_base&, char_type fill,
2153 const string_type& digits) const;
2157 22.2.6.3 Template class moneypunct [lib.locale.moneypunct]
2159 T class money_base {
2161 T enum part { none, space, symbol, sign, value };
2162 T struct pattern { char field[4]; };
2165 X template <class charT, bool International = false>
2166 class moneypunct : public locale::facet, public money_base {
2168 T typedef charT char_type;
2169 T typedef basic_string<charT> string_type;
2170 T explicit moneypunct(size_t refs = 0);
2171 T charT decimal_point() const;
2172 T charT thousands_sep() const;
2173 T string grouping() const;
2174 T string_type curr_symbol() const;
2175 T string_type positive_sign() const;
2176 T string_type negative_sign() const;
2177 T int frac_digits() const;
2178 T pattern pos_format() const;
2179 T pattern neg_format() const;
2180 T static locale::id id;
2181 T static const bool intl = International;
2183 T ~moneypunct(); // virtual
2184 S virtual charT do_decimal_point() const;
2185 S virtual charT do_thousands_sep() const;
2186 S virtual string do_grouping() const;
2187 S virtual string_type do_curr_symbol() const;
2188 S virtual string_type do_positive_sign() const;
2189 S virtual string_type do_negative_sign() const;
2190 S virtual int do_frac_digits() const;
2191 T virtual pattern do_pos_format() const;
2192 T virtual pattern do_neg_format() const;
2196 22.2.6.4 Template class [lib.locale.moneypunct.byname]
2199 X template <class charT, bool Intl = false>
2200 class moneypunct_byname : public moneypunct<charT, Intl> {
2202 T typedef money_base::pattern pattern;
2203 T typedef basic_string<charT> string_type;
2205 T explicit moneypunct_byname(const char*, size_t refs = 0);
2207 T ~moneypunct_byname(); // virtual
2208 S virtual charT do_decimal_point() const;
2209 S virtual charT do_thousands_sep() const;
2210 S virtual string do_grouping() const;
2211 S virtual string_type do_curr_symbol() const;
2212 S virtual string_type do_positive_sign() const;
2213 S virtual string_type do_negative_sign() const;
2214 S virtual int do_frac_digits() const;
2215 S virtual pattern do_pos_format() const;
2216 S virtual pattern do_neg_format() const;
2219 22.2.7.1 Template class messages [lib.locale.messages]
2221 T class messages_base {
2223 T typedef int catalog;
2226 X template <class charT>
2227 class messages : public locale::facet, public messages_base {
2229 T typedef charT char_type;
2230 T typedef basic_string<charT> string_type;
2231 T explicit messages(size_t refs = 0);
2232 T catalog open(const basic_string<char>& fn, const locale&) const;
2233 T string_type get(catalog c, int set, int msgid,
2234 const string_type& dfault) const;
2235 T void close(catalog c) const;
2236 T static locale::id id;
2238 T ~messages(); // virtual
2239 S virtual catalog do_open(const basic_string<char>&, const locale&) const;
2240 S virtual string_type do_get(catalog, int set, int msgid,
2241 const string_type& dfault) const;
2242 S virtual void do_close(catalog) const;
2245 22.2.7.2 Template class [lib.locale.messages.byname]
2249 X template <class charT>
2250 class messages_byname : public messages<charT> {
2252 T typedef messages_base::catalog catalog;
2253 T typedef basic_string<charT> string_type;
2255 T explicit messages_byname(const char*, size_t refs = 0);
2257 T ~messages_byname(); // virtual
2258 S virtual catalog do_open(const basic_string<char>&, const locale&) const;
2259 S virtual string_type do_get(catalog, int set, int msgid,
2260 const string_type& dfault) const;
2261 S virtual void do_close(catalog) const;
2265 22.3 C Library Locales [lib.c.locales]
2268 Table 13--Header <clocale> synopsis
2270 X LC_ALL LC_COLLATE LC_CTYPE
2271 X LC_MONETARY LC_NUMERIC LC_TIME
2274 X Functions: localeconv setlocale
2277 23.2 Sequences [lib.sequences]
2279 <deque>, <list>, <queue>, <stack>, and <vector>.
2281 Header <deque> synopsis
2283 X template <class T, class Allocator = allocator<T> > class deque;
2284 T template <class T, class Allocator>
2285 bool operator==(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2286 T template <class T, class Allocator>
2287 bool operator< (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2288 T template <class T, class Allocator>
2289 bool operator!=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2290 T template <class T, class Allocator>
2291 bool operator> (const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2292 T template <class T, class Allocator>
2293 bool operator>=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2294 T template <class T, class Allocator>
2295 bool operator<=(const deque<T,Allocator>& x, const deque<T,Allocator>& y);
2296 T template <class T, class Allocator>
2297 void swap(deque<T,Allocator>& x, deque<T,Allocator>& y);
2300 Header <list> synopsis
2302 X template <class T, class Allocator = allocator<T> > class list;
2303 T template <class T, class Allocator>
2304 bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
2305 T template <class T, class Allocator>
2306 bool operator< (const list<T,Allocator>& x, const list<T,Allocator>& y);
2307 T template <class T, class Allocator>
2308 bool operator!=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2309 T template <class T, class Allocator>
2310 bool operator> (const list<T,Allocator>& x, const list<T,Allocator>& y);
2311 T template <class T, class Allocator>
2312 bool operator>=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2313 T template <class T, class Allocator>
2314 bool operator<=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2315 T template <class T, class Allocator>
2316 void swap(list<T,Allocator>& x, list<T,Allocator>& y);
2319 Header <queue> synopsis
2322 X template <class T, class Container = deque<T> > class queue;
2323 T template <class T, class Container>
2324 bool operator==(const queue<T, Container>& x,
2325 const queue<T, Container>& y);
2326 T template <class T, class Container>
2327 bool operator< (const queue<T, Container>& x,
2328 const queue<T, Container>& y);
2329 T template <class T, class Container>
2330 bool operator!=(const queue<T, Container>& x,
2331 const queue<T, Container>& y);
2332 T template <class T, class Container>
2333 bool operator> (const queue<T, Container>& x,
2334 const queue<T, Container>& y);
2335 T template <class T, class Container>
2336 bool operator>=(const queue<T, Container>& x,
2337 const queue<T, Container>& y);
2338 T template <class T, class Container>
2339 bool operator<=(const queue<T, Container>& x,
2340 const queue<T, Container>& y);
2341 T template <class T, class Container = vector<T>,
2342 class Compare = less<typename Container::value_type> >
2343 T class priority_queue;
2346 Header <stack> synopsis
2349 T template <class T, class Container = deque<T> > class stack;
2350 T template <class T, class Container>
2351 bool operator==(const stack<T, Container>& x,
2352 const stack<T, Container>& y);
2353 T template <class T, class Container>
2354 bool operator< (const stack<T, Container>& x,
2355 const stack<T, Container>& y);
2356 T template <class T, class Container>
2357 bool operator!=(const stack<T, Container>& x,
2358 const stack<T, Container>& y);
2359 T template <class T, class Container>
2360 bool operator> (const stack<T, Container>& x,
2361 const stack<T, Container>& y);
2362 T template <class T, class Container>
2363 bool operator>=(const stack<T, Container>& x,
2364 const stack<T, Container>& y);
2365 T template <class T, class Container>
2366 bool operator<=(const stack<T, Container>& x,
2367 const stack<T, Container>& y);
2370 Header <vector> synopsis
2372 T template <class T, class Allocator = allocator<T> > class vector;
2374 T template <class T, class Allocator>
2375 bool operator==(const vector<T,Allocator>& x,
2376 const vector<T,Allocator>& y);
2377 T template <class T, class Allocator>
2378 bool operator< (const vector<T,Allocator>& x,
2379 const vector<T,Allocator>& y);
2380 T template <class T, class Allocator>
2381 bool operator!=(const vector<T,Allocator>& x,
2382 const vector<T,Allocator>& y);
2383 T template <class T, class Allocator>
2384 bool operator> (const vector<T,Allocator>& x,
2385 const vector<T,Allocator>& y);
2386 T template <class T, class Allocator>
2387 bool operator>=(const vector<T,Allocator>& x,
2388 const vector<T,Allocator>& y);
2389 T template <class T, class Allocator>
2390 bool operator<=(const vector<T,Allocator>& x,
2391 const vector<T,Allocator>& y);
2392 T template <class T, class Allocator>
2393 void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);
2395 T template <class Allocator> class vector<bool,Allocator>;
2396 T template <class Allocator>
2397 bool operator==(const vector<bool,Allocator>& x,
2398 const vector<bool,Allocator>& y);
2399 T template <class Allocator>
2400 bool operator< (const vector<bool,Allocator>& x,
2401 const vector<bool,Allocator>& y);
2402 T template <class Allocator>
2403 bool operator!=(const vector<bool,Allocator>& x,
2404 const vector<bool,Allocator>& y);
2405 T template <class Allocator>
2406 bool operator> (const vector<bool,Allocator>& x,
2407 const vector<bool,Allocator>& y);
2408 T template <class Allocator>
2409 bool operator>=(const vector<bool,Allocator>& x,
2410 const vector<bool,Allocator>& y);
2411 T template <class Allocator>
2412 bool operator<=(const vector<bool,Allocator>& x,
2413 const vector<bool,Allocator>& y);
2414 T template <class Allocator>
2415 void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);
2418 23.2.1 Template class deque [lib.deque]
2420 template <class T, class Allocator = allocator<T> >
2424 T typedef typename Allocator::reference reference;
2425 T typedef typename Allocator::const_reference const_reference;
2426 X typedef implementation defined iterator;
2427 X typedef implementation defined const_iterator;
2428 T typedef implementation defined size_type;
2429 T typedef implementation defined difference_type;
2430 T typedef T value_type;
2431 T typedef Allocator allocator_type;
2432 T typedef typename Allocator::pointer pointer;
2433 T typedef typename Allocator::const_pointer const_pointer;
2434 T typedef std::reverse_iterator<iterator> reverse_iterator;
2435 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2436 // _lib.deque.cons_ construct/copy/destroy:
2437 T explicit deque(const Allocator& = Allocator());
2438 T explicit deque(size_type n, const T& value = T(),
2439 const Allocator& = Allocator());
2440 T template <class InputIterator>
2441 deque(InputIterator first, InputIterator last,
2442 const Allocator& = Allocator());
2443 T deque(const deque<T,Allocator>& x);
2445 T deque<T,Allocator>& operator=(const deque<T,Allocator>& x);
2446 T template <class InputIterator>
2447 void assign(InputIterator first, InputIterator last);
2448 T void assign(size_type n, const T& t);
2449 T allocator_type get_allocator() const;
2452 T const_iterator begin() const;
2454 T const_iterator end() const;
2455 T reverse_iterator rbegin();
2456 T const_reverse_iterator rbegin() const;
2457 T reverse_iterator rend();
2458 T const_reverse_iterator rend() const;
2459 // _lib.deque.capacity_ capacity:
2460 T size_type size() const;
2461 T size_type max_size() const;
2462 T void resize(size_type sz, T c = T());
2463 T bool empty() const;
2466 T reference operator[](size_type n);
2467 T const_reference operator[](size_type n) const;
2468 T reference at(size_type n);
2469 T const_reference at(size_type n) const;
2470 T reference front();
2471 T const_reference front() const;
2473 T const_reference back() const;
2474 // _lib.deque.modifiers_ modifiers:
2475 T void push_front(const T& x);
2476 T void push_back(const T& x);
2477 T iterator insert(iterator position, const T& x);
2478 T void insert(iterator position, size_type n, const T& x);
2479 T template <class InputIterator>
2480 void insert (iterator position,
2481 InputIterator first, InputIterator last);
2484 T iterator erase(iterator position);
2485 T iterator erase(iterator first, iterator last);
2486 T void swap(deque<T,Allocator>&);
2489 T template <class T, class Allocator>
2490 bool operator==(const deque<T,Allocator>& x,
2491 const deque<T,Allocator>& y);
2492 T template <class T, class Allocator>
2493 bool operator< (const deque<T,Allocator>& x,
2494 const deque<T,Allocator>& y);
2495 T template <class T, class Allocator>
2496 bool operator!=(const deque<T,Allocator>& x,
2497 const deque<T,Allocator>& y);
2498 T template <class T, class Allocator>
2499 bool operator> (const deque<T,Allocator>& x,
2500 const deque<T,Allocator>& y);
2501 T template <class T, class Allocator>
2502 bool operator>=(const deque<T,Allocator>& x,
2503 const deque<T,Allocator>& y);
2504 T template <class T, class Allocator>
2505 bool operator<=(const deque<T,Allocator>& x,
2506 const deque<T,Allocator>& y);
2507 // specialized algorithms:
2508 T template <class T, class Allocator>
2509 void swap(deque<T,Allocator>& x, deque<T,Allocator>& y);
2512 23.2.2 Template class list [lib.list]
2514 X template <class T, class Allocator = allocator<T> >
2518 T typedef typename Allocator::reference reference;
2519 T typedef typename Allocator::const_reference const_reference;
2520 X typedef implementation defined iterator;
2521 X typedef implementation defined const_iterator;
2522 T typedef implementation defined size_type;
2523 T typedef implementation defined difference_type;
2524 T typedef T value_type;
2525 T typedef Allocator allocator_type;
2526 T typedef typename Allocator::pointer pointer;
2527 T typedef typename Allocator::const_pointer const_pointer;
2528 T typedef std::reverse_iterator<iterator> reverse_iterator;
2529 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2531 // _lib.list.cons_ construct/copy/destroy:
2532 T explicit list(const Allocator& = Allocator());
2533 T explicit list(size_type n, const T& value = T(),
2534 const Allocator& = Allocator());
2535 T template <class InputIterator>
2536 list(InputIterator first, InputIterator last,
2537 const Allocator& = Allocator());
2538 T list(const list<T,Allocator>& x);
2540 T list<T,Allocator>& operator=(const list<T,Allocator>& x);
2541 T template <class InputIterator>
2542 void assign(InputIterator first, InputIterator last);
2543 T void assign(size_type n, const T& t);
2544 T allocator_type get_allocator() const;
2547 T const_iterator begin() const;
2549 T const_iterator end() const;
2550 T reverse_iterator rbegin();
2551 T const_reverse_iterator rbegin() const;
2552 T reverse_iterator rend();
2553 T const_reverse_iterator rend() const;
2554 // _lib.list.capacity_ capacity:
2555 T bool empty() const;
2556 T size_type size() const;
2557 T size_type max_size() const;
2558 T void resize(size_type sz, T c = T());
2560 T reference front();
2561 T const_reference front() const;
2563 T const_reference back() const;
2564 // _lib.list.modifiers_ modifiers:
2565 T void push_front(const T& x);
2567 T void push_back(const T& x);
2569 T iterator insert(iterator position, const T& x);
2570 T void insert(iterator position, size_type n, const T& x);
2571 T template <class InputIterator>
2572 void insert(iterator position, InputIterator first,
2573 InputIterator last);
2574 T iterator erase(iterator position);
2575 T iterator erase(iterator position, iterator last);
2576 T void swap(list<T,Allocator>&);
2578 // _lib.list.ops_ list operations:
2579 T void splice(iterator position, list<T,Allocator>& x);
2580 T void splice(iterator position, list<T,Allocator>& x, iterator i);
2581 T void splice(iterator position, list<T,Allocator>& x, iterator first,
2583 T void remove(const T& value);
2584 T template <class Predicate> void remove_if(Predicate pred);
2587 T template <class BinaryPredicate>
2588 void unique(BinaryPredicate binary_pred);
2589 T void merge(list<T,Allocator>& x);
2590 T template <class Compare> void merge(list<T,Allocator>& x, Compare comp);
2592 T template <class Compare> void sort(Compare comp);
2595 T template <class T, class Allocator>
2596 bool operator==(const list<T,Allocator>& x, const list<T,Allocator>& y);
2597 T template <class T, class Allocator>
2598 bool operator< (const list<T,Allocator>& x, const list<T,Allocator>& y);
2599 T template <class T, class Allocator>
2600 bool operator!=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2601 T template <class T, class Allocator>
2602 bool operator> (const list<T,Allocator>& x, const list<T,Allocator>& y);
2603 T template <class T, class Allocator>
2604 bool operator>=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2605 T template <class T, class Allocator>
2606 bool operator<=(const list<T,Allocator>& x, const list<T,Allocator>& y);
2607 // specialized algorithms:
2608 T template <class T, class Allocator>
2609 void swap(list<T,Allocator>& x, list<T,Allocator>& y);
2612 23.2.3.1 Template class queue [lib.queue]
2614 T template <class T, class Container = deque<T> >
2617 T typedef typename Container::value_type value_type;
2618 T typedef typename Container::size_type size_type;
2619 T typedef Container container_type;
2623 T explicit queue(const Container& = Container());
2625 T bool empty() const { return c.empty(); }
2626 T size_type size() const { return c.size(); }
2627 T value_type& front() { return c.front(); }
2628 T const value_type& front() const { return c.front(); }
2629 T value_type& back() { return c.back(); }
2630 T const value_type& back() const { return c.back(); }
2631 T void push(const value_type& x) { c.push_back(x); }
2632 T void pop() { c.pop_front(); }
2635 T template <class T, class Container>
2636 bool operator==(const queue<T, Container>& x,
2637 const queue<T, Container>& y);
2638 T template <class T, class Container>
2639 bool operator< (const queue<T, Container>& x,
2640 const queue<T, Container>& y);
2641 T template <class T, class Container>
2642 bool operator!=(const queue<T, Container>& x,
2643 const queue<T, Container>& y);
2644 T template <class T, class Container>
2645 bool operator> (const queue<T, Container>& x,
2646 const queue<T, Container>& y);
2647 T template <class T, class Container>
2648 bool operator>=(const queue<T, Container>& x,
2649 const queue<T, Container>& y);
2650 T template <class T, class Container>
2651 bool operator<=(const queue<T, Container>& x,
2652 const queue<T, Container>& y);
2654 23.2.3.2 Template class priority_queue [lib.priority.queue]
2656 T template <class T, class Container = vector<T>,
2657 class Compare = less<typename Container::value_type> >
2658 class priority_queue {
2660 T typedef typename Container::value_type value_type;
2661 T typedef typename Container::size_type size_type;
2662 T typedef Container container_type;
2667 T explicit priority_queue(const Compare& x = Compare(),
2668 const Container& = Container());
2669 T template <class InputIterator>
2670 priority_queue(InputIterator first, InputIterator last,
2671 const Compare& x = Compare(),
2672 const Container& = Container());
2674 T bool empty() const { return c.empty(); }
2675 T size_type size() const { return c.size(); }
2676 T const value_type& top() const { return c.front(); }
2677 T void push(const value_type& x);
2681 23.2.3.3 Template class stack [lib.stack]
2683 T template <class T, class Container = deque<T> >
2686 T typedef typename Container::value_type value_type;
2687 T typedef typename Container::size_type size_type;
2688 T typedef Container container_type;
2692 T explicit stack(const Container& = Container());
2694 T bool empty() const { return c.empty(); }
2695 T size_type size() const { return c.size(); }
2696 T value_type& top() { return c.back(); }
2697 T const value_type& top() const { return c.back(); }
2698 T void push(const value_type& x) { c.push_back(x); }
2699 T void pop() { c.pop_back(); }
2701 T template <class T, class Container>
2702 bool operator==(const stack<T, Container>& x,
2703 const stack<T, Container>& y);
2704 T template <class T, class Container>
2705 bool operator< (const stack<T, Container>& x,
2706 const stack<T, Container>& y);
2707 T template <class T, class Container>
2708 bool operator!=(const stack<T, Container>& x,
2709 const stack<T, Container>& y);
2710 T template <class T, class Container>
2711 bool operator> (const stack<T, Container>& x,
2712 const stack<T, Container>& y);
2713 T template <class T, class Container>
2714 bool operator>=(const stack<T, Container>& x,
2715 const stack<T, Container>& y);
2716 T template <class T, class Container>
2717 bool operator<=(const stack<T, Container>& x,
2718 const stack<T, Container>& y);
2720 23.2.4 Template class vector [lib.vector]
2722 template <class T, class Allocator = allocator<T> >
2726 T typedef typename Allocator::reference reference;
2727 T typedef typename Allocator::const_reference const_reference;
2728 X typedef implementation defined iterator;
2729 X typedef implementation defined const_iterator;
2730 T typedef implementation defined size_type;
2731 T typedef implementation defined difference_type;
2732 T typedef T value_type;
2733 T typedef Allocator allocator_type;
2734 T typedef typename Allocator::pointer pointer;
2735 T typedef typename Allocator::const_pointer const_pointer
2736 T typedef std::reverse_iterator<iterator> reverse_iterator;
2737 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2738 // _lib.vector.cons_ construct/copy/destroy:
2739 T explicit vector(const Allocator& = Allocator());
2740 T explicit vector(size_type n, const T& value = T(),
2741 const Allocator& = Allocator());
2742 T template <class InputIterator>
2743 vector(InputIterator first, InputIterator last,
2744 const Allocator& = Allocator());
2745 T vector(const vector<T,Allocator>& x);
2747 T vector<T,Allocator>& operator=(const vector<T,Allocator>& x);
2748 T template <class InputIterator>
2749 void assign(InputIterator first, InputIterator last);
2750 T void assign(size_type n, const T& u);
2751 T allocator_type get_allocator() const;
2754 T const_iterator begin() const;
2756 T const_iterator end() const;
2757 T reverse_iterator rbegin();
2758 T const_reverse_iterator rbegin() const;
2759 T reverse_iterator rend();
2760 T const_reverse_iterator rend() const;
2761 // _lib.vector.capacity_ capacity:
2762 T size_type size() const;
2763 T size_type max_size() const;
2764 T void resize(size_type sz, T c = T());
2765 T size_type capacity() const;
2766 T bool empty() const;
2767 T void reserve(size_type n);
2770 T reference operator[](size_type n);
2771 T const_reference operator[](size_type n) const;
2772 T const_reference at(size_type n) const;
2773 T reference at(size_type n);
2774 T reference front();
2775 T const_reference front() const;
2777 T const_reference back() const;
2778 // _lib.vector.modifiers_ modifiers:
2779 T void push_back(const T& x);
2781 T iterator insert(iterator position, const T& x);
2782 T void insert(iterator position, size_type n, const T& x);
2783 T template <class InputIterator>
2784 void insert(iterator position,
2785 InputIterator first, InputIterator last);
2786 T iterator erase(iterator position);
2787 T iterator erase(iterator first, iterator last);
2788 T void swap(vector<T,Allocator>&);
2792 T template <class T, class Allocator>
2793 bool operator==(const vector<T,Allocator>& x,
2794 const vector<T,Allocator>& y);
2795 T template <class T, class Allocator>
2796 bool operator< (const vector<T,Allocator>& x,
2797 const vector<T,Allocator>& y);
2798 T template <class T, class Allocator>
2799 bool operator!=(const vector<T,Allocator>& x,
2800 const vector<T,Allocator>& y);
2801 T template <class T, class Allocator>
2802 bool operator> (const vector<T,Allocator>& x,
2803 const vector<T,Allocator>& y);
2804 T template <class T, class Allocator>
2805 bool operator>=(const vector<T,Allocator>& x,
2806 const vector<T,Allocator>& y);
2807 T template <class T, class Allocator>
2808 bool operator<=(const vector<T,Allocator>& x,
2809 const vector<T,Allocator>& y);
2810 // specialized algorithms:
2811 T template <class T, class Allocator>
2812 void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);
2815 23.2.5 Class vector<bool> [lib.vector.bool]
2817 X template <class Allocator> class vector<bool, Allocator> {
2820 T typedef bool const_reference;
2821 X typedef implementation defined iterator;
2822 X typedef implementation defined const_iterator;
2823 T typedef implementation defined size_type;
2824 T typedef implementation defined difference_type;
2825 T typedef bool value_type;
2826 T typedef Allocator allocator_type;
2827 T typedef implementation defined pointer;
2828 T typedef implementation defined const_pointer
2829 T typedef std::reverse_iterator<iterator> reverse_iterator;
2830 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2833 friend class vector;
2837 T operator bool() const;
2838 T reference& operator=(const bool x);
2839 T reference& operator=(const reference& x);
2840 T void flip(); // flips the bit
2843 // construct/copy/destroy:
2844 T explicit vector(const Allocator& = Allocator());
2845 T explicit vector(size_type n, const bool& value = bool(),
2846 const Allocator& = Allocator());
2847 T template <class InputIterator>
2848 vector(InputIterator first, InputIterator last,
2849 const Allocator& = Allocator());
2850 T vector(const vector<bool,Allocator>& x);
2852 T vector<bool,Allocator>& operator=(const vector<bool,Allocator>& x);
2853 T template <class InputIterator>
2854 void assign(InputIterator first, InputIterator last);
2855 T void assign(size_type n, const T& t);
2856 T allocator_type get_allocator() const;
2859 T const_iterator begin() const;
2861 T const_iterator end() const;
2862 T reverse_iterator rbegin();
2863 T const_reverse_iterator rbegin() const;
2864 T reverse_iterator rend();
2865 T const_reverse_iterator rend() const;
2867 T size_type size() const;
2868 T size_type max_size() const;
2869 T void resize(size_type sz, bool c = false);
2870 T size_type capacity() const;
2871 T bool empty() const;
2872 T void reserve(size_type n);
2874 T reference operator[](size_type n);
2875 T const_reference operator[](size_type n) const;
2876 T const_reference at(size_type n) const;
2877 T reference at(size_type n);
2878 T reference front();
2879 T const_reference front() const;
2881 T const_reference back() const;
2883 T void push_back(const bool& x);
2885 T iterator insert(iterator position, const bool& x);
2886 T void insert (iterator position, size_type n, const bool& x);
2887 T template <class InputIterator>
2888 void insert(iterator position,
2889 InputIterator first, InputIterator last);
2890 T iterator erase(iterator position);
2891 T iterator erase(iterator first, iterator last);
2892 T void swap(vector<bool,Allocator>&);
2893 T static void swap(reference x, reference y);
2894 T void flip(); // flips all bits
2898 T template <class Allocator>
2899 bool operator==(const vector<bool,Allocator>& x,
2900 const vector<bool,Allocator>& y);
2901 T template <class Allocator>
2902 bool operator< (const vector<bool,Allocator>& x,
2903 const vector<bool,Allocator>& y);
2904 T template <class Allocator>
2905 bool operator!=(const vector<bool,Allocator>& x,
2906 const vector<bool,Allocator>& y);
2907 T template <class Allocator>
2908 bool operator> (const vector<bool,Allocator>& x,
2909 const vector<bool,Allocator>& y);
2910 T template <class Allocator>
2911 bool operator>=(const vector<bool,Allocator>& x,
2912 const vector<bool,Allocator>& y);
2913 T template <class Allocator>
2914 bool operator<=(const vector<bool,Allocator>& x,
2915 const vector<bool,Allocator>& y);
2916 // specialized algorithms:
2917 T template <class Allocator>
2918 void swap(vector<bool,Allocator>& x, vector<bool,Allocator>& y);
2920 23.3 Associative containers [lib.associative]
2924 Header <map> synopsis
2926 template <class Key, class T, class Compare = less<Key>,
2927 class Allocator = allocator<pair<const Key, T> > >
2930 T template <class Key, class T, class Compare, class Allocator>
2931 bool operator==(const map<Key,T,Compare,Allocator>& x,
2932 const map<Key,T,Compare,Allocator>& y);
2933 T template <class Key, class T, class Compare, class Allocator>
2934 bool operator< (const map<Key,T,Compare,Allocator>& x,
2935 const map<Key,T,Compare,Allocator>& y);
2936 T template <class Key, class T, class Compare, class Allocator>
2937 bool operator!=(const map<Key,T,Compare,Allocator>& x,
2938 const map<Key,T,Compare,Allocator>& y);
2939 T template <class Key, class T, class Compare, class Allocator>
2940 bool operator> (const map<Key,T,Compare,Allocator>& x,
2941 const map<Key,T,Compare,Allocator>& y);
2942 T template <class Key, class T, class Compare, class Allocator>
2943 bool operator>=(const map<Key,T,Compare,Allocator>& x,
2944 const map<Key,T,Compare,Allocator>& y);
2945 T template <class Key, class T, class Compare, class Allocator>
2946 bool operator<=(const map<Key,T,Compare,Allocator>& x,
2947 const map<Key,T,Compare,Allocator>& y);
2948 T template <class Key, class T, class Compare, class Allocator>
2949 void swap(map<Key,T,Compare,Allocator>& x,
2950 map<Key,T,Compare,Allocator>& y);
2951 T template <class Key, class T, class Compare = less<Key>,
2952 class Allocator = allocator<pair<const Key, T> > >
2954 T template <class Key, class T, class Compare, class Allocator>
2955 bool operator==(const multimap<Key,T,Compare,Allocator>& x,
2956 const multimap<Key,T,Compare,Allocator>& y);
2957 T template <class Key, class T, class Compare, class Allocator>
2958 bool operator< (const multimap<Key,T,Compare,Allocator>& x,
2959 const multimap<Key,T,Compare,Allocator>& y);
2960 T template <class Key, class T, class Compare, class Allocator>
2961 bool operator!=(const multimap<Key,T,Compare,Allocator>& x,
2962 const multimap<Key,T,Compare,Allocator>& y);
2963 T template <class Key, class T, class Compare, class Allocator>
2964 bool operator> (const multimap<Key,T,Compare,Allocator>& x,
2965 const multimap<Key,T,Compare,Allocator>& y);
2966 T template <class Key, class T, class Compare, class Allocator>
2967 bool operator>=(const multimap<Key,T,Compare,Allocator>& x,
2968 const multimap<Key,T,Compare,Allocator>& y);
2969 T template <class Key, class T, class Compare, class Allocator>
2970 bool operator<=(const multimap<Key,T,Compare,Allocator>& x,
2971 const multimap<Key,T,Compare,Allocator>& y);
2972 T template <class Key, class T, class Compare, class Allocator>
2973 void swap(multimap<Key,T,Compare,Allocator>& x,
2974 multimap<Key,T,Compare,Allocator>& y);
2977 Header <set> synopsis
2979 template <class Key, class Compare = less<Key>,
2980 class Allocator = allocator<Key> >
2983 T template <class Key, class Compare, class Allocator>
2984 bool operator==(const set<Key,Compare,Allocator>& x,
2985 const set<Key,Compare,Allocator>& y);
2986 T template <class Key, class Compare, class Allocator>
2987 bool operator< (const set<Key,Compare,Allocator>& x,
2988 const set<Key,Compare,Allocator>& y);
2989 T template <class Key, class Compare, class Allocator>
2990 bool operator!=(const set<Key,Compare,Allocator>& x,
2991 const set<Key,Compare,Allocator>& y);
2992 T template <class Key, class Compare, class Allocator>
2993 bool operator> (const set<Key,Compare,Allocator>& x,
2994 const set<Key,Compare,Allocator>& y);
2995 T template <class Key, class Compare, class Allocator>
2996 bool operator>=(const set<Key,Compare,Allocator>& x,
2997 const set<Key,Compare,Allocator>& y);
2998 T template <class Key, class Compare, class Allocator>
2999 bool operator<=(const set<Key,Compare,Allocator>& x,
3000 const set<Key,Compare,Allocator>& y);
3001 T template <class Key, class Compare, class Allocator>
3002 void swap(set<Key,Compare,Allocator>& x,
3003 set<Key,Compare,Allocator>& y);
3004 T template <class Key, class Compare = less<Key>,
3005 class Allocator = allocator<Key> >
3007 T template <class Key, class Compare, class Allocator>
3008 bool operator==(const multiset<Key,Compare,Allocator>& x,
3009 const multiset<Key,Compare,Allocator>& y);
3010 T template <class Key, class Compare, class Allocator>
3011 bool operator< (const multiset<Key,Compare,Allocator>& x,
3012 const multiset<Key,Compare,Allocator>& y);
3013 T template <class Key, class Compare, class Allocator>
3014 bool operator!=(const multiset<Key,Compare,Allocator>& x,
3015 const multiset<Key,Compare,Allocator>& y);
3016 T template <class Key, class Compare, class Allocator>
3017 bool operator> (const multiset<Key,Compare,Allocator>& x,
3018 const multiset<Key,Compare,Allocator>& y);
3019 T template <class Key, class Compare, class Allocator>
3020 bool operator>=(const multiset<Key,Compare,Allocator>& x,
3021 const multiset<Key,Compare,Allocator>& y);
3022 T template <class Key, class Compare, class Allocator>
3023 bool operator<=(const multiset<Key,Compare,Allocator>& x,
3024 const multiset<Key,Compare,Allocator>& y);
3025 T template <class Key, class Compare, class Allocator>
3026 void swap(multiset<Key,Compare,Allocator>& x,
3027 multiset<Key,Compare,Allocator>& y);
3030 23.3.1 Template class map [lib.map]
3032 template <class Key, class T, class Compare = less<Key>,
3033 class Allocator = allocator<pair<const Key, T> > >
3037 T typedef Key key_type;
3038 T typedef T mapped_type;
3039 T typedef pair<const Key, T> value_type;
3040 T typedef Compare key_compare;
3041 T typedef Allocator allocator_type;
3042 T typedef typename Allocator::reference reference;
3043 T typedef typename Allocator::const_reference const_reference;
3044 X typedef implementation defined iterator;
3045 X typedef implementation defined const_iterator;
3046 T typedef implementation defined size_type;
3047 T typedef implementation defined difference_type;
3048 T typedef typename Allocator::pointer pointer;
3049 T typedef typename Allocator::const_pointer const_pointer;
3050 T typedef std::reverse_iterator<iterator> reverse_iterator;
3051 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3052 T class value_compare
3053 : public binary_function<value_type,value_type,bool> {
3057 T value_compare(Compare c) : comp(c) {}
3059 T bool operator()(const value_type& x, const value_type& y) const {
3060 return comp(x.first, y.first);
3064 // _lib.map.cons_ construct/copy/destroy:
3065 T explicit map(const Compare& comp = Compare(),
3066 const Allocator& = Allocator());
3067 T template <class InputIterator>
3068 map(InputIterator first, InputIterator last,
3069 const Compare& comp = Compare(), const Allocator& = Allocator());
3070 T map(const map<Key,T,Compare,Allocator>& x);
3072 T map<Key,T,Compare,Allocator>&
3073 operator=(const map<Key,T,Compare,Allocator>& x);
3076 T const_iterator begin() const;
3078 T const_iterator end() const;
3079 T reverse_iterator rbegin();
3080 T const_reverse_iterator rbegin() const;
3081 T reverse_iterator rend();
3082 T const_reverse_iterator rend() const;
3084 T bool empty() const;
3085 T size_type size() const;
3086 T size_type max_size() const;
3087 // _lib.map.access_ element access:
3088 T T& operator[](const key_type& x);
3090 T pair<iterator, bool> insert(const value_type& x);
3091 T iterator insert(iterator position, const value_type& x);
3092 T template <class InputIterator>
3093 void insert(InputIterator first, InputIterator last);
3094 T void erase(iterator position);
3095 T size_type erase(const key_type& x);
3096 T void erase(iterator first, iterator last);
3097 T void swap(map<Key,T,Compare,Allocator>&);
3100 T key_compare key_comp() const;
3101 T value_compare value_comp() const;
3102 // _lib.map.ops_ map operations:
3103 T iterator find(const key_type& x);
3104 T const_iterator find(const key_type& x) const;
3105 T size_type count(const key_type& x) const;
3106 T iterator lower_bound(const key_type& x);
3107 T const_iterator lower_bound(const key_type& x) const;
3108 T iterator upper_bound(const key_type& x);
3109 T const_iterator upper_bound(const key_type& x) const;
3110 T pair<iterator,iterator>
3111 equal_range(const key_type& x);
3112 T pair<const_iterator,const_iterator>
3113 equal_range(const key_type& x) const;
3116 T template <class Key, class T, class Compare, class Allocator>
3117 bool operator==(const map<Key,T,Compare,Allocator>& x,
3118 const map<Key,T,Compare,Allocator>& y);
3119 T template <class Key, class T, class Compare, class Allocator>
3120 bool operator< (const map<Key,T,Compare,Allocator>& x,
3121 const map<Key,T,Compare,Allocator>& y);
3122 T template <class Key, class T, class Compare, class Allocator>
3123 bool operator!=(const map<Key,T,Compare,Allocator>& x,
3124 const map<Key,T,Compare,Allocator>& y);
3125 T template <class Key, class T, class Compare, class Allocator>
3126 bool operator> (const map<Key,T,Compare,Allocator>& x,
3127 const map<Key,T,Compare,Allocator>& y);
3128 T template <class Key, class T, class Compare, class Allocator>
3129 bool operator>=(const map<Key,T,Compare,Allocator>& x,
3130 const map<Key,T,Compare,Allocator>& y);
3131 T template <class Key, class T, class Compare, class Allocator>
3132 bool operator<=(const map<Key,T,Compare,Allocator>& x,
3133 const map<Key,T,Compare,Allocator>& y);
3134 // specialized algorithms:
3135 T template <class Key, class T, class Compare, class Allocator>
3136 void swap(map<Key,T,Compare,Allocator>& x,
3137 map<Key,T,Compare,Allocator>& y);
3139 23.3.2 Template class multimap [lib.multimap]
3141 template <class Key, class T, class Compare = less<Key>,
3142 class Allocator = allocator<pair<const Key, T> > >
3146 T typedef Key key_type;
3147 T typedef T mapped_type;
3148 T typedef pair<const Key,T> value_type;
3149 T typedef Compare key_compare;
3150 T typedef Allocator allocator_type;
3151 T typedef typename Allocator::reference reference;
3152 T typedef typename Allocator::const_reference const_reference;
3153 X typedef implementation defined iterator;
3154 X typedef implementation defined const_iterator;
3155 T typedef implementation defined size_type;
3156 T typedef implementation defined difference_type
3157 T typedef typename Allocator::pointer pointer;
3158 T typedef typename Allocator::const_pointer const_pointer;
3159 T typedef std::reverse_iterator<iterator> reverse_iterator;
3160 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3161 T class value_compare
3162 : public binary_function<value_type,value_type,bool> {
3163 friend class multimap;
3166 T value_compare(Compare c) : comp(c) {}
3168 T bool operator()(const value_type& x, const value_type& y) const {
3169 return comp(x.first, y.first);
3172 // construct/copy/destroy:
3173 T explicit multimap(const Compare& comp = Compare(),
3174 const Allocator& = Allocator());
3175 T template <class InputIterator>
3176 multimap(InputIterator first, InputIterator last,
3177 const Compare& comp = Compare(),
3178 const Allocator& = Allocator());
3179 T multimap(const multimap<Key,T,Compare,Allocator>& x);
3181 T multimap<Key,T,Compare,Allocator>&
3182 operator=(const multimap<Key,T,Compare,Allocator>& x);
3183 T allocator_type get_allocator() const;
3187 T const_iterator begin() const;
3189 T const_iterator end() const;
3190 T reverse_iterator rbegin();
3191 T const_reverse_iterator rbegin() const;
3192 T reverse_iterator rend();
3193 T const_reverse_iterator rend() const;
3195 T bool empty() const;
3196 T size_type size() const;
3197 T size_type max_size() const;
3199 T iterator insert(const value_type& x);
3200 T iterator insert(iterator position, const value_type& x);
3201 T template <class InputIterator>
3202 void insert(InputIterator first, InputIterator last);
3203 T void erase(iterator position);
3204 T size_type erase(const key_type& x);
3205 T void erase(iterator first, iterator last);
3206 T void swap(multimap<Key,T,Compare,Allocator>&);
3209 T key_compare key_comp() const;
3210 T value_compare value_comp() const;
3212 T iterator find(const key_type& x);
3213 T const_iterator find(const key_type& x) const;
3214 T size_type count(const key_type& x) const;
3215 T iterator lower_bound(const key_type& x);
3216 T const_iterator lower_bound(const key_type& x) const;
3217 T iterator upper_bound(const key_type& x);
3218 T const_iterator upper_bound(const key_type& x) const;
3219 T pair<iterator,iterator> equal_range(const key_type& x);
3220 T pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
3223 T template <class Key, class T, class Compare, class Allocator>
3224 bool operator==(const multimap<Key,T,Compare,Allocator>& x,
3225 const multimap<Key,T,Compare,Allocator>& y);
3226 T template <class Key, class T, class Compare, class Allocator>
3227 bool operator< (const multimap<Key,T,Compare,Allocator>& x,
3228 const multimap<Key,T,Compare,Allocator>& y);
3229 T template <class Key, class T, class Compare, class Allocator>
3230 bool operator!=(const multimap<Key,T,Compare,Allocator>& x,
3231 const multimap<Key,T,Compare,Allocator>& y);
3232 T template <class Key, class T, class Compare, class Allocator>
3233 bool operator> (const multimap<Key,T,Compare,Allocator>& x,
3234 const multimap<Key,T,Compare,Allocator>& y);
3235 T template <class Key, class T, class Compare, class Allocator>
3236 bool operator>=(const multimap<Key,T,Compare,Allocator>& x,
3237 const multimap<Key,T,Compare,Allocator>& y);
3238 T template <class Key, class T, class Compare, class Allocator>
3239 bool operator<=(const multimap<Key,T,Compare,Allocator>& x,
3240 const multimap<Key,T,Compare,Allocator>& y);
3241 // specialized algorithms:
3242 T template <class Key, class T, class Compare, class Allocator>
3243 void swap(multimap<Key,T,Compare,Allocator>& x,
3244 multimap<Key,T,Compare,Allocator>& y);
3247 23.3.3 Template class set [lib.set]
3249 template <class Key, class Compare = less<Key>,
3250 class Allocator = allocator<Key> >
3254 T typedef Key key_type;
3255 T typedef Key value_type;
3256 T typedef Compare key_compare;
3257 T typedef Compare value_compare;
3258 T typedef Allocator allocator_type;
3259 T typedef typename Allocator::reference reference;
3260 T typedef typename Allocator::const_reference const_reference;
3261 X typedef implementation defined iterator;
3262 X typedef implementation defined const_iterator;
3263 T typedef implementation defined size_type;
3264 T typedef implementation defined difference_type;
3265 T typedef typename Allocator::pointer pointer;
3266 T typedef typename Allocator::const_pointer const_pointer;
3267 T typedef std::reverse_iterator<iterator> reverse_iterator;
3268 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3269 // _lib.set.cons_ construct/copy/destroy:
3270 T explicit set(const Compare& comp = Compare(),
3271 const Allocator& = Allocator());
3272 T template <class InputIterator>
3273 set(InputIterator first, InputIterator last,
3274 const Compare& comp = Compare(), const Allocator& = Allocator());
3275 T set(const set<Key,Compare,Allocator>& x);
3277 T set<Key,Compare,Allocator>&
3278 operator=(const set<Key,Compare,Allocator>& x);
3279 T allocator_type get_allocator() const;
3282 T const_iterator begin() const;
3284 T const_iterator end() const;
3285 T reverse_iterator rbegin();
3286 T const_reverse_iterator rbegin() const;
3287 T reverse_iterator rend();
3288 T const_reverse_iterator rend() const;
3290 T bool empty() const;
3291 T size_type size() const;
3292 T size_type max_size() const;
3294 T pair<iterator,bool> insert(const value_type& x);
3295 T iterator insert(iterator position, const value_type& x);
3296 T template <class InputIterator>
3297 T void insert(InputIterator first, InputIterator last);
3298 T void erase(iterator position);
3299 T size_type erase(const key_type& x);
3300 T void erase(iterator first, iterator last);
3301 T void swap(set<Key,Compare,Allocator>&);
3305 T key_compare key_comp() const;
3306 T value_compare value_comp() const;
3308 T iterator find(const key_type& x) const;
3309 T size_type count(const key_type& x) const;
3310 T iterator lower_bound(const key_type& x) const;
3311 T iterator upper_bound(const key_type& x) const;
3312 T pair<iterator,iterator> equal_range(const key_type& x) const;
3314 T template <class Key, class Compare, class Allocator>
3315 bool operator==(const set<Key,Compare,Allocator>& x,
3316 const set<Key,Compare,Allocator>& y);
3317 T template <class Key, class Compare, class Allocator>
3318 bool operator< (const set<Key,Compare,Allocator>& x,
3319 const set<Key,Compare,Allocator>& y);
3320 T template <class Key, class Compare, class Allocator>
3321 bool operator!=(const set<Key,Compare,Allocator>& x,
3322 const set<Key,Compare,Allocator>& y);
3323 T template <class Key, class Compare, class Allocator>
3324 bool operator> (const set<Key,Compare,Allocator>& x,
3325 const set<Key,Compare,Allocator>& y);
3326 T template <class Key, class Compare, class Allocator>
3327 bool operator>=(const set<Key,Compare,Allocator>& x,
3328 const set<Key,Compare,Allocator>& y);
3329 T template <class Key, class Compare, class Allocator>
3330 bool operator<=(const set<Key,Compare,Allocator>& x,
3331 const set<Key,Compare,Allocator>& y);
3332 // specialized algorithms:
3333 T template <class Key, class Compare, class Allocator>
3334 void swap(set<Key,Compare,Allocator>& x,
3335 set<Key,Compare,Allocator>& y);
3337 23.3.4 Template class multiset [lib.multiset]
3339 template <class Key, class Compare = less<Key>,
3340 class Allocator = allocator<Key> >
3344 T typedef Key key_type;
3345 T typedef Key value_type;
3346 T typedef Compare key_compare;
3347 T typedef Compare value_compare;
3348 T typedef Allocator allocator_type;
3349 T typedef typename Allocator::reference reference;
3350 T typedef typename Allocator::const_reference const_reference;
3351 X typedef implementation defined iterator;
3352 X typedef implementation defined const_iterator;
3353 T typedef implementation defined size_type;
3354 T typedef implementation defined difference_type
3355 T typedef typename Allocator::pointer pointer;
3356 T typedef typename Allocator::const_pointer const_pointer;
3357 T typedef std::reverse_iterator<iterator> reverse_iterator;
3358 T typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
3360 // construct/copy/destroy:
3361 T explicit multiset(const Compare& comp = Compare(),
3362 const Allocator& = Allocator());
3363 T template <class InputIterator>
3364 multiset(InputIterator first, InputIterator last,
3365 const Compare& comp = Compare(),
3366 const Allocator& = Allocator());
3367 T multiset(const multiset<Key,Compare,Allocator>& x);
3369 T multiset<Key,Compare,Allocator>&
3370 operator=(const multiset<Key,Compare,Allocator>& x);
3371 T allocator_type get_allocator() const;
3374 T const_iterator begin() const;
3376 T const_iterator end() const;
3377 T reverse_iterator rbegin();
3378 T const_reverse_iterator rbegin() const;
3379 T reverse_iterator rend();
3380 T const_reverse_iterator rend() const;
3382 T bool empty() const;
3383 T size_type size() const;
3384 T size_type max_size() const;
3386 T iterator insert(const value_type& x);
3387 T iterator insert(iterator position, const value_type& x);
3388 T template <class InputIterator>
3389 void insert(InputIterator first, InputIterator last);
3390 T void erase(iterator position);
3391 T size_type erase(const key_type& x);
3392 T void erase(iterator first, iterator last);
3393 T void swap(multiset<Key,Compare,Allocator>&);
3396 T key_compare key_comp() const;
3397 T value_compare value_comp() const;
3399 T iterator find(const key_type& x) const;
3400 T size_type count(const key_type& x) const;
3401 T iterator lower_bound(const key_type& x) const;
3402 T iterator upper_bound(const key_type& x) const;
3403 T pair<iterator,iterator> equal_range(const key_type& x) const;
3406 T template <class Key, class Compare, class Allocator>
3407 bool operator==(const multiset<Key,Compare,Allocator>& x,
3408 const multiset<Key,Compare,Allocator>& y);
3409 T template <class Key, class Compare, class Allocator>
3410 bool operator< (const multiset<Key,Compare,Allocator>& x,
3411 const multiset<Key,Compare,Allocator>& y);
3412 T template <class Key, class Compare, class Allocator>
3413 bool operator!=(const multiset<Key,Compare,Allocator>& x,
3414 const multiset<Key,Compare,Allocator>& y);
3415 T template <class Key, class Compare, class Allocator>
3416 bool operator> (const multiset<Key,Compare,Allocator>& x,
3417 const multiset<Key,Compare,Allocator>& y);
3418 T template <class Key, class Compare, class Allocator>
3419 bool operator>=(const multiset<Key,Compare,Allocator>& x,
3420 const multiset<Key,Compare,Allocator>& y);
3421 T template <class Key, class Compare, class Allocator>
3422 bool operator<=(const multiset<Key,Compare,Allocator>& x,
3423 const multiset<Key,Compare,Allocator>& y);
3424 // specialized algorithms:
3425 T template <class Key, class Compare, class Allocator>
3426 void swap(multiset<Key,Compare,Allocator>& x,
3427 multiset<Key,Compare,Allocator>& y);
3429 23.3.5 Template class bitset [lib.template.bitset]
3431 Header <bitset> synopsis
3434 #include <cstddef> // for size_t
3436 #include <stdexcept> // for invalid_argument,
3437 // out_of_range, overflow_error
3438 #include <iosfwd> // for istream, ostream
3440 X template <size_t N> class bitset;
3441 // _lib.bitset.operators_ bitset operations:
3442 T template <size_t N>
3443 bitset<N> operator&(const bitset<N>&, const bitset<N>&);
3444 T template <size_t N>
3445 bitset<N> operator|(const bitset<N>&, const bitset<N>&);
3446 T template <size_t N>
3447 bitset<N> operator^(const bitset<N>&, const bitset<N>&);
3448 T template <class charT, class traits, size_t N>
3449 basic_istream<charT, traits>&
3450 operator>>(basic_istream<charT, traits>& is, bitset<N>& x);
3451 T template <class charT, class traits, size_t N>
3452 basic_ostream<charT, traits>&
3453 operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x);
3455 X template<size_t N> class bitset {
3459 friend class bitset;
3463 T reference& operator=(bool x); // for b[i] = x;
3464 T reference& operator=(const reference&); // for b[i] = b[j];
3465 T bool operator~() const; // flips the bit
3466 T operator bool() const; // for x = b[i];
3467 T reference& flip(); // for b[i].flip();
3470 // _lib.bitset.cons_ constructors:
3472 T bitset(unsigned long val);
3473 T template<class charT, class traits, class Allocator>
3475 const basic_string<charT,traits,Allocator>& str,
3476 typename basic_string<charT,traits,Allocator>::size_type pos = 0,
3477 typename basic_string<charT,traits,Allocator>::size_type n =
3478 basic_string<charT,traits,Allocator>::npos);
3479 // _lib.bitset.members_ bitset operations:
3480 T bitset<N>& operator&=(const bitset<N>& rhs);
3481 T bitset<N>& operator|=(const bitset<N>& rhs);
3482 T bitset<N>& operator^=(const bitset<N>& rhs);
3483 T bitset<N>& operator<<=(size_t pos);
3484 T bitset<N>& operator>>=(size_t pos);
3486 T bitset<N>& set(size_t pos, int val = true);
3487 T bitset<N>& reset();
3488 T bitset<N>& reset(size_t pos);
3489 T bitset<N> operator~() const;
3490 T bitset<N>& flip();
3491 T bitset<N>& flip(size_t pos);
3493 T reference operator[](size_t pos); // for b[i];
3494 T unsigned long to_ulong() const;
3495 T template <class charT, class traits, class Allocator>
3496 basic_string<charT, traits, Allocator> to_string() const;
3497 T size_t count() const;
3498 T size_t size() const;
3499 T bool operator==(const bitset<N>& rhs) const;
3500 T bool operator!=(const bitset<N>& rhs) const;
3501 T bool test(size_t pos) const;
3503 T bool none() const;
3504 T bitset<N> operator<<(size_t pos) const;
3505 T bitset<N> operator>>(size_t pos) const;
3511 24.2 Header <iterator> synopsis [lib.iterator.synopsis]
3513 // _lib.iterator.primitives_, primitives:
3514 T template<class Iterator> struct iterator_traits;
3515 T template<class T> struct iterator_traits<T*>;
3517 X template<class Category, class T, class Distance = ptrdiff_t,
3518 class Pointer = T*, class Reference = T&> struct iterator;
3519 T struct input_iterator_tag {};
3520 T struct output_iterator_tag {};
3521 T struct forward_iterator_tag: public input_iterator_tag {};
3522 T struct bidirectional_iterator_tag: public forward_iterator_tag {};
3523 T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
3524 // _lib.iterator.operations_, iterator operations:
3525 T template <class InputIterator, class Distance>
3526 void advance(InputIterator& i, Distance n);
3527 T template <class InputIterator>
3528 typename iterator_traits<InputIterator>::difference_type
3529 distance(InputIterator first, InputIterator last);
3530 // _lib.predef.iterators_, predefined iterators:
3531 X template <class Iterator> class reverse_iterator;
3532 T template <class Iterator>
3534 const reverse_iterator<Iterator>& x,
3535 const reverse_iterator<Iterator>& y);
3536 T template <class Iterator>
3538 const reverse_iterator<Iterator>& x,
3539 const reverse_iterator<Iterator>& y);
3540 T template <class Iterator>
3542 const reverse_iterator<Iterator>& x,
3543 const reverse_iterator<Iterator>& y);
3544 T template <class Iterator>
3546 const reverse_iterator<Iterator>& x,
3547 const reverse_iterator<Iterator>& y);
3548 T template <class Iterator>
3550 const reverse_iterator<Iterator>& x,
3551 const reverse_iterator<Iterator>& y);
3552 T template <class Iterator>
3554 const reverse_iterator<Iterator>& x,
3555 const reverse_iterator<Iterator>& y);
3556 T template <class Iterator>
3557 typename reverse_iterator<Iterator>::difference_type operator-(
3558 const reverse_iterator<Iterator>& x,
3559 const reverse_iterator<Iterator>& y);
3560 T template <class Iterator>
3561 reverse_iterator<Iterator>
3563 typename reverse_iterator<Iterator>::difference_type n,
3564 const reverse_iterator<Iterator>& x);
3566 X template <class Container> class back_insert_iterator;
3567 T template <class Container>
3568 back_insert_iterator<Container> back_inserter(Container& x);
3569 X template <class Container> class front_insert_iterator;
3570 T template <class Container>
3571 front_insert_iterator<Container> front_inserter(Container& x);
3572 X template <class Container> class insert_iterator;
3573 T template <class Container, class Iterator>
3574 insert_iterator<Container> inserter(Container& x, Iterator i);
3575 // _lib.stream.iterators_, stream iterators:
3576 X template <class T, class charT = char, class traits = char_traits<charT>,
3577 class Distance = ptrdiff_t>
3578 class istream_iterator;
3579 template <class T, class charT, class traits, class Distance>
3580 X bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
3581 const istream_iterator<T,charT,traits,Distance>& y);
3582 template <class T, class charT, class traits, class Distance>
3583 X bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
3584 const istream_iterator<T,charT,traits,Distance>& y);
3585 X template <class T, class charT = char, class traits = char_traits<charT> >
3586 class ostream_iterator;
3587 X template<class charT, class traits = char_traits<charT> >
3588 class istreambuf_iterator;
3589 X template <class charT, class traits>
3590 bool operator==(const istreambuf_iterator<charT,traits>& a,
3591 const istreambuf_iterator<charT,traits>& b);
3592 X template <class charT, class traits>
3593 bool operator!=(const istreambuf_iterator<charT,traits>& a,
3594 const istreambuf_iterator<charT,traits>& b);
3595 T template <class charT, class traits = char_traits<charT> >
3596 class ostreambuf_iterator;
3598 24.3 Iterator primitives [lib.iterator.primitives]
3600 T template<class Iterator> struct iterator_traits {
3601 T typedef typename Iterator::difference_type difference_type;
3602 T typedef typename Iterator::value_type value_type;
3603 T typedef typename Iterator::pointer pointer;
3604 T typedef typename Iterator::reference reference;
3605 T typedef typename Iterator::iterator_category iterator_category;
3608 T template<class T> struct iterator_traits<T*> {
3609 T typedef ptrdiff_t difference_type;
3610 T typedef T value_type;
3611 T typedef T* pointer;
3612 T typedef T& reference;
3613 T typedef random_access_iterator_tag iterator_category;
3616 T template<class T> struct iterator_traits<const T*> {
3617 T typedef ptrdiff_t difference_type;
3618 T typedef T value_type;
3619 T typedef const T* pointer;
3620 T typedef const T& reference;
3621 T typedef random_access_iterator_tag iterator_category;
3624 24.3.2 Basic iterator [lib.iterator.basic]
3626 template<class Category, class T, class Distance = ptrdiff_t,
3627 class Pointer = T*, class Reference = T&>
3629 T typedef T value_type;
3630 T typedef Distance difference_type;
3631 T typedef Pointer pointer;
3632 T typedef Reference reference;
3633 T typedef Category iterator_category;
3636 24.3.3 Standard iterator tags [lib.std.iterator.tags]
3638 T struct input_iterator_tag {};
3639 T struct output_iterator_tag {};
3640 T struct forward_iterator_tag: public input_iterator_tag {};
3641 T struct bidirectional_iterator_tag: public forward_iterator_tag {};
3642 T struct random_access_iterator_tag: public bidirectional_iterator_tag {};
3645 24.4.1 Reverse iterators [lib.reverse.iterators]
3647 template <class Iterator>
3648 X class reverse_iterator : public
3649 iterator<typename iterator_traits<Iterator>::iterator_category,
3650 typename iterator_traits<Iterator>::value_type,
3651 typename iterator_traits<Iterator>::difference_type,
3652 typename iterator_traits<Iterator>::pointer,
3653 typename iterator_traits<Iterator>::reference> {
3659 T typedef typename iterator_traits<Iterator>::difference_type
3661 T typedef typename iterator_traits<Iterator>::reference
3663 T typedef typename iterator_traits<Iterator>::pointer
3666 T reverse_iterator();
3667 T explicit reverse_iterator(Iterator x);
3668 T template <class U> reverse_iterator(const reverse_iterator<U>& u);
3669 T Iterator base() const; // explicit
3670 T reference operator*() const;
3671 T pointer operator->() const;
3672 T reverse_iterator& operator++();
3673 T reverse_iterator operator++(int);
3674 T reverse_iterator& operator--();
3675 T reverse_iterator operator--(int);
3677 T reverse_iterator operator+ (difference_type n) const;
3678 T reverse_iterator& operator+=(difference_type n);
3679 T reverse_iterator operator- (difference_type n) const;
3680 T reverse_iterator& operator-=(difference_type n);
3681 T reference operator[](difference_type n) const;
3683 T template <class Iterator>
3685 const reverse_iterator<Iterator>& x,
3686 const reverse_iterator<Iterator>& y);
3687 T template <class Iterator>
3689 const reverse_iterator<Iterator>& x,
3690 const reverse_iterator<Iterator>& y);
3691 T template <class Iterator>
3693 const reverse_iterator<Iterator>& x,
3694 const reverse_iterator<Iterator>& y);
3695 T template <class Iterator>
3697 const reverse_iterator<Iterator>& x,
3698 const reverse_iterator<Iterator>& y);
3699 T template <class Iterator>
3701 const reverse_iterator<Iterator>& x,
3702 const reverse_iterator<Iterator>& y);
3703 T template <class Iterator>
3705 const reverse_iterator<Iterator>& x,
3706 const reverse_iterator<Iterator>& y);
3707 T template <class Iterator>
3708 typename reverse_iterator<Iterator>::difference_type operator-(
3709 const reverse_iterator<Iterator>& x,
3710 const reverse_iterator<Iterator>& y);
3711 T template <class Iterator>
3712 reverse_iterator<Iterator> operator+(
3713 typename reverse_iterator<Iterator>::difference_type n,
3714 const reverse_iterator<Iterator>& x);
3717 24.4.2.1 Template class [lib.back.insert.iterator]
3718 back_insert_iterator
3720 template <class Container>
3721 X class back_insert_iterator :
3722 public iterator<output_iterator_tag,void,void,void,void> {
3724 T Container* container;
3726 T typedef Container container_type;
3727 T explicit back_insert_iterator(Container& x);
3728 T back_insert_iterator<Container>&
3729 operator=(typename Container::const_reference value);
3731 T back_insert_iterator<Container>& operator*();
3732 T back_insert_iterator<Container>& operator++();
3733 T back_insert_iterator<Container> operator++(int);
3735 T template <class Container>
3736 back_insert_iterator<Container> back_inserter(Container& x);
3740 24.4.2.3 Template class [lib.front.insert.iterator]
3741 front_insert_iterator
3743 template <class Container>
3744 X class front_insert_iterator :
3745 public iterator<output_iterator_tag,void,void,void,void> {
3747 T Container* container;
3749 T typedef Container container_type;
3750 T explicit front_insert_iterator(Container& x);
3751 T front_insert_iterator<Container>&
3752 operator=(typename Container::const_reference value);
3753 T front_insert_iterator<Container>& operator*();
3754 T front_insert_iterator<Container>& operator++();
3755 T front_insert_iterator<Container> operator++(int);
3757 T template <class Container>
3758 front_insert_iterator<Container> front_inserter(Container& x);
3761 24.4.2.5 Template class insert_iterator [lib.insert.iterator]
3763 template <class Container>
3764 X class insert_iterator :
3765 public iterator<output_iterator_tag,void,void,void,void> {
3767 T Container* container;
3768 T typename Container::iterator iter;
3770 T typedef Container container_type;
3771 T insert_iterator(Container& x, typename Container::iterator i);
3772 T insert_iterator<Container>&
3773 operator=(typename Container::const_reference value);
3774 T insert_iterator<Container>& operator*();
3775 T insert_iterator<Container>& operator++();
3776 T insert_iterator<Container>& operator++(int);
3778 T template <class Container, class Iterator>
3779 insert_iterator<Container> inserter(Container& x, Iterator i);
3781 24.5.1 Template class istream_iterator [lib.istream.iterator]
3783 template <class T, class charT = char, class traits = char_traits<charT>,
3784 class Distance = ptrdiff_t>
3785 X class istream_iterator:
3786 public iterator<input_iterator_tag, T, Distance, const T*, const T&> {
3788 T typedef charT char_type
3789 T typedef traits traits_type;
3790 T typedef basic_istream<charT,traits> istream_type;
3791 T istream_iterator();
3792 T istream_iterator(istream_type& s);
3793 T istream_iterator(const istream_iterator<T,charT,traits,Distance>& x);
3794 T ~istream_iterator();
3796 T const T& operator*() const;
3797 T const T* operator->() const;
3798 T istream_iterator<T,charT,traits,Distance>& operator++();
3799 T istream_iterator<T,charT,traits,Distance> operator++(int);
3802 T template <class T, class charT, class traits, class Distance>
3803 bool operator==(const istream_iterator<T,charT,traits,Distance>& x,
3804 const istream_iterator<T,charT,traits,Distance>& y);
3805 T template <class T, class charT, class traits, class Distance>
3806 bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
3807 const istream_iterator<T,charT,traits,Distance>& y);
3810 24.5.2 Template class ostream_iterator [lib.ostream.iterator]
3812 template <class T, class charT = char, class traits = char_traits<charT> >
3813 X class ostream_iterator:
3814 public iterator<output_iterator_tag, void, void, void, void> {
3816 T typedef charT char_type;
3817 T typedef traits traits_type;
3818 T typedef basic_ostream<charT,traits> ostream_type;
3819 T ostream_iterator(ostream_type& s);
3820 T ostream_iterator(ostream_type& s, const charT* delimiter);
3821 T ostream_iterator(const ostream_iterator<T,charT,traits>& x);
3822 T ~ostream_iterator();
3823 T ostream_iterator<T,charT,traits>& operator=(const T& value);
3825 T ostream_iterator<T,charT,traits>& operator*();
3826 T ostream_iterator<T,charT,traits>& operator++();
3827 T ostream_iterator<T,charT,traits>& operator++(int);
3831 24.5.3 Template class [lib.istreambuf.iterator]
3834 template<class charT, class traits = char_traits<charT> >
3835 X class istreambuf_iterator
3836 : public iterator<input_iterator_tag, charT,
3837 typename traits::off_type, charT*, charT&> {
3839 T typedef charT char_type;
3840 T typedef traits traits_type;
3841 T typedef typename traits::int_type int_type;
3842 T typedef basic_streambuf<charT,traits> streambuf_type;
3843 T typedef basic_istream<charT,traits> istream_type;
3844 T class proxy; // exposition only
3845 T istreambuf_iterator() throw();
3846 T istreambuf_iterator(istream_type& s) throw();
3847 T istreambuf_iterator(streambuf_type* s) throw();
3848 T istreambuf_iterator(const proxy& p) throw();
3849 T charT operator*() const;
3850 T istreambuf_iterator<charT,traits>& operator++();
3851 T proxy operator++(int);
3852 X bool equal(istreambuf_iterator& b);
3855 T template <class charT, class traits>
3856 bool operator==(const istreambuf_iterator<charT,traits>& a,
3857 const istreambuf_iterator<charT,traits>& b);
3859 T template <class charT, class traits>
3860 bool operator!=(const istreambuf_iterator<charT,traits>& a,
3861 const istreambuf_iterator<charT,traits>& b);
3863 24.5.3.1 Template class [lib.istreambuf.iterator::proxy]
3864 istreambuf_iterator::proxy
3866 template <class charT, class traits = char_traits<charT> >
3867 T class istreambuf_iterator<charT, traits>::proxy
3870 T basic_streambuf<charT,traits>* sbuf_;
3872 basic_streambuf<charT,traits>* sbuf);
3873 : keep_(c), sbuf_(sbuf) {}
3875 T charT operator*() { return keep_; }
3880 24.5.4 Template class [lib.ostreambuf.iterator]
3883 template <class charT, class traits = char_traits<charT> >
3884 T class ostreambuf_iterator:
3885 public iterator<output_iterator_tag, void, void, void, void> {
3887 T typedef charT char_type;
3888 T typedef traits traits_type;
3889 T typedef basic_streambuf<charT,traits> streambuf_type;
3890 T typedef basic_ostream<charT,traits> ostream_type;
3892 T ostreambuf_iterator(ostream_type& s) throw();
3893 T ostreambuf_iterator(streambuf_type* s) throw();
3894 T ostreambuf_iterator& operator=(charT c);
3895 T ostreambuf_iterator& operator*();
3896 T ostreambuf_iterator& operator++();
3897 T ostreambuf_iterator& operator++(int);
3898 T bool failed() const throw();
3902 Header <algorithm> synopsis
3905 // _lib.alg.nonmodifying_, non-modifying sequence operations:
3906 T template<class InputIterator, class Function>
3907 Function for_each(InputIterator first, InputIterator last, Function f);
3908 T template<class InputIterator, class T>
3909 InputIterator find(InputIterator first, InputIterator last,
3911 T template<class InputIterator, class Predicate>
3912 InputIterator find_if(InputIterator first, InputIterator last,
3914 T template<class ForwardIterator1, class ForwardIterator2>
3916 find_end(ForwardIterator1 first1, ForwardIterator1 last1,
3917 ForwardIterator2 first2, ForwardIterator2 last2);
3918 T template<class ForwardIterator1, class ForwardIterator2,
3919 class BinaryPredicate>
3921 find_end(ForwardIterator1 first1, ForwardIterator1 last1,
3922 ForwardIterator2 first2, ForwardIterator2 last2,
3923 BinaryPredicate pred);
3924 T template<class ForwardIterator1, class ForwardIterator2>
3926 find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
3927 ForwardIterator2 first2, ForwardIterator2 last2);
3928 T template<class ForwardIterator1, class ForwardIterator2,
3929 class BinaryPredicate>
3931 find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
3932 ForwardIterator2 first2, ForwardIterator2 last2,
3933 BinaryPredicate pred);
3934 T template<class ForwardIterator>
3935 ForwardIterator adjacent_find(ForwardIterator first,
3936 ForwardIterator last);
3937 T template<class ForwardIterator, class BinaryPredicate>
3938 ForwardIterator adjacent_find(ForwardIterator first,
3939 ForwardIterator last, BinaryPredicate pred);
3940 T template<class InputIterator, class T>
3941 typename iterator_traits<InputIterator>::difference_type
3942 count(InputIterator first, InputIterator last, const T& value);
3943 T template<class InputIterator, class Predicate>
3944 typename iterator_traits<InputIterator>::difference_type
3945 count_if(InputIterator first, InputIterator last, Predicate pred);
3946 T template<class InputIterator1, class InputIterator2>
3947 pair<InputIterator1, InputIterator2>
3948 mismatch(InputIterator1 first1, InputIterator1 last1,
3949 InputIterator2 first2);
3950 T template<class InputIterator1, class InputIterator2, class BinaryPredicate>
3951 pair<InputIterator1, InputIterator2>
3952 mismatch(InputIterator1 first1, InputIterator1 last1,
3953 InputIterator2 first2, BinaryPredicate pred);
3955 T template<class InputIterator1, class InputIterator2>
3956 bool equal(InputIterator1 first1, InputIterator1 last1,
3957 InputIterator2 first2);
3958 T template<class InputIterator1, class InputIterator2, class BinaryPredicate>
3959 bool equal(InputIterator1 first1, InputIterator1 last1,
3960 InputIterator2 first2, BinaryPredicate pred);
3961 T template<class ForwardIterator1, class ForwardIterator2>
3962 ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
3963 ForwardIterator2 first2, ForwardIterator2 last2);
3964 T template<class ForwardIterator1, class ForwardIterator2,
3965 class BinaryPredicate>
3966 ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
3967 ForwardIterator2 first2, ForwardIterator2 last2,
3968 BinaryPredicate pred);
3969 T template<class ForwardIterator, class Size, class T>
3970 ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
3971 Size count, const T& value);
3972 T template<class ForwardIterator, class Size, class T, class BinaryPredicate>
3973 ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
3974 Size count, const T& value,
3975 BinaryPredicate pred);
3976 // _lib.alg.modifying.operations_, modifying sequence operations:
3977 // _lib.alg.copy_, copy:
3978 T template<class InputIterator, class OutputIterator>
3979 OutputIterator copy(InputIterator first, InputIterator last,
3980 OutputIterator result);
3981 T template<class BidirectionalIterator1, class BidirectionalIterator2>
3982 BidirectionalIterator2
3983 copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
3984 BidirectionalIterator2 result);
3985 // _lib.alg.swap_, swap:
3986 T template<class T> void swap(T& a, T& b);
3987 T template<class ForwardIterator1, class ForwardIterator2>
3988 ForwardIterator2 swap_ranges(ForwardIterator1 first1,
3989 ForwardIterator1 last1, ForwardIterator2 first2);
3990 T template<class ForwardIterator1, class ForwardIterator2>
3991 void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
3992 T template<class InputIterator, class OutputIterator, class UnaryOperation>
3993 OutputIterator transform(InputIterator first, InputIterator last,
3994 OutputIterator result, UnaryOperation op);
3995 T template<class InputIterator1, class InputIterator2, class OutputIterator,
3996 class BinaryOperation>
3997 OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
3998 InputIterator2 first2, OutputIterator result,
3999 BinaryOperation binary_op);
4001 T template<class ForwardIterator, class T>
4002 void replace(ForwardIterator first, ForwardIterator last,
4003 const T& old_value, const T& new_value);
4004 T template<class ForwardIterator, class Predicate, class T>
4005 void replace_if(ForwardIterator first, ForwardIterator last,
4006 Predicate pred, const T& new_value);
4007 T template<class InputIterator, class OutputIterator, class T>
4008 OutputIterator replace_copy(InputIterator first, InputIterator last,
4009 OutputIterator result,
4010 const T& old_value, const T& new_value);
4011 T template<class Iterator, class OutputIterator, class Predicate, class T>
4012 OutputIterator replace_copy_if(Iterator first, Iterator last,
4013 OutputIterator result,
4014 Predicate pred, const T& new_value);
4015 T template<class ForwardIterator, class T>
4016 void fill(ForwardIterator first, ForwardIterator last, const T& value);
4017 T template<class OutputIterator, class Size, class T>
4018 void fill_n(OutputIterator first, Size n, const T& value);
4019 T template<class ForwardIterator, class Generator>
4020 void generate(ForwardIterator first, ForwardIterator last, Generator gen);
4021 T template<class OutputIterator, class Size, class Generator>
4022 void generate_n(OutputIterator first, Size n, Generator gen);
4023 T template<class ForwardIterator, class T>
4024 ForwardIterator remove(ForwardIterator first, ForwardIterator last,
4026 T template<class ForwardIterator, class Predicate>
4027 ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
4029 T template<class InputIterator, class OutputIterator, class T>
4030 OutputIterator remove_copy(InputIterator first, InputIterator last,
4031 OutputIterator result, const T& value);
4032 T template<class InputIterator, class OutputIterator, class Predicate>
4033 OutputIterator remove_copy_if(InputIterator first, InputIterator last,
4034 OutputIterator result, Predicate pred);
4035 T template<class ForwardIterator>
4036 ForwardIterator unique(ForwardIterator first, ForwardIterator last);
4037 T template<class ForwardIterator, class BinaryPredicate>
4038 ForwardIterator unique(ForwardIterator first, ForwardIterator last,
4039 BinaryPredicate pred);
4040 T template<class InputIterator, class OutputIterator>
4041 OutputIterator unique_copy(InputIterator first, InputIterator last,
4042 OutputIterator result);
4043 T template<class InputIterator, class OutputIterator, class BinaryPredicate>
4044 OutputIterator unique_copy(InputIterator first, InputIterator last,
4045 OutputIterator result, BinaryPredicate pred);
4046 T template<class BidirectionalIterator>
4047 void reverse(BidirectionalIterator first, BidirectionalIterator last);
4048 T template<class BidirectionalIterator, class OutputIterator>
4049 OutputIterator reverse_copy(BidirectionalIterator first,
4050 BidirectionalIterator last,
4051 OutputIterator result);
4053 T template<class ForwardIterator>
4054 void rotate(ForwardIterator first, ForwardIterator middle,
4055 ForwardIterator last);
4056 T template<class ForwardIterator, class OutputIterator>
4057 OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,
4058 ForwardIterator last, OutputIterator result);
4059 T template<class RandomAccessIterator>
4060 void random_shuffle(RandomAccessIterator first,
4061 RandomAccessIterator last);
4062 T template<class RandomAccessIterator, class RandomNumberGenerator>
4063 void random_shuffle(RandomAccessIterator first,
4064 RandomAccessIterator last,
4065 RandomNumberGenerator& rand);
4066 // _lib.alg.partitions_, partitions:
4067 T template<class BidirectionalIterator, class Predicate>
4068 BidirectionalIterator partition(BidirectionalIterator first,
4069 BidirectionalIterator last,
4071 T template<class BidirectionalIterator, class Predicate>
4072 BidirectionalIterator stable_partition(BidirectionalIterator first,
4073 BidirectionalIterator last,
4075 // _lib.alg.sorting_, sorting and related operations:
4076 // _lib.alg.sort_, sorting:
4077 T template<class RandomAccessIterator>
4078 void sort(RandomAccessIterator first, RandomAccessIterator last);
4079 T template<class RandomAccessIterator, class Compare>
4080 void sort(RandomAccessIterator first, RandomAccessIterator last,
4082 T template<class RandomAccessIterator>
4083 void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
4084 T template<class RandomAccessIterator, class Compare>
4085 void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
4087 T template<class RandomAccessIterator>
4088 void partial_sort(RandomAccessIterator first,
4089 RandomAccessIterator middle,
4090 RandomAccessIterator last);
4091 T template<class RandomAccessIterator, class Compare>
4092 void partial_sort(RandomAccessIterator first,
4093 RandomAccessIterator middle,
4094 RandomAccessIterator last, Compare comp);
4095 T template<class InputIterator, class RandomAccessIterator>
4096 RandomAccessIterator
4097 partial_sort_copy(InputIterator first, InputIterator last,
4098 RandomAccessIterator result_first,
4099 RandomAccessIterator result_last);
4100 T template<class InputIterator, class RandomAccessIterator, class Compare>
4101 RandomAccessIterator
4102 partial_sort_copy(InputIterator first, InputIterator last,
4103 RandomAccessIterator result_first,
4104 RandomAccessIterator result_last,
4107 T template<class RandomAccessIterator>
4108 void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
4109 RandomAccessIterator last);
4110 T template<class RandomAccessIterator, class Compare>
4111 void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
4112 RandomAccessIterator last, Compare comp);
4113 // _lib.alg.binary.search_, binary search:
4114 T template<class ForwardIterator, class T>
4115 ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
4117 T template<class ForwardIterator, class T, class Compare>
4118 ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
4119 const T& value, Compare comp);
4120 T template<class ForwardIterator, class T>
4121 ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
4123 T template<class ForwardIterator, class T, class Compare>
4124 ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
4125 const T& value, Compare comp);
4126 T template<class ForwardIterator, class T>
4127 pair<ForwardIterator, ForwardIterator>
4128 equal_range(ForwardIterator first, ForwardIterator last,
4130 T template<class ForwardIterator, class T, class Compare>
4131 pair<ForwardIterator, ForwardIterator>
4132 equal_range(ForwardIterator first, ForwardIterator last,
4133 const T& value, Compare comp);
4134 T template<class ForwardIterator, class T>
4135 bool binary_search(ForwardIterator first, ForwardIterator last,
4137 T template<class ForwardIterator, class T, class Compare>
4138 bool binary_search(ForwardIterator first, ForwardIterator last,
4139 const T& value, Compare comp);
4140 // _lib.alg.merge_, merge:
4141 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4142 OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
4143 InputIterator2 first2, InputIterator2 last2,
4144 OutputIterator result);
4145 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4147 OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
4148 InputIterator2 first2, InputIterator2 last2,
4149 OutputIterator result, Compare comp);
4150 T template<class BidirectionalIterator>
4151 void inplace_merge(BidirectionalIterator first,
4152 BidirectionalIterator middle,
4153 BidirectionalIterator last);
4154 T template<class BidirectionalIterator, class Compare>
4155 void inplace_merge(BidirectionalIterator first,
4156 BidirectionalIterator middle,
4157 BidirectionalIterator last, Compare comp);
4159 // _lib.alg.set.operations_, set operations:
4160 T template<class InputIterator1, class InputIterator2>
4161 bool includes(InputIterator1 first1, InputIterator1 last1,
4162 InputIterator2 first2, InputIterator2 last2);
4163 T template<class InputIterator1, class InputIterator2, class Compare>
4164 bool includes(InputIterator1 first1, InputIterator1 last1,
4165 InputIterator2 first2, InputIterator2 last2, Compare comp);
4166 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4167 OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
4168 InputIterator2 first2, InputIterator2 last2,
4169 OutputIterator result);
4170 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4172 OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
4173 InputIterator2 first2, InputIterator2 last2,
4174 OutputIterator result, Compare comp);
4175 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4176 OutputIterator set_intersection
4177 (InputIterator1 first1, InputIterator1 last1,
4178 InputIterator2 first2, InputIterator2 last2,
4179 OutputIterator result);
4180 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4182 OutputIterator set_intersection
4183 (InputIterator1 first1, InputIterator1 last1,
4184 InputIterator2 first2, InputIterator2 last2,
4185 OutputIterator result, Compare comp);
4186 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4187 OutputIterator set_difference
4188 (InputIterator1 first1, InputIterator1 last1,
4189 InputIterator2 first2, InputIterator2 last2,
4190 OutputIterator result);
4191 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4193 OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,
4194 InputIterator2 first2, InputIterator2 last2,
4195 OutputIterator result, Compare comp);
4196 T template<class InputIterator1, class InputIterator2, class OutputIterator>
4198 set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
4199 InputIterator2 first2, InputIterator2 last2,
4200 OutputIterator result);
4201 T template<class InputIterator1, class InputIterator2, class OutputIterator,
4204 set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
4205 InputIterator2 first2, InputIterator2 last2,
4206 OutputIterator result, Compare comp);
4207 // _lib.alg.heap.operations_, heap operations:
4208 T template<class RandomAccessIterator>
4209 void push_heap(RandomAccessIterator first, RandomAccessIterator last);
4210 T template<class RandomAccessIterator, class Compare>
4211 void push_heap(RandomAccessIterator first, RandomAccessIterator last,
4214 T template<class RandomAccessIterator>
4215 void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
4216 T template<class RandomAccessIterator, class Compare>
4217 void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
4219 T template<class RandomAccessIterator>
4220 void make_heap(RandomAccessIterator first, RandomAccessIterator last);
4221 T template<class RandomAccessIterator, class Compare>
4222 void make_heap(RandomAccessIterator first, RandomAccessIterator last,
4224 T template<class RandomAccessIterator>
4225 void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
4226 T template<class RandomAccessIterator, class Compare>
4227 void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
4229 // _lib.alg.min.max_, minimum and maximum:
4230 T template<class T> const T& min(const T& a, const T& b);
4231 T template<class T, class Compare>
4232 const T& min(const T& a, const T& b, Compare comp);
4233 T template<class T> const T& max(const T& a, const T& b);
4234 T template<class T, class Compare>
4235 const T& max(const T& a, const T& b, Compare comp);
4236 T template<class ForwardIterator>
4237 ForwardIterator min_element(ForwardIterator first, ForwardIterator last);
4238 T template<class ForwardIterator, class Compare>
4239 ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
4241 T template<class ForwardIterator>
4242 ForwardIterator max_element(ForwardIterator first, ForwardIterator last);
4243 T template<class ForwardIterator, class Compare>
4244 ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
4246 T template<class InputIterator1, class InputIterator2>
4247 bool lexicographical_compare
4248 (InputIterator1 first1, InputIterator1 last1,
4249 InputIterator2 first2, InputIterator2 last2);
4250 T template<class InputIterator1, class InputIterator2, class Compare>
4251 bool lexicographical_compare
4252 (InputIterator1 first1, InputIterator1 last1,
4253 InputIterator2 first2, InputIterator2 last2,
4256 // _lib.alg.permutation.generators_, permutations
4257 T template<class BidirectionalIterator>
4258 bool next_permutation(BidirectionalIterator first,
4259 BidirectionalIterator last);
4260 T template<class BidirectionalIterator, class Compare>
4261 bool next_permutation(BidirectionalIterator first,
4262 BidirectionalIterator last, Compare comp);
4263 T template<class BidirectionalIterator>
4264 bool prev_permutation(BidirectionalIterator first,
4265 BidirectionalIterator last);
4266 T template<class BidirectionalIterator, class Compare>
4267 bool prev_permutation(BidirectionalIterator first,
4268 BidirectionalIterator last, Compare comp);
4271 25.4 C library algorithms [lib.alg.c.library]
4273 1 Header <cstdlib> (partial, Table 2):
4275 Table 2--Header <cstdlib> synopsis
4277 Functions: bsearch qsort
4280 X extern "C" void *bsearch(const void *key, const void *base,
4281 size_t nmemb, size_t size,
4282 int (*compar)(const void *, const void *));
4283 X extern "C++" void *bsearch(const void *key, const void *base,
4284 size_t nmemb, size_t size,
4285 int (*compar)(const void *, const void *));
4287 X extern "C" void qsort(void* base, size_t nmemb, size_t size,
4288 int (*compar)(const void*, const void*));
4289 X extern "C++" void qsort(void* base, size_t nmemb, size_t size,
4290 int (*compar)(const void*, const void*));
4294 26.2 Complex numbers [lib.complex.numbers]
4297 26.2.1 Header <complex> synopsis [lib.complex.synopsis]
4299 T template<class T> class complex;
4300 T template<> class complex<float>;
4301 T template<> class complex<double>;
4302 T template<> class complex<long double>;
4303 // _lib.complex.ops_ operators:
4305 complex<T> operator+(const complex<T>&, const complex<T>&);
4306 T template<class T> complex<T> operator+(const complex<T>&, const T&);
4307 T template<class T> complex<T> operator+(const T&, const complex<T>&);
4308 T template<class T> complex<T> operator-
4309 (const complex<T>&, const complex<T>&);
4310 T template<class T> complex<T> operator-(const complex<T>&, const T&);
4311 T template<class T> complex<T> operator-(const T&, const complex<T>&);
4312 T template<class T> complex<T> operator*
4313 (const complex<T>&, const complex<T>&);
4314 T template<class T> complex<T> operator*(const complex<T>&, const T&);
4315 T template<class T> complex<T> operator*(const T&, const complex<T>&);
4316 T template<class T> complex<T> operator/
4317 (const complex<T>&, const complex<T>&);
4318 T template<class T> complex<T> operator/(const complex<T>&, const T&);
4319 T template<class T> complex<T> operator/(const T&, const complex<T>&);
4320 T template<class T> complex<T> operator+(const complex<T>&);
4321 T template<class T> complex<T> operator-(const complex<T>&);
4322 T template<class T> bool operator==
4323 (const complex<T>&, const complex<T>&);
4324 T template<class T> bool operator==(const complex<T>&, const T&);
4325 T template<class T> bool operator==(const T&, const complex<T>&);
4326 T template<class T> bool operator!=(const complex<T>&, const complex<T>&);
4327 T template<class T> bool operator!=(const complex<T>&, const T&);
4328 T template<class T> bool operator!=(const T&, const complex<T>&);
4329 T template<class T, class charT, class traits>
4330 basic_istream<charT, traits>&
4331 operator>>(basic_istream<charT, traits>&, complex<T>&);
4333 T template<class T, class charT, class traits>
4334 basic_ostream<charT, traits>&
4335 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
4336 // _lib.complex.value.ops_ values:
4337 T template<class T> T real(const complex<T>&);
4338 T template<class T> T imag(const complex<T>&);
4340 T template<class T> T abs(const complex<T>&);
4341 T template<class T> T arg(const complex<T>&);
4342 T template<class T> T norm(const complex<T>&);
4343 T template<class T> complex<T> conj(const complex<T>&);
4344 T template<class T> complex<T> polar(const T&, const T&);
4345 // _lib.complex.transcendentals_ transcendentals:
4346 T template<class T> complex<T> cos (const complex<T>&);
4347 T template<class T> complex<T> cosh (const complex<T>&);
4348 T template<class T> complex<T> exp (const complex<T>&);
4349 T template<class T> complex<T> log (const complex<T>&);
4350 T template<class T> complex<T> log10(const complex<T>&);
4351 T template<class T> complex<T> pow(const complex<T>&, int);
4352 T template<class T> complex<T> pow(const complex<T>&, const T&);
4353 T template<class T> complex<T> pow(const complex<T>&, const complex<T>&);
4354 T template<class T> complex<T> pow(const T&, const complex<T>&);
4355 T template<class T> complex<T> sin (const complex<T>&);
4356 T template<class T> complex<T> sinh (const complex<T>&);
4357 T template<class T> complex<T> sqrt (const complex<T>&);
4358 T template<class T> complex<T> tan (const complex<T>&);
4359 T template<class T> complex<T> tanh (const complex<T>&);
4362 26.2.2 Template class complex [lib.complex]
4367 T typedef T value_type;
4369 T complex(const T& re = T(), const T& im = T());
4370 T complex(const complex&);
4371 T template<class X> complex(const complex<X>&);
4376 T complex<T>& operator= (const T&);
4377 T complex<T>& operator+=(const T&);
4378 T complex<T>& operator-=(const T&);
4379 T complex<T>& operator*=(const T&);
4380 T complex<T>& operator/=(const T&);
4382 T complex& operator=(const complex&);
4383 T template<class X> complex<T>& operator= (const complex<X>&);
4384 T template<class X> complex<T>& operator+=(const complex<X>&);
4385 T template<class X> complex<T>& operator-=(const complex<X>&);
4386 T template<class X> complex<T>& operator*=(const complex<X>&);
4387 T template<class X> complex<T>& operator/=(const complex<X>&);
4390 T template<class T> complex<T> operator+
4391 (const complex<T>&, const complex<T>&);
4392 T template<class T> complex<T> operator+(const complex<T>&, const T&);
4393 T template<class T> complex<T> operator+(const T&, const complex<T>&);
4395 T template<class T> complex<T> operator-
4396 (const complex<T>&, const complex<T>&);
4397 T template<class T> complex<T> operator-(const complex<T>&, const T&);
4398 T template<class T> complex<T> operator-(const T&, const complex<T>&);
4400 T template<class T> complex<T> operator*
4401 (const complex<T>&, const complex<T>&);
4402 T template<class T> complex<T> operator*(const complex<T>&, const T&);
4403 T template<class T> complex<T> operator*(const T&, const complex<T>&);
4405 T template<class T> complex<T> operator/
4406 (const complex<T>&, const complex<T>&);
4407 T template<class T> complex<T> operator/(const complex<T>&, const T&);
4408 T template<class T> complex<T> operator/(const T&, const complex<T>&);
4410 T template<class T> complex<T> operator+(const complex<T>&);
4411 T template<class T> complex<T> operator-(const complex<T>&);
4413 T template<class T> bool operator==(const complex<T>&, const complex<T>&);
4414 T template<class T> bool operator==(const complex<T>&, const T&);
4415 T template<class T> bool operator==(const T&, const complex<T>&);
4417 T template<class T> bool operator!=(const complex<T>&, const complex<T>&);
4418 T template<class T> bool operator!=(const complex<T>&, const T&);
4419 T template<class T> bool operator!=(const T&, const complex<T>&);
4421 T template<class T, class charT, class traits>
4422 basic_istream<charT, traits>&
4423 operator>>(basic_istream<charT, traits>&, complex<T>&);
4425 T template<class T, class charT, class traits>
4426 basic_ostream<charT, traits>&
4427 operator<<(basic_ostream<charT, traits>&, const complex<T>&);
4430 26.2.3 complex specializations [lib.complex.special]
4432 T template<> class complex<float> {
4434 T typedef float value_type;
4436 T complex(float re = 0.0f, float im = 0.0f);
4437 T explicit complex(const complex<double>&);
4438 T explicit complex(const complex<long double>&);
4439 T float real() const;
4440 T float imag() const;
4442 T complex<float>& operator= (float);
4443 T complex<float>& operator+=(float);
4444 T complex<float>& operator-=(float);
4445 T complex<float>& operator*=(float);
4446 T complex<float>& operator/=(float);
4448 T complex<float>& operator=(const complex<float>&);
4449 T template<class X> complex<float>& operator= (const complex<X>&);
4450 T template<class X> complex<float>& operator+=(const complex<X>&);
4451 T template<class X> complex<float>& operator-=(const complex<X>&);
4452 T template<class X> complex<float>& operator*=(const complex<X>&);
4453 T template<class X> complex<float>& operator/=(const complex<X>&);
4455 T template<> class complex<double> {
4457 T typedef double value_type;
4459 T complex(double re = 0.0, double im = 0.0);
4460 T complex(const complex<float>&);
4461 T explicit complex(const complex<long double>&);
4462 T double real() const;
4463 T double imag() const;
4465 T complex<double>& operator= (double);
4466 T complex<double>& operator+=(double);
4467 T complex<double>& operator-=(double);
4468 T complex<double>& operator*=(double);
4469 T complex<double>& operator/=(double);
4471 T complex<double>& operator=(const complex<double>&);
4472 T template<class X> complex<double>& operator= (const complex<X>&);
4473 T template<class X> complex<double>& operator+=(const complex<X>&);
4474 T template<class X> complex<double>& operator-=(const complex<X>&);
4475 T template<class X> complex<double>& operator*=(const complex<X>&);
4476 T template<class X> complex<double>& operator/=(const complex<X>&);
4479 T template<> class complex<long double> {
4481 T typedef long double value_type;
4483 T complex(long double re = 0.0L, long double im = 0.0L);
4484 T complex(const complex<float>&);
4485 T complex(const complex<double>&);
4486 T long double real() const;
4487 T long double imag() const;
4489 T complex<long double>& operator=(const complex<long double>&);
4490 T complex<long double>& operator= (long double);
4491 T complex<long double>& operator+=(long double);
4492 T complex<long double>& operator-=(long double);
4493 T complex<long double>& operator*=(long double);
4494 T complex<long double>& operator/=(long double);
4496 T template<class X> complex<long double>& operator= (const complex<X>&);
4497 T template<class X> complex<long double>& operator+=(const complex<X>&);
4498 T template<class X> complex<long double>& operator-=(const complex<X>&);
4499 T template<class X> complex<long double>& operator*=(const complex<X>&);
4500 T template<class X> complex<long double>& operator/=(const complex<X>&);
4503 26.3 Numeric arrays [lib.numarray]
4505 26.3.1 Header <valarray> synopsis [lib.valarray.synopsis]
4507 T template<class T> class valarray; // An array of type T
4509 T template<class T> class slice_array;
4511 T template<class T> class gslice_array;
4512 T template<class T> class mask_array; // a masked array
4513 T template<class T> class indirect_array; // an indirected array
4515 T template<class T> valarray<T> operator*
4516 (const valarray<T>&, const valarray<T>&);
4517 T template<class T> valarray<T> operator* (const valarray<T>&, const T&);
4518 T template<class T> valarray<T> operator* (const T&, const valarray<T>&);
4519 T template<class T> valarray<T> operator/
4520 (const valarray<T>&, const valarray<T>&);
4521 T template<class T> valarray<T> operator/ (const valarray<T>&, const T&);
4522 T template<class T> valarray<T> operator/ (const T&, const valarray<T>&);
4523 T template<class T> valarray<T> operator%
4524 (const valarray<T>&, const valarray<T>&);
4525 T template<class T> valarray<T> operator% (const valarray<T>&, const T&);
4526 T template<class T> valarray<T> operator% (const T&, const valarray<T>&);
4527 T template<class T> valarray<T> operator+
4528 (const valarray<T>&, const valarray<T>&);
4529 T template<class T> valarray<T> operator+ (const valarray<T>&, const T&);
4530 T template<class T> valarray<T> operator+ (const T&, const valarray<T>&);
4531 T template<class T> valarray<T> operator-
4532 (const valarray<T>&, const valarray<T>&);
4533 T template<class T> valarray<T> operator- (const valarray<T>&, const T&);
4534 T template<class T> valarray<T> operator- (const T&, const valarray<T>&);
4535 T template<class T> valarray<T> operator^
4536 (const valarray<T>&, const valarray<T>&);
4537 T template<class T> valarray<T> operator^ (const valarray<T>&, const T&);
4538 T template<class T> valarray<T> operator^ (const T&, const valarray<T>&);
4539 T template<class T> valarray<T> operator&
4540 (const valarray<T>&, const valarray<T>&);
4541 T template<class T> valarray<T> operator& (const valarray<T>&, const T&);
4542 T template<class T> valarray<T> operator& (const T&, const valarray<T>&);
4543 T template<class T> valarray<T> operator|
4544 (const valarray<T>&, const valarray<T>&);
4545 T template<class T> valarray<T> operator| (const valarray<T>&, const T&);
4546 T template<class T> valarray<T> operator| (const T&, const valarray<T>&);
4547 T template<class T> valarray<T> operator<<
4548 (const valarray<T>&, const valarray<T>&);
4549 T template<class T> valarray<T> operator<<(const valarray<T>&, const T&);
4550 T template<class T> valarray<T> operator<<(const T&, const valarray<T>&);
4551 T template<class T> valarray<T> operator>>
4552 (const valarray<T>&, const valarray<T>&);
4553 T template<class T> valarray<T> operator>>(const valarray<T>&, const T&);
4554 T template<class T> valarray<T> operator>>(const T&, const valarray<T>&);
4555 T template<class T> valarray<bool> operator&&
4556 (const valarray<T>&, const valarray<T>&);
4557 T template<class T> valarray<bool> operator&&(const valarray<T>&, const T&);
4558 T template<class T> valarray<bool> operator&&(const T&, const valarray<T>&);
4559 T template<class T> valarray<bool> operator||
4560 (const valarray<T>&, const valarray<T>&);
4561 T template<class T> valarray<bool> operator||(const valarray<T>&, const T&);
4562 T template<class T> valarray<bool> operator||(const T&, const valarray<T>&);
4565 valarray<bool> operator==(const valarray<T>&, const valarray<T>&);
4566 T template<class T> valarray<bool> operator==(const valarray<T>&, const T&);
4567 T template<class T> valarray<bool> operator==(const T&, const valarray<T>&);
4569 valarray<bool> operator!=(const valarray<T>&, const valarray<T>&);
4570 T template<class T> valarray<bool> operator!=(const valarray<T>&, const T&);
4571 T template<class T> valarray<bool> operator!=(const T&, const valarray<T>&);
4573 valarray<bool> operator< (const valarray<T>&, const valarray<T>&);
4574 T template<class T> valarray<bool> operator< (const valarray<T>&, const T&);
4575 T template<class T> valarray<bool> operator< (const T&, const valarray<T>&);
4577 valarray<bool> operator> (const valarray<T>&, const valarray<T>&);
4578 T template<class T> valarray<bool> operator> (const valarray<T>&, const T&);
4579 T template<class T> valarray<bool> operator> (const T&, const valarray<T>&);
4581 valarray<bool> operator<=(const valarray<T>&, const valarray<T>&);
4582 T template<class T> valarray<bool> operator<=(const valarray<T>&, const T&);
4583 T template<class T> valarray<bool> operator<=(const T&, const valarray<T>&);
4585 valarray<bool> operator>=(const valarray<T>&, const valarray<T>&);
4586 T template<class T> valarray<bool> operator>=(const valarray<T>&, const T&);
4587 T template<class T> valarray<bool> operator>=(const T&, const valarray<T>&);
4588 T template<class T> valarray<T> abs (const valarray<T>&);
4589 T template<class T> valarray<T> acos (const valarray<T>&);
4590 T template<class T> valarray<T> asin (const valarray<T>&);
4591 T template<class T> valarray<T> atan (const valarray<T>&);
4592 T template<class T> valarray<T> atan2
4593 (const valarray<T>&, const valarray<T>&);
4594 T template<class T> valarray<T> atan2(const valarray<T>&, const T&);
4595 T template<class T> valarray<T> atan2(const T&, const valarray<T>&);
4596 T template<class T> valarray<T> cos (const valarray<T>&);
4597 T template<class T> valarray<T> cosh (const valarray<T>&);
4598 T template<class T> valarray<T> exp (const valarray<T>&);
4599 T template<class T> valarray<T> log (const valarray<T>&);
4600 T template<class T> valarray<T> log10(const valarray<T>&);
4601 T template<class T> valarray<T> pow(const valarray<T>&, const valarray<T>&);
4602 T template<class T> valarray<T> pow(const valarray<T>&, const T&);
4603 T template<class T> valarray<T> pow(const T&, const valarray<T>&);
4604 T template<class T> valarray<T> sin (const valarray<T>&);
4605 T template<class T> valarray<T> sinh (const valarray<T>&);
4606 T template<class T> valarray<T> sqrt (const valarray<T>&);
4607 T template<class T> valarray<T> tan (const valarray<T>&);
4608 T template<class T> valarray<T> tanh (const valarray<T>&);
4612 26.3.2 Template class valarray [lib.template.valarray]
4614 T template<class T> class valarray {
4616 T typedef T value_type;
4618 // _lib.valarray.cons_ construct/destroy:
4620 T explicit valarray(size_t);
4621 T valarray(const T&, size_t);
4622 T valarray(const T*, size_t);
4623 T valarray(const valarray&);
4624 T valarray(const slice_array<T>&);
4625 T valarray(const gslice_array<T>&);
4626 T valarray(const mask_array<T>&);
4627 T valarray(const indirect_array<T>&);
4630 // _lib.valarray.assign_ assignment:
4631 T valarray<T>& operator=(const valarray<T>&);
4632 T valarray<T>& operator=(const T&);
4633 T valarray<T>& operator=(const slice_array<T>&);
4634 T valarray<T>& operator=(const gslice_array<T>&);
4635 T valarray<T>& operator=(const mask_array<T>&);
4636 T valarray<T>& operator=(const indirect_array<T>&);
4637 // _lib.valarray.access_ element access:
4638 T T operator[](size_t) const;
4639 T T& operator[](size_t);
4640 // _lib.valarray.sub_ subset operations:
4641 T valarray<T> operator[](slice) const;
4642 T slice_array<T> operator[](slice);
4643 T valarray<T> operator[](const gslice&) const;
4644 T gslice_array<T> operator[](const gslice&);
4645 T valarray<T> operator[](const valarray<bool>&) const;
4646 T mask_array<T> operator[](const valarray<bool>&);
4647 T valarray<T> operator[](const valarray<size_t>&) const;
4648 T indirect_array<T> operator[](const valarray<size_t>&);
4649 // _lib.valarray.unary_ unary operators:
4650 T valarray<T> operator+() const;
4651 T valarray<T> operator-() const;
4652 T valarray<T> operator~() const;
4653 T valarray<T> operator!() const;
4654 // _lib.valarray.cassign_ computed assignment:
4655 T valarray<T>& operator*= (const T&);
4656 T valarray<T>& operator/= (const T&);
4657 T valarray<T>& operator%= (const T&);
4658 T valarray<T>& operator+= (const T&);
4659 T valarray<T>& operator-= (const T&);
4660 T valarray<T>& operator^= (const T&);
4661 T valarray<T>& operator&= (const T&);
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 valarray<T>&);
4666 T valarray<T>& operator/= (const valarray<T>&);
4667 T valarray<T>& operator%= (const valarray<T>&);
4668 T valarray<T>& operator+= (const valarray<T>&);
4669 T valarray<T>& operator-= (const valarray<T>&);
4670 T valarray<T>& operator^= (const valarray<T>&);
4671 T valarray<T>& operator|= (const valarray<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 // _lib.valarray.members_ member functions:
4676 T size_t size() const;
4681 T valarray<T> shift (int) const;
4682 T valarray<T> cshift(int) const;
4683 T valarray<T> apply(T func(T)) const;
4684 T valarray<T> apply(T func(const T&)) const;
4685 T void resize(size_t sz, T c = T());
4691 26.3.4 Class slice [lib.class.slice]
4696 T slice(size_t, size_t, size_t);
4698 T size_t start() const;
4699 T size_t size() const;
4700 T size_t stride() const;
4706 26.3.5 Template class slice_array [lib.template.slice.array]
4708 T template <class T> class slice_array {
4710 T typedef T value_type;
4712 T void operator= (const valarray<T>&) const;
4713 T void operator*= (const valarray<T>&) const;
4714 T void operator/= (const valarray<T>&) const;
4715 T void operator%= (const valarray<T>&) const;
4716 T void operator+= (const valarray<T>&) const;
4717 T void operator-= (const valarray<T>&) const;
4718 T void operator^= (const valarray<T>&) const;
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 T&);
4727 T slice_array(const slice_array&);
4728 T slice_array& operator=(const slice_array&);
4734 26.3.6 The gslice class [lib.class.gslice]
4739 T gslice(size_t s, const valarray<size_t>& l, const valarray<size_t>& d);
4741 T size_t start() const;
4742 T valarray<size_t> size() const;
4743 T valarray<size_t> stride() const;
4747 26.3.7 Template class gslice_array [lib.template.gslice.array]
4749 T template <class T> class gslice_array {
4751 T typedef T value_type;
4753 T void operator= (const valarray<T>&) const;
4754 T void operator*= (const valarray<T>&) const;
4755 T void operator/= (const valarray<T>&) const;
4756 T void operator%= (const valarray<T>&) const;
4757 T void operator+= (const valarray<T>&) const;
4758 T void operator-= (const valarray<T>&) const;
4759 T void operator^= (const valarray<T>&) const;
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 T&);
4768 T gslice_array(const gslice_array&);
4769 T gslice_array& operator=(const gslice_array&);
4773 26.3.8 Template class mask_array [lib.template.mask.array]
4775 T template <class T> class mask_array {
4777 T typedef T value_type;
4779 T void operator= (const valarray<T>&) const;
4780 T void operator*= (const valarray<T>&) const;
4781 T void operator/= (const valarray<T>&) const;
4782 T void operator%= (const valarray<T>&) const;
4783 T void operator+= (const valarray<T>&) const;
4784 T void operator-= (const valarray<T>&) const;
4785 T void operator^= (const valarray<T>&) const;
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 T&);
4794 T mask_array(const mask_array&);
4795 T mask_array& operator=(const mask_array&);
4796 // remainder implementation defined
4800 26.3.9 Template class [lib.template.indirect.array]
4803 T template <class T> class indirect_array {
4805 T typedef T value_type;
4807 T void operator= (const valarray<T>&) const;
4808 T void operator*= (const valarray<T>&) const;
4809 T void operator/= (const valarray<T>&) const;
4810 T void operator%= (const valarray<T>&) const;
4811 T void operator+= (const valarray<T>&) const;
4812 T void operator-= (const valarray<T>&) const;
4813 T void operator^= (const valarray<T>&) const;
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 T&);
4819 T ~indirect_array();
4822 T indirect_array(const indirect_array&);
4823 T indirect_array& operator=(const indirect_array&);
4824 // remainder implementation defined
4827 26.4 Generalized numeric operations [lib.numeric.ops]
4829 Header <numeric> synopsis
4831 T template <class InputIterator, class T>
4832 T accumulate(InputIterator first, InputIterator last, T init);
4834 T template <class InputIterator, class T, class BinaryOperation>
4835 T accumulate(InputIterator first, InputIterator last, T init,
4836 BinaryOperation binary_op);
4838 T template <class InputIterator1, class InputIterator2, class T>
4839 T inner_product(InputIterator1 first1, InputIterator1 last1,
4840 InputIterator2 first2, T init);
4842 T template <class InputIterator1, class InputIterator2, class T,
4843 class BinaryOperation1, class BinaryOperation2>
4844 T inner_product(InputIterator1 first1, InputIterator1 last1,
4845 InputIterator2 first2, T init,
4846 BinaryOperation1 binary_op1,
4847 BinaryOperation2 binary_op2);
4849 T template <class InputIterator, class OutputIterator>
4850 OutputIterator partial_sum(InputIterator first,
4852 OutputIterator result);
4854 T template <class InputIterator, class OutputIterator,
4855 class BinaryOperation>
4856 OutputIterator partial_sum(InputIterator first,
4858 OutputIterator result,
4859 BinaryOperation binary_op);
4861 T template <class InputIterator, class OutputIterator>
4862 OutputIterator adjacent_difference(InputIterator first,
4864 OutputIterator result);
4866 T template <class InputIterator, class OutputIterator,
4867 class BinaryOperation>
4868 OutputIterator adjacent_difference(InputIterator first,
4870 OutputIterator result,
4871 BinaryOperation binary_op);
4874 26.5 C Library [lib.c.math]
4876 Table 2--Header <cmath> synopsis
4879 X acos cos fmod modf tan
4880 X asin cosh frexp pow tanh
4881 X atan exp ldexp sin
4882 X atan2 fabs log sinh
4883 X ceil floor log10 sqrt
4885 Table 3--Header <cstdlib> synopsis
4887 X Types: div_t ldiv_t
4892 X long abs(long); // labs()
4893 X ldiv_t div(long, long); // ldiv()
4895 X float abs (float);
4896 X float acos (float);
4897 X float asin (float);
4898 X float atan (float);
4899 X float atan2(float, float);
4900 X float ceil (float);
4901 X float cos (float);
4902 X float cosh (float);
4903 X float exp (float);
4904 X float fabs (float);
4905 X float floor(float);
4906 X float fmod (float, float);
4907 X float frexp(float, int*);
4908 X float ldexp(float, int);
4909 X float log (float);
4910 X float log10(float);
4911 X float modf (float, float*);
4912 X float pow (float, float);
4913 X float pow (float, int);
4914 X float sin (float);
4915 X float sinh (float);
4916 X float sqrt (float);
4917 X float tan (float);
4918 X float tanh (float);
4920 X double abs(double); // fabs()
4921 X double pow(double, int);
4923 X long double abs (long double);
4924 X long double acos (long double);
4925 X long double asin (long double);
4926 X long double atan (long double);
4927 X long double atan2(long double, long double);
4928 X long double ceil (long double);
4929 X long double cos (long double);
4930 X long double cosh (long double);
4931 X long double exp (long double);
4932 X long double fabs (long double);
4933 X long double floor(long double);
4934 X long double fmod (long double, long double);
4935 X long double frexp(long double, int*);
4936 X long double ldexp(long double, int);
4937 X long double log (long double);
4938 X long double log10(long double);
4939 X long double modf (long double, long double*);
4940 X long double pow (long double, long double);
4941 X long double pow (long double, int);
4942 X long double sin (long double);
4943 X long double sinh (long double);
4944 X long double sqrt (long double);
4945 X long double tan (long double);
4946 X long double tanh (long double);
4948 Header <iosfwd> synopsis
4950 X template<class charT> class char_traits;
4951 X template<> class char_traits<char>;
4952 X template<> class char_traits<wchar_t>;
4953 X template<class T> class allocator;
4954 X template <class charT, class traits = char_traits<charT> >
4957 X template <class charT, class traits = char_traits<charT> >
4958 class basic_streambuf;
4960 X template <class charT, class traits = char_traits<charT> >
4961 class basic_istream;
4963 X template <class charT, class traits = char_traits<charT> >
4964 class basic_ostream;
4966 X template <class charT, class traits = char_traits<charT> >
4967 class basic_iostream;
4969 X template <class charT, class traits = char_traits<charT>,
4970 class Allocator = allocator<charT> >
4971 class basic_stringbuf;
4973 X template <class charT, class traits = char_traits<charT>,
4974 class Allocator = allocator<charT> >
4975 class basic_istringstream;
4977 X template <class charT, class traits = char_traits<charT>,
4978 class Allocator = allocator<charT> >
4979 class basic_ostringstream;
4981 X template <class charT, class traits = char_traits<charT>,
4982 class Allocator = allocator<charT> >
4983 class basic_stringstream;
4985 X template <class charT, class traits = char_traits<charT> >
4986 class basic_filebuf;
4988 X template <class charT, class traits = char_traits<charT> >
4989 class basic_ifstream;
4991 X template <class charT, class traits = char_traits<charT> >
4992 class basic_ofstream;
4994 X template <class charT, class traits = char_traits<charT> >
4995 class basic_fstream;
4996 X template <class charT, class traits = char_traits<charT> >
4997 class istreambuf_iterator;
4999 X template <class charT, class traits = char_traits<charT> >
5000 class ostreambuf_iterator;
5001 X typedef basic_ios<char> ios;
5002 X typedef basic_ios<wchar_t> wios;
5003 X typedef basic_streambuf<char> streambuf;
5004 X typedef basic_istream<char> istream;
5005 X typedef basic_ostream<char> ostream;
5006 X typedef basic_iostream<char> iostream;
5007 X typedef basic_stringbuf<char> stringbuf;
5008 X typedef basic_istringstream<char> istringstream;
5009 X typedef basic_ostringstream<char> ostringstream;
5010 X typedef basic_stringstream<char> stringstream;
5011 X typedef basic_filebuf<char> filebuf;
5012 X typedef basic_ifstream<char> ifstream;
5013 X typedef basic_ofstream<char> ofstream;
5014 X typedef basic_fstream<char> fstream;
5015 X typedef basic_streambuf<wchar_t> wstreambuf;
5016 X typedef basic_istream<wchar_t> wistream;
5017 X typedef basic_ostream<wchar_t> wostream;
5018 X typedef basic_iostream<wchar_t> wiostream;
5019 X typedef basic_stringbuf<wchar_t> wstringbuf;
5020 X typedef basic_istringstream<wchar_t> wistringstream;
5021 X typedef basic_ostringstream<wchar_t> wostringstream;
5022 X typedef basic_stringstream<wchar_t> wstringstream;
5024 X typedef basic_filebuf<wchar_t> wfilebuf;
5025 X typedef basic_ifstream<wchar_t> wifstream;
5026 X typedef basic_ofstream<wchar_t> wofstream;
5027 X typedef basic_fstream<wchar_t> wfstream;
5028 X template <class state> class fpos;
5029 X typedef fpos<char_traits<char>::state_type> streampos;
5030 X typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
5032 27.3 Standard iostream objects [lib.iostream.objects]
5034 Header <iostream> synopsis
5036 T [must also include <istream> and <ostream>]
5037 T extern istream cin;
5038 T extern ostream cout;
5039 T extern ostream cerr;
5040 T extern ostream clog;
5042 T extern wistream wcin;
5043 T extern wostream wcout;
5044 T extern wostream wcerr;
5045 T extern wostream wclog;
5047 27.4 Iostreams base classes [lib.iostreams.base]
5049 Header <ios> synopsis
5053 T typedef OFF_T streamoff;
5054 T typedef SZ_T streamsize;
5055 T template <class stateT> class fpos;
5058 template <class charT, class traits = char_traits<charT> >
5060 // _lib.std.ios.manip_, manipulators:
5061 T ios_base& boolalpha (ios_base& str);
5062 T ios_base& noboolalpha(ios_base& str);
5063 T ios_base& showbase (ios_base& str);
5064 T ios_base& noshowbase (ios_base& str);
5065 T ios_base& showpoint (ios_base& str);
5066 T ios_base& noshowpoint(ios_base& str);
5067 T ios_base& showpos (ios_base& str);
5068 T ios_base& noshowpos (ios_base& str);
5069 T ios_base& skipws (ios_base& str);
5070 T ios_base& noskipws (ios_base& str);
5071 T ios_base& nouppercase(ios_base& str);
5072 T ios_base& uppercase (ios_base& str);
5073 M ios_base& unitbuf (ios_base& str);
5074 M ios_base& nounitbuf (ios_base& str);
5075 // _lib.adjustfield.manip_ adjustfield:
5076 T ios_base& internal (ios_base& str);
5077 T ios_base& left (ios_base& str);
5078 T ios_base& right (ios_base& str);
5079 // _lib.basefield.manip_ basefield:
5080 T ios_base& dec (ios_base& str);
5081 T ios_base& hex (ios_base& str);
5082 T ios_base& oct (ios_base& str);
5084 // _lib.floatfield.manip_ floatfield:
5085 T ios_base& fixed (ios_base& str);
5086 T ios_base& scientific (ios_base& str);
5089 27.4.2 Class ios_base [lib.ios.base]
5094 T typedef T1 fmtflags;
5095 T static const fmtflags boolalpha;
5096 T static const fmtflags dec;
5097 T static const fmtflags fixed;
5098 T static const fmtflags hex;
5099 T static const fmtflags internal;
5100 T static const fmtflags left;
5101 T static const fmtflags oct;
5102 T static const fmtflags right;
5103 T static const fmtflags scientific;
5104 T static const fmtflags showbase;
5105 T static const fmtflags showpoint;
5106 T static const fmtflags showpos;
5107 T static const fmtflags skipws;
5108 X static const fmtflags unitbuf;
5109 T static const fmtflags uppercase;
5110 T static const fmtflags adjustfield;
5111 T static const fmtflags basefield;
5112 T static const fmtflags floatfield;
5115 T static const iostate badbit;
5116 T static const iostate eofbit;
5117 T static const iostate failbit;
5118 T static const iostate goodbit;
5119 T typedef T3 openmode;
5120 T static const openmode app;
5121 T static const openmode ate;
5122 T static const openmode binary;
5123 T static const openmode in;
5124 T static const openmode out;
5125 T static const openmode trunc;
5126 T typedef T4 seekdir;
5127 T static const seekdir beg;
5128 T static const seekdir cur;
5129 T static const seekdir end;
5131 // _lib.fmtflags.state_ fmtflags state:
5132 T fmtflags flags() const;
5133 T fmtflags flags(fmtflags fmtfl);
5134 T fmtflags setf(fmtflags fmtfl);
5135 T fmtflags setf(fmtflags fmtfl, fmtflags mask);
5136 T void unsetf(fmtflags mask);
5137 T streamsize precision() const;
5138 T streamsize precision(streamsize prec);
5139 T streamsize width() const;
5140 T streamsize width(streamsize wide);
5141 // _lib.ios.base.locales_ locales:
5142 T locale imbue(const locale& loc);
5143 T locale getloc() const;
5144 // _lib.ios.base.storage_ storage:
5145 T static int xalloc();
5146 T long& iword(int index);
5147 T void*& pword(int index);
5149 T virtual ~ios_base();
5150 // _lib.ios.base.callback_ callbacks;
5151 T enum event { erase_event, imbue_event, copyfmt_event };
5152 T typedef void (*event_callback)(event, ios_base&, int index);
5153 T void register_callback(event_call_back fn, int index);
5154 T static bool sync_with_stdio(bool sync = true);
5159 27.4.2.1.1 Class ios_base::failure [lib.ios::failure]
5161 T class ios_base::failure : public exception {
5163 T explicit failure(const string& msg);
5164 T virtual ~failure();
5165 T virtual const char* what() const throw();
5169 27.4.2.1.6 Class ios_base::Init [lib.ios::Init]
5171 T class ios_base::Init {
5178 27.4.3 Template class fpos [lib.fpos]
5180 X template <class stateT> class fpos {
5182 // _lib.fpos.members_ Members
5183 T stateT state() const;
5184 T void state(stateT);
5186 T stateT st; // exposition only
5190 27.4.5 Template class basic_ios [lib.ios]
5192 template <class charT, class traits = char_traits<charT> >
5193 X class basic_ios : public ios_base {
5197 T typedef charT char_type;
5198 T typedef typename traits::int_type int_type;
5199 T typedef typename traits::pos_type pos_type;
5200 T typedef typename traits::off_type off_type;
5201 T typedef traits traits_type;
5202 T operator void*() const
5203 T bool operator!() const
5204 T iostate rdstate() const;
5205 T void clear(iostate state = goodbit);
5206 T void setstate(iostate state);
5207 T bool good() const;
5209 T bool fail() const;
5211 T iostate exceptions() const;
5212 T void exceptions(iostate except);
5213 // _lib.basic.ios.cons_ Constructor/destructor:
5214 T explicit basic_ios(basic_streambuf<charT,traits>* sb);
5215 T virtual ~basic_ios();
5216 // _lib.basic.ios.members_ Members:
5217 T basic_ostream<charT,traits>* tie() const;
5218 T basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr);
5219 T basic_streambuf<charT,traits>* rdbuf() const;
5220 T basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb);
5221 X basic_ios& copyfmt(const basic_ios& rhs);
5222 T char_type fill() const;
5223 T char_type fill(char_type ch);
5224 // _lib.ios.base.locales_ locales:
5225 T locale imbue(const locale& loc);
5226 X char narrow(char_type c, char dfault) const;
5227 X char_type widen(char c) const;
5230 T void init(basic_streambuf<charT,traits>* sb);
5232 T basic_ios(const basic_ios& ); // not defined
5233 T basic_ios& operator=(const basic_ios&); // not defined
5237 27.5 Stream buffers [lib.stream.buffers]
5239 Header <streambuf> synopsis
5241 X template <class charT, class traits = char_traits<charT> >
5242 class basic_streambuf;
5243 T typedef basic_streambuf<char> streambuf;
5244 T typedef basic_streambuf<wchar_t> wstreambuf;
5246 27.5.2 Template class [lib.streambuf]
5247 basic_streambuf<charT,traits>
5249 template <class charT, class traits = char_traits<charT> >
5250 X class basic_streambuf {
5254 T typedef charT char_type;
5255 T typedef typename traits::int_type int_type;
5256 T typedef typename traits::pos_type pos_type;
5257 T typedef typename traits::off_type off_type;
5258 T typedef traits traits_type;
5259 T virtual ~basic_streambuf();
5260 // _lib.streambuf.locales_ locales:
5261 T locale pubimbue(const locale &loc);
5262 T locale getloc() const;
5263 // _lib.streambuf.buffer_ buffer and positioning:
5264 T basic_streambuf<char_type,traits>*
5265 pubsetbuf(char_type* s, streamsize n);
5266 T pos_type pubseekoff(off_type off, ios_base::seekdir way,
5267 ios_base::openmode which =
5268 ios_base::in | ios_base::out);
5269 T pos_type pubseekpos(pos_type sp,
5270 ios_base::openmode which =
5271 ios_base::in | ios_base::out);
5274 // Get and put areas:
5275 // _lib.streambuf.pub.get_ Get area:
5276 T streamsize in_avail();
5277 T int_type snextc();
5278 T int_type sbumpc();
5280 T streamsize sgetn(char_type* s, streamsize n);
5281 // _lib.streambuf.pub.pback_ Putback:
5282 X int_type sputbackc(char_type c);
5283 X int_type sungetc();
5284 // _lib.streambuf.pub.put_ Put area:
5285 T int_type sputc(char_type c);
5286 X streamsize sputn(const char_type* s, streamsize n);
5288 T basic_streambuf();
5289 // _lib.streambuf.get.area_ Get area:
5290 T char_type* eback() const;
5291 T char_type* gptr() const;
5292 T char_type* egptr() const;
5293 T void gbump(int n);
5294 T void setg(char_type* gbeg, char_type* gnext, char_type* gend);
5295 // _lib.streambuf.put.area_ Put area:
5296 T char_type* pbase() const;
5297 T char_type* pptr() const;
5298 T char_type* epptr() const;
5299 T void pbump(int n);
5300 T void setp(char_type* pbeg, char_type* pend);
5301 // _lib.streambuf.virtuals_ virtual functions:
5302 // _lib.streambuf.virt.locales_ Locales:
5303 T virtual void imbue(const locale &loc);
5304 // _lib.streambuf.virt.buffer_ Buffer management and positioning:
5305 T virtual basic_streambuf<char_type,traits>*
5306 setbuf(char_type* s, streamsize n);
5307 T virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5308 ios_base::openmode which = ios_base::in | ios_base::out);
5309 T virtual pos_type seekpos(pos_type sp,
5310 ios_base::openmode which = ios_base::in | ios_base::out);
5311 T virtual int sync();
5312 // _lib.streambuf.virt.get_ Get area:
5313 T virtual int showmanyc();
5314 T virtual streamsize xsgetn(char_type* s, streamsize n);
5315 T virtual int_type underflow();
5316 T virtual int_type uflow();
5317 // _lib.streambuf.virt.pback_ Putback:
5318 T virtual int_type pbackfail(int_type c = traits::eof());
5319 // _lib.streambuf.virt.put_ Put area:
5320 X virtual streamsize xsputn(const char_type* s, streamsize n);
5321 T virtual int_type overflow (int_type c = traits::eof());
5324 27.6 Formatting and manipulators [lib.iostream.format]
5326 Header <istream> synopsis
5328 T template <class charT, class traits = char_traits<charT> >
5329 class basic_istream;
5330 T typedef basic_istream<char> istream;
5331 T typedef basic_istream<wchar_t> wistream;
5333 T template <class charT, class traits = char_traits<charT> >
5334 class basic_iostream;
5335 T typedef basic_iostream<char> iostream;
5336 T typedef basic_iostream<wchar_t> wiostream;
5338 X template <class charT, class traits>
5339 basic_istream<charT,traits>& ws(basic_istream<charT,traits>& is);
5341 Header <ostream> synopsis
5343 X template <class charT, class traits = char_traits<charT> >
5344 class basic_ostream;
5345 T typedef basic_ostream<char> ostream;
5346 T typedef basic_ostream<wchar_t> wostream;
5348 T template <class charT, class traits>
5349 basic_ostream<charT,traits>& endl(basic_ostream<charT,traits>& os);
5350 T template <class charT, class traits>
5351 basic_ostream<charT,traits>& ends(basic_ostream<charT,traits>& os);
5352 T template <class charT, class traits>
5353 basic_ostream<charT,traits>& flush(basic_ostream<charT,traits>& os);
5355 Header <iomanip> synopsis
5357 // Types T1, T2, ... are unspecified implementation types
5358 T T1 resetiosflags(ios_base::fmtflags mask);
5359 T T2 setiosflags (ios_base::fmtflags mask);
5360 T T3 setbase(int base);
5361 T template<charT> T4 setfill(charT c);
5362 T T5 setprecision(int n);
5366 27.6.1.1 Template class basic_istream [lib.istream]
5368 template <class charT, class traits = char_traits<charT> >
5369 T class basic_istream : virtual public basic_ios<charT,traits> {
5371 // Types (inherited from basic_ios (_lib.ios_)):
5372 T typedef charT char_type;
5373 T typedef typename traits::int_type int_type;
5374 T typedef typename traits::pos_type pos_type;
5375 T typedef typename traits::off_type off_type;
5376 T typedef traits traits_type;
5377 // _lib.istream.cons_ Constructor/destructor:
5378 T explicit basic_istream(basic_streambuf<charT,traits>* sb);
5379 T virtual ~basic_istream();
5380 // _lib.istream::sentry_ Prefix/suffix:
5383 // _lib.istream.formatted_ Formatted input:
5384 T basic_istream<charT,traits>& operator>>
5385 (basic_istream<charT,traits>& (*pf)(basic_istream<charT,traits>&))
5386 T basic_istream<charT,traits>& operator>>
5387 (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&))
5388 T basic_istream<charT,traits>& operator>>
5389 (ios_base& (*pf)(ios_base&))
5390 S basic_istream<charT,traits>& operator>>(bool& n);
5391 S basic_istream<charT,traits>& operator>>(short& n);
5392 S basic_istream<charT,traits>& operator>>(unsigned short& n);
5393 S basic_istream<charT,traits>& operator>>(int& n);
5394 S basic_istream<charT,traits>& operator>>(unsigned int& n);
5395 S basic_istream<charT,traits>& operator>>(long& n);
5396 S basic_istream<charT,traits>& operator>>(unsigned long& n);
5397 S basic_istream<charT,traits>& operator>>(float& f);
5398 S basic_istream<charT,traits>& operator>>(double& f);
5399 S basic_istream<charT,traits>& operator>>(long double& f);
5400 S basic_istream<charT,traits>& operator>>(void*& p);
5401 S basic_istream<charT,traits>& operator>>
5402 (basic_streambuf<char_type,traits>* sb);
5403 // _lib.istream.unformatted_ Unformatted input:
5404 T streamsize gcount() const;
5406 S basic_istream<charT,traits>& get(char_type& c);
5407 S basic_istream<charT,traits>& get(char_type* s, streamsize n);
5408 S basic_istream<charT,traits>& get(char_type* s, streamsize n,
5410 S basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& sb);
5411 S basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& sb,
5413 S basic_istream<charT,traits>& getline(char_type* s, streamsize n);
5414 S basic_istream<charT,traits>& getline(char_type* s, streamsize n,
5416 S basic_istream<charT,traits>& ignore
5417 (streamsize n = 1, int_type delim = traits::eof());
5419 S basic_istream<charT,traits>& read (char_type* s, streamsize n);
5420 S streamsize readsome(char_type* s, streamsize n);
5421 S basic_istream<charT,traits>& putback(char_type c);
5422 S basic_istream<charT,traits>& unget();
5426 S basic_istream<charT,traits>& seekg(pos_type);
5427 S basic_istream<charT,traits>& seekg(off_type, ios_base::seekdir);
5430 // _lib.istream::extractors_ character extraction templates:
5431 S template<class charT, class traits>
5432 basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&,
5434 S template<class traits>
5435 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5437 S template<class traits>
5438 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5441 S template<class charT, class traits>
5442 basic_istream<charT,traits>& operator>>(basic_istream<charT,traits>&,
5444 S template<class traits>
5445 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5447 S template<class traits>
5448 basic_istream<char,traits>& operator>>(basic_istream<char,traits>&,
5451 27.6.1.1.2 Class basic_istream::sentry [lib.istream::sentry]
5454 template <class charT,class traits = char_traits<charT> >
5455 S class basic_istream<charT,traits>::sentry {
5456 typedef traits traits_type;
5457 S bool ok_; // exposition only
5459 S explicit sentry(basic_istream<charT,traits>& is, bool noskipws = false);
5461 S operator bool() const { return ok_; }
5463 T sentry(const sentry&); // not defined
5464 T sentry& operator=(const sentry&); // not defined
5468 27.6.1.5 Template class basic_iostream [lib.iostreamclass]
5470 template <class charT, class traits = char_traits<charT> >
5471 T class basic_iostream :
5472 public basic_istream<charT,traits>,
5473 public basic_ostream<charT,traits> {
5475 // constructor/destructor
5476 T explicit basic_iostream(basic_streambuf<charT,traits>* sb);
5477 T virtual ~basic_iostream();
5481 27.6.2.1 Template class basic_ostream [lib.ostream]
5483 template <class charT, class traits = char_traits<charT> >
5484 X class basic_ostream : virtual public basic_ios<charT,traits> {
5486 // Types (inherited from basic_ios (_lib.ios_)):
5487 T typedef charT char_type;
5488 T typedef typename traits::int_type int_type;
5489 T typedef typename traits::pos_type pos_type;
5490 T typedef typename traits::off_type off_type;
5491 T typedef traits traits_type;
5492 // _lib.ostream.cons_ Constructor/destructor:
5493 T explicit basic_ostream(basic_streambuf<char_type,traits>* sb);
5494 T virtual ~basic_ostream();
5495 // _lib.ostream::sentry_ Prefix/suffix:
5497 // _lib.ostream.formatted_ Formatted output:
5498 T basic_ostream<charT,traits>& operator<<
5499 (basic_ostream<charT,traits>& (*pf)(basic_ostream<charT,traits>&));
5500 T basic_ostream<charT,traits>& operator<<
5501 (basic_ios<charT,traits>& (*pf)(basic_ios<charT,traits>&));
5502 T basic_ostream<charT,traits>& operator<<
5503 (ios_base& (*pf)(ios_base&));
5504 T basic_ostream<charT,traits>& operator<<(bool n);
5505 T basic_ostream<charT,traits>& operator<<(short n);
5506 T basic_ostream<charT,traits>& operator<<(unsigned short n);
5507 T basic_ostream<charT,traits>& operator<<(int n);
5508 T basic_ostream<charT,traits>& operator<<(unsigned int n);
5509 T basic_ostream<charT,traits>& operator<<(long n);
5510 T basic_ostream<charT,traits>& operator<<(unsigned long n);
5511 S basic_ostream<charT,traits>& operator<<(float f);
5512 S basic_ostream<charT,traits>& operator<<(double f);
5513 S basic_ostream<charT,traits>& operator<<(long double f);
5514 T basic_ostream<charT,traits>& operator<<(const void* p);
5515 X basic_ostream<charT,traits>& operator<<
5516 (basic_streambuf<char_type,traits>* sb);
5517 // _lib.ostream.unformatted_ Unformatted output:
5518 T basic_ostream<charT,traits>& put(char_type c);
5519 T basic_ostream<charT,traits>& write(const char_type* s, streamsize n);
5520 X basic_ostream<charT,traits>& flush();
5522 // _lib.ostream.seeks_ seeks:
5524 S basic_ostream<charT,traits>& seekp(pos_type);
5525 S basic_ostream<charT,traits>& seekp(off_type, ios_base::seekdir);
5527 // _lib.ostream.inserters.character_ character inserters
5528 X template<class charT, class traits>
5529 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5531 X template<class charT, class traits>
5532 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5535 X template<class traits>
5536 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5538 // signed and unsigned
5539 X template<class traits>
5540 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5542 X template<class traits>
5543 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5545 X template<class charT, class traits>
5546 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5548 X template<class charT, class traits>
5549 basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>&,
5551 // partial specializationss
5552 X template<class traits>
5553 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5555 // signed and unsigned
5556 X template<class traits>
5557 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5558 const signed char*);
5559 X template<class traits>
5560 basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>&,
5561 const unsigned char*);
5564 27.6.2.3 Class basic_ostream::sentry [lib.ostream::sentry]
5566 template <class charT,class traits = char_traits<charT> >
5567 X class basic_ostream<charT,traits>::sentry {
5568 bool ok_; // exposition only
5570 X explicit sentry(basic_ostream<charT,traits>& os);
5572 X operator bool() const { return ok_; }
5574 X sentry(const sentry&); // not defined
5575 X sentry& operator=(const sentry&); // not defined
5578 27.7 String-based streams [lib.string.streams]
5580 Header <sstream> synopsis
5582 X template <class charT, class traits = char_traits<charT>,
5583 class Allocator = allocator<charT> >
5584 class basic_stringbuf;
5586 T typedef basic_stringbuf<char> stringbuf;
5587 T typedef basic_stringbuf<wchar_t> wstringbuf;
5589 template <class charT, class traits = char_traits<charT>,
5590 class Allocator = allocator<charT> >
5591 X class basic_istringstream;
5593 T typedef basic_istringstream<char> istringstream;
5594 T typedef basic_istringstream<wchar_t> wistringstream;
5596 template <class charT, class traits = char_traits<charT>,
5597 class Allocator = allocator<charT> >
5598 X class basic_ostringstream;
5599 T typedef basic_ostringstream<char> ostringstream;
5600 T typedef basic_ostringstream<wchar_t> wostringstream;
5602 template <class charT, class traits = char_traits<charT>,
5603 class Allocator = allocator<charT> >
5604 X class basic_stringstream;
5605 T typedef basic_stringstream<char> stringstream;
5606 T typedef basic_stringstream<wchar_t> wstringstream;
5608 27.7.1 Template class basic_stringbuf [lib.stringbuf]
5610 template <class charT, class traits = char_traits<charT>,
5611 class Allocator = allocator<charT> >
5612 X class basic_stringbuf : public basic_streambuf<charT,traits> {
5614 T typedef charT char_type;
5615 T typedef typename traits::int_type int_type;
5616 T typedef typename traits::pos_type pos_type;
5617 T typedef typename traits::off_type off_type;
5618 T typedef traits traits_type;
5619 // _lib.stringbuf.cons_ Constructors:
5620 S explicit basic_stringbuf(ios_base::openmode which
5621 = ios_base::in | ios_base::out);
5622 S explicit basic_stringbuf
5623 (const basic_string<charT,traits,Allocator>& str,
5624 ios_base::openmode which = ios_base::in | ios_base::out);
5625 // _lib.stringbuf.members_ Get and set:
5626 S basic_string<charT,traits,Allocator> str() const;
5627 S void str(const basic_string<charT,traits,Allocator>& s);
5630 // _lib.stringbuf.virtuals_ Overridden virtual functions:
5631 S virtual int_type underflow();
5632 S virtual int_type pbackfail(int_type c = traits::eof());
5633 S virtual int_type overflow (int_type c = traits::eof());
5634 S virtual basic_streambuf<charT,traits>* setbuf(charT*, streamsize);
5636 S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5637 ios_base::openmode which
5638 = ios_base::in | ios_base::out);
5639 S virtual pos_type seekpos(pos_type sp,
5640 ios_base::openmode which
5641 = ios_base::in | ios_base::out);
5645 27.7.2 Template class basic_istringstream [lib.istringstream]
5647 template <class charT, class traits = char_traits<charT>,
5648 class Allocator = allocator<charT> >
5649 X class basic_istringstream : public basic_istream<charT,traits> {
5651 T typedef charT char_type;
5652 T typedef typename traits::int_type int_type;
5653 T typedef typename traits::pos_type pos_type;
5654 T typedef typename traits::off_type off_type;
5655 T typedef traits traits_type;
5656 // _lib.istringstream.cons_ Constructors:
5657 S explicit basic_istringstream(ios_base::openmode which = ios_base::in);
5658 S explicit basic_istringstream(
5659 const basic_string<charT,traits,Allocator>& str,
5660 ios_base::openmode which = ios_base::in);
5662 // _lib.istringstream.members_ Members:
5663 S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
5664 S basic_string<charT,traits,Allocator> str() const;
5665 S void str(const basic_string<charT,traits,Allocator>& s);
5667 // basic_stringbuf<charT,traits,Allocator> sb; exposition only
5670 27.7.3 Class basic_ostringstream [lib.ostringstream]
5672 template <class charT, class traits = char_traits<charT>,
5673 class Allocator = allocator<charT> >
5674 X class basic_ostringstream : public basic_ostream<charT,traits> {
5678 T typedef charT char_type;
5679 T typedef typename traits::int_type int_type;
5680 T typedef typename traits::pos_type pos_type;
5681 T typedef typename traits::off_type off_type;
5682 // _lib.ostringstream.cons_ Constructors/destructor:
5683 S explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
5684 S explicit basic_ostringstream(
5685 const basic_string<charT,traits,Allocator>& str,
5686 ios_base::openmode which = ios_base::out);
5687 // _lib.ostringstream.members_ Members:
5688 S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
5689 S basic_string<charT,traits,Allocator> str() const;
5690 S void str(const basic_string<charT,traits,Allocator>& s);
5694 27.7.4 Template class basic_stringstream [lib.stringstream]
5696 template <class charT, class traits = char_traits<charT>,
5697 class Allocator = allocator<charT> >
5698 X class basic_stringstream
5699 : public basic_iostream<charT,traits> {
5702 T typedef charT char_type;
5703 T typedef typename traits::int_type int_type;
5704 T typedef typename traits::pos_type pos_type;
5705 T typedef typename traits::off_type off_type;
5706 // constructors/destructors
5707 S explicit basic_stringstream(
5708 ios_base::openmode which = ios_base::out|ios_base::in);
5709 S explicit basic_stringstream(
5710 const basic_string<charT,traits,Allocator>& str,
5711 ios_base::openmode which = ios_base::out|ios_base::in);
5713 S basic_stringbuf<charT,traits,Allocator>* rdbuf() const;
5714 S basic_string<charT,traits,Allocator> str() const;
5715 S void str(const basic_string<charT,traits,Allocator>& str);
5720 27.8.1 File streams [lib.fstreams]
5723 Header <fstream> synopsis
5725 X template <class charT, class traits = char_traits<charT> >
5726 class basic_filebuf;
5727 T typedef basic_filebuf<char> filebuf;
5728 T typedef basic_filebuf<wchar_t> wfilebuf;
5730 X template <class charT, class traits = char_traits<charT> >
5731 class basic_ifstream;
5732 T typedef basic_ifstream<char> ifstream;
5733 T typedef basic_ifstream<wchar_t> wifstream;
5735 X template <class charT, class traits = char_traits<charT> >
5736 class basic_ofstream;
5737 T typedef basic_ofstream<char> ofstream;
5738 T typedef basic_ofstream<wchar_t> wofstream;
5740 X template <class charT, class traits = char_traits<charT> >
5741 class basic_fstream;
5742 T typedef basic_fstream<char> fstream;
5743 T typedef basic_fstream<wchar_t> wfstream;
5745 27.8.1.1 Template class basic_filebuf [lib.filebuf]
5747 template <class charT, class traits = char_traits<charT> >
5748 X class basic_filebuf : public basic_streambuf<charT,traits> {
5750 T typedef charT char_type;
5751 T typedef typename traits::int_type int_type;
5752 T typedef typename traits::pos_type pos_type;
5753 T typedef typename traits::off_type off_type;
5754 T typedef traits traits_type;
5755 // _lib.filebuf.cons_ Constructors/destructor:
5757 X virtual ~basic_filebuf();
5758 // _lib.filebuf.members_ Members:
5759 T bool is_open() const;
5760 X basic_filebuf<charT,traits>* open
5761 (const char* s, ios_base::openmode mode);
5762 X basic_filebuf<charT,traits>* close();
5764 // _lib.filebuf.virtuals_ Overridden virtual functions:
5765 X virtual streamsize showmanyc();
5766 X virtual int_type underflow();
5767 X virtual int_type uflow();
5768 X virtual int_type pbackfail(int_type c = traits::eof());
5769 X virtual int_type overflow (int_type c = traits::eof());
5770 S virtual basic_streambuf<charT,traits>*
5771 setbuf(char_type* s, streamsize n);
5772 S virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5773 ios_base::openmode which
5774 = ios_base::in | ios_base::out);
5775 S virtual pos_type seekpos(pos_type sp, ios_base::openmode which
5776 = ios_base::in | ios_base::out);
5777 S virtual int sync();
5778 S virtual void imbue(const locale& loc);
5783 27.8.1.5 Template class basic_ifstream [lib.ifstream]
5785 template <class charT, class traits = char_traits<charT> >
5786 X class basic_ifstream : public basic_istream<charT,traits> {
5788 T typedef charT char_type;
5789 T typedef typename traits::int_type int_type;
5790 T typedef typename traits::pos_type pos_type;
5791 T typedef typename traits::off_type off_type;
5792 T typedef traits traits_type;
5793 // _lib.ifstream.cons_ Constructors:
5795 S explicit basic_ifstream(const char* s,
5796 ios_base::openmode mode = ios_base::in);
5797 // _lib.ifstream.members_ Members:
5798 S basic_filebuf<charT,traits>* rdbuf() const;
5800 S void open(const char* s, ios_base::openmode mode = ios_base::in);
5805 27.8.1.8 Template class basic_ofstream [lib.ofstream]
5807 template <class charT, class traits = char_traits<charT> >
5808 X class basic_ofstream : public basic_ostream<charT,traits> {
5810 T typedef charT char_type;
5811 T typedef typename traits::int_type int_type;
5812 T typedef typename traits::pos_type pos_type;
5813 T typedef typename traits::off_type off_type;
5814 T typedef traits traits_type;
5815 // _lib.ofstream.cons_ Constructors:
5817 X explicit basic_ofstream(const char* s,
5818 ios_base::openmode mode
5820 // _lib.ofstream.members_ Members:
5821 X basic_filebuf<charT,traits>* rdbuf() const;
5823 X void open(const char* s, ios_base::openmode mode = ios_base::out);
5828 27.8.1.11 Template class basic_fstream [lib.fstream]
5830 template <class charT, class traits=char_traits<charT> >
5831 X class basic_fstream
5832 : public basic_iostream<charT,traits> {
5834 T typedef charT char_type;
5835 T typedef typename traits::int_type int_type;
5836 T typedef typename traits::pos_type pos_type;
5837 T typedef typename traits::off_type off_type;
5838 T typedef traits traits_type;
5839 // constructors/destructor
5841 S explicit basic_fstream(
5843 ios_base::openmode mode = ios_base::in|ios_base::out);
5846 S basic_filebuf<charT,traits>* rdbuf() const;
5850 ios_base::openmode mode = ios_base::in|ios_base::out);
5856 27.8.2 C Library files [lib.c.files]
5859 Table 13--Header <cstdio> synopsis
5861 X BUFSIZ L_tmpnam SEEK_SET TMP_MAX
5862 X EOF NULL <cstdio> stderr _IOFBF
5863 X FILENAME_MAX SEEK_CUR stdin _IOLBF
5864 X FOPEN_MAX SEEK_END stdout _IONBF
5866 X Types: FILE fpos_t size_t <cstdio>
5868 X clearerr fgets fscanf gets rewind
5869 X fclose fopen fseek perror scanf tmpnam
5870 X feof fprintf fsetpos printf setbuf ungetc
5871 X ferror fputc ftell putc setvbuf vprintf
5872 X fflush fputs fwrite puts sprintf vfprintf
5873 X fgetc fread getc remove sscanf vsprintf
5874 X fgetpos freopen getchar putchar rename tmpfile
5879 1.5 Standard C library headers [depr.c.headers]
5881 X <assert.h> <iso646.h> <setjmp.h> <stdio.h> <wchar.h>
5882 <ctype.h> <limits.h> <signal.h> <stdlib.h> <wctype.h>
5883 <errno.h> <locale.h> <stdarg.h> <string.h>
5884 <float.h> <math.h> <stddef.h> <time.h>
5886 1.6 Old iostreams members [depr.ios.members]
5888 [Note: these should be #ifdef'd to permit diagnostics if used.]
5892 T typedef T1 io_state;
5893 T typedef T2 open_mode;
5894 T typedef T3 seek_dir;
5895 T typedef OFF_T streamoff;
5896 T typedef OFF_T streampos;
5897 // remainder unchanged
5901 [Note: these should be #ifdef'd to permit diagnostics if used.]
5903 template<class charT, class traits = char_traits<charT> >
5904 class basic_streambuf {
5907 // remainder unchanged
5911 8 An implementation may provide the following member functions that
5912 overload signatures specified in clause _lib.iostreams_:
5914 [Note: the following overloads should be #ifdef'd to permit
5915 diagnostics to be emitted, by default, if used.]
5917 template<class charT, class Traits> class basic_ios {
5919 M void clear(io_state state);
5920 M void setstate(io_state state);
5921 // remainder unchanged
5925 M void exceptions(io_state);
5926 // remainder unchanged
5928 template<class charT, class traits = char_traits<charT> >
5929 class basic_streambuf {
5931 M pos_type pubseekoff(off_type off, ios_base::seek_dir way,
5932 ios_base::open_mode which = ios_base::in | ios_base::out);
5933 M pos_type pubseekpos(pos_type sp,
5934 ios_base::open_mode which = ios_base::in | ios_base::out);
5935 // remainder unchanged
5937 template <class charT, class traits = char_traits<charT> >
5938 class basic_filebuf : public basic_streambuf<charT,traits> {
5940 M basic_filebuf<charT,traits>* open
5941 (const char* s, ios_base::open_mode mode);
5942 // remainder unchanged
5944 template <class charT, class traits = char_traits<charT> >
5945 class basic_ifstream : public basic_istream<charT,traits> {
5947 M void open(const char* s, ios_base::open_mode mode = in);
5948 // remainder unchanged
5950 template <class charT, class traits = char_traits<charT> >
5951 class basic_ofstream : public basic_ostream<charT,traits> {
5953 M void open(const char* s, ios_base::open_mode mode = out | trunc);
5954 // remainder unchanged
5960 1.7.1 Class strstreambuf [depr.strstreambuf]
5962 [Note: It should be possible to adopt these components with only
5963 minor changes from the 2.8 version of the library.]
5965 M class strstreambuf : public basic_streambuf<char> {
5967 M explicit strstreambuf(streamsize alsize_arg = 0);
5968 M strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
5969 M strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
5970 M strstreambuf(const char* gnext_arg, streamsize n);
5971 M strstreambuf(signed char* gnext_arg, streamsize n,
5972 signed char* pbeg_arg = 0);
5973 M strstreambuf(const signed char* gnext_arg, streamsize n);
5974 M strstreambuf(unsigned char* gnext_arg, streamsize n,
5975 unsigned char* pbeg_arg = 0);
5976 M strstreambuf(const unsigned char* gnext_arg, streamsize n);
5977 M virtual ~strstreambuf();
5978 M void freeze(bool freezefl = true);
5982 M virtual int_type overflow (int_type c = EOF);
5983 M virtual int_type pbackfail(int_type c = EOF);
5984 M virtual int_type underflow();
5985 M virtual pos_type seekoff(off_type off, ios_base::seekdir way,
5986 ios_base::openmode which
5987 = ios_base::in | ios_base::out);
5988 M virtual pos_type seekpos(pos_type sp, ios_base::openmode which
5989 = ios_base::in | ios_base::out);
5990 M virtual streambuf<char>* setbuf(char* s, streamsize n);
5993 1.7.4 Class strstream [depr.strstream]
5996 : public basic_iostream<char> {
5999 M typedef char char_type;
6000 M typedef typename char_traits<char>::int_type int_type
6001 M typedef typename char_traits<char>::pos_type pos_type;
6002 M typedef typename char_traits<char>::off_type off_type;
6003 // consturctors/destructor
6005 M strstream(char* s, int n,
6006 ios_base::openmode mode = ios_base::in|ios_base::out);
6007 M virtual ~strstream();
6009 M strstreambuf* rdbuf() const;
6010 M void freeze(bool freezefl = true);
6011 M int pcount() const;