From 4dd9d9db1d0571e5b416f4c3e6d7b902389f0fd9 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Tue, 13 Nov 2007 17:43:57 +0000 Subject: documentation.html: First pass at unified table of contents. 2007-11-13 Benjamin Kosnik * docs/html/documentation.html: First pass at unified table of contents. * docs/html/abi.html: Move... * docs/html/17_intro/abi.html: ...here. * docs/html/17_intro/porting-howto.html: Update, edit, put resulting pieces into... * docs/html/17_intro/api.html: New. * docs/html/17_intro/c++0x_status.html: New. * docs/html/17_intro/CHECKLIST: Move to... * docs/html/17_intro/c++1998_status.html: ...here. * docs/html/ext/tr1.html: Move ... * docs/html/17_intro/tr1_status.html: ...here. * docs/html/debug_mode.html: Move... * docs/html/ext/debug_mode.html: ...here. * docs/html/parallel_mode.html: Move... * docs/html/ext/parallel_mode.html: ...here * docs/html/17_intro/BUGS: Remove. * docs/html/17_intro/concept_check.diff: Remove. * docs/html/17_intro/HEADER_POLICY: Remove. * docs/html/17_intro/headers_cc.txt: Remove. * docs/html/17_intro/PROBLEMS: Remove. * docs/html/17_intro/RELEASE-NOTES: Remove. * docs/html/explanations.html: Remove. * docs/html/makedoc.awk: Remove. * docs/html/faq/index.txt: Remove. HTML only. * /docs/html/Makefile: Remove. * docs/html/17_intro/configury.html: Editing, updating, consistency check with doxygen conventions. Change libstdc++-v3 to libstdc++. * docs/html/17_intro/howto.html: Same. * docs/html/17_intro/license.html: Same. * docs/html/17_intro/porting.html: Same. * docs/html/18_support/howto.html: Same. * docs/html/19_diagnostics/howto.html: Same. * docs/html/20_util/allocator.html: Same. * docs/html/20_util/howto.html: Same. * docs/html/21_strings/howto.html: Same. * docs/html/22_locale/codecvt.html: Same. * docs/html/22_locale/ctype.html: Same. * docs/html/22_locale/howto.html: Same. * docs/html/22_locale/messages.html: Same. * docs/html/23_containers/howto.html: Same. * docs/html/24_iterators/howto.html: Same. * docs/html/25_algorithms/howto.html: Same. * docs/html/26_numerics/howto.html: Same. * docs/html/27_io/howto.html: Same. * docs/html/configopts.html: Same. * docs/html/debug.html: Same. * docs/html/ext/ballocator_doc.html: Same. * docs/html/ext/howto.html: Same. * docs/html/ext/mt_allocator.html: Same. * docs/html/ext/sgiexts.html: Same. * docs/html/faq/index.html: Same. * docs/html/install.html: Same. * docs/html/test.html: Same. * include/bits/c++config: Change _GLIBCXX_DEPRECATED to _GLIBCXX_DEPRECATED_ATTR, _GLIBCXX_VISIBILITY to _GLIBCXX_VISIBILITY_ATTR. * include/backward/auto_ptr.h: Same. * include/backward/binders.h: Same. * include/bits/stl_function.h: Same. * include/std/memory: Same. * include/std/streambuf: Same. * include/tr1_impl/boost_shared_ptr.h: Same. * src/globals_io.cc: Same. * src/ios_init.cc: Same. From-SVN: r130150 --- libstdc++-v3/docs/html/17_intro/BUGS | 28 - libstdc++-v3/docs/html/17_intro/CHECKLIST | 6002 ------------------- libstdc++-v3/docs/html/17_intro/HEADER_POLICY | 164 - libstdc++-v3/docs/html/17_intro/PROBLEMS | 8 - libstdc++-v3/docs/html/17_intro/RELEASE-NOTES | 83 - libstdc++-v3/docs/html/17_intro/abi.html | 991 ++++ libstdc++-v3/docs/html/17_intro/api.html | 596 ++ libstdc++-v3/docs/html/17_intro/c++0x_status.html | 2280 ++++++++ .../docs/html/17_intro/c++1998_status.html | 6004 ++++++++++++++++++++ libstdc++-v3/docs/html/17_intro/concept_check.diff | 382 -- libstdc++-v3/docs/html/17_intro/configury.html | 4 +- libstdc++-v3/docs/html/17_intro/headers_cc.txt | 83 - libstdc++-v3/docs/html/17_intro/howto.html | 334 +- libstdc++-v3/docs/html/17_intro/license.html | 4 +- libstdc++-v3/docs/html/17_intro/porting-howto.html | 744 --- libstdc++-v3/docs/html/17_intro/porting.html | 26 +- libstdc++-v3/docs/html/17_intro/tr1_status.html | 2322 ++++++++ libstdc++-v3/docs/html/18_support/howto.html | 2 +- libstdc++-v3/docs/html/19_diagnostics/howto.html | 26 +- libstdc++-v3/docs/html/20_util/allocator.html | 8 +- libstdc++-v3/docs/html/20_util/howto.html | 10 +- libstdc++-v3/docs/html/21_strings/howto.html | 6 +- libstdc++-v3/docs/html/22_locale/codecvt.html | 6 +- libstdc++-v3/docs/html/22_locale/ctype.html | 2 +- libstdc++-v3/docs/html/22_locale/howto.html | 4 +- libstdc++-v3/docs/html/22_locale/messages.html | 6 +- libstdc++-v3/docs/html/23_containers/howto.html | 12 +- libstdc++-v3/docs/html/24_iterators/howto.html | 4 +- libstdc++-v3/docs/html/25_algorithms/howto.html | 2 +- libstdc++-v3/docs/html/26_numerics/howto.html | 4 +- libstdc++-v3/docs/html/27_io/howto.html | 12 +- libstdc++-v3/docs/html/Makefile | 37 - libstdc++-v3/docs/html/abi.html | 991 ---- libstdc++-v3/docs/html/configopts.html | 11 +- libstdc++-v3/docs/html/debug.html | 2 +- libstdc++-v3/docs/html/debug_mode.html | 578 -- libstdc++-v3/docs/html/documentation.html | 334 +- libstdc++-v3/docs/html/explanations.html | 86 - libstdc++-v3/docs/html/ext/ballocator_doc.html | 4 +- libstdc++-v3/docs/html/ext/debug_mode.html | 578 ++ libstdc++-v3/docs/html/ext/howto.html | 8 +- libstdc++-v3/docs/html/ext/mt_allocator.html | 2 +- libstdc++-v3/docs/html/ext/parallel_mode.html | 591 ++ libstdc++-v3/docs/html/ext/sgiexts.html | 10 +- libstdc++-v3/docs/html/ext/tr1.html | 2322 -------- libstdc++-v3/docs/html/faq/index.html | 94 +- libstdc++-v3/docs/html/faq/index.txt | 1118 ---- libstdc++-v3/docs/html/install.html | 16 +- libstdc++-v3/docs/html/makedoc.awk | 69 - libstdc++-v3/docs/html/parallel_mode.html | 591 -- libstdc++-v3/docs/html/test.html | 22 +- 51 files changed, 13940 insertions(+), 13683 deletions(-) delete mode 100644 libstdc++-v3/docs/html/17_intro/BUGS delete mode 100644 libstdc++-v3/docs/html/17_intro/CHECKLIST delete mode 100644 libstdc++-v3/docs/html/17_intro/HEADER_POLICY delete mode 100644 libstdc++-v3/docs/html/17_intro/PROBLEMS delete mode 100644 libstdc++-v3/docs/html/17_intro/RELEASE-NOTES create mode 100644 libstdc++-v3/docs/html/17_intro/abi.html create mode 100644 libstdc++-v3/docs/html/17_intro/api.html create mode 100644 libstdc++-v3/docs/html/17_intro/c++0x_status.html create mode 100644 libstdc++-v3/docs/html/17_intro/c++1998_status.html delete mode 100644 libstdc++-v3/docs/html/17_intro/concept_check.diff delete mode 100644 libstdc++-v3/docs/html/17_intro/headers_cc.txt delete mode 100644 libstdc++-v3/docs/html/17_intro/porting-howto.html create mode 100644 libstdc++-v3/docs/html/17_intro/tr1_status.html delete mode 100644 libstdc++-v3/docs/html/Makefile delete mode 100644 libstdc++-v3/docs/html/abi.html delete mode 100644 libstdc++-v3/docs/html/debug_mode.html delete mode 100644 libstdc++-v3/docs/html/explanations.html create mode 100644 libstdc++-v3/docs/html/ext/debug_mode.html create mode 100644 libstdc++-v3/docs/html/ext/parallel_mode.html delete mode 100644 libstdc++-v3/docs/html/ext/tr1.html delete mode 100644 libstdc++-v3/docs/html/faq/index.txt delete mode 100644 libstdc++-v3/docs/html/makedoc.awk delete mode 100644 libstdc++-v3/docs/html/parallel_mode.html (limited to 'libstdc++-v3/docs/html') diff --git a/libstdc++-v3/docs/html/17_intro/BUGS b/libstdc++-v3/docs/html/17_intro/BUGS deleted file mode 100644 index e71304d..0000000 --- a/libstdc++-v3/docs/html/17_intro/BUGS +++ /dev/null @@ -1,28 +0,0 @@ -2003-04-26 - -- _GLIBCPP_HAS_BUILTIN_SINF: We should still hold out for a cleaner solution the is currenly the case in bits/std_cmath.h. - -- there may be one set of remaining string bugs, dependent on final -clarification of the string::find technicalities when finding in an -empty string or using an empty string for an argument. At the very -least, v-3 has interpreted the standard in a way that is in opposition -to other libraries on other platforms. - -- trigraphs and keywords a la the iso646 header are not correctly -implemented. It looks like the compiler recognizes them as keywords -but then doesn't translate into the correct bit ops. It is a mystery. - -- wide strings have not been tested, and may therefore be unusable. - -- Chapter 27 io functionality is not finished. As such, there are -known bugs in: filebuf::putbackfail - -- Many facet implementations are stubs. (22) - -- Almost no optimizations for small-footprint/low-overhead. (22,27) - -- There has been some work to wrap the C headers in namespace std::, but - it may not be complete yet, and C macros are not shadowed. Please consult - the mailing list archives for more information. - - diff --git a/libstdc++-v3/docs/html/17_intro/CHECKLIST b/libstdc++-v3/docs/html/17_intro/CHECKLIST deleted file mode 100644 index ad02b0d..0000000 --- a/libstdc++-v3/docs/html/17_intro/CHECKLIST +++ /dev/null @@ -1,6002 +0,0 @@ - - Completion Checklist for the Standard C++ Library - Updated: 2003-04-25 - - Status Code Legend: - M - Missing - S - Present as stub. - X - Partially implemented, or buggy. - T - Implemented, pending test/inspection. - V - Verified to pass all available test suites. - Q - Qualified by inspection for non-testable correctness. - P - Portability verified. - C - Certified. - - Lexical notes: - Only status codes appear in column 0. Notes relating to conformance - issues appear [in brackets]. - - Note that this checklist does not (yet) include all emendations - recommended by the ISO Library Working Group: - http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html - - Detailed explanation of status codes: - - M - Missing: The name is not visible to programs that include - the specified header, either at compile or link stage. - - S - Present as stub: A program can use the name, but no implementation - is provided. Programs that use the name link correctly, but - cannot usefully be run. - - X - Partially implemented, or buggy: Some implementation has been - provided, but it is known or believed not to conform fully. - It may have an incorrect base class, wrong namespace, wrong - storage class, or simply not fully implement requirements. - However, it may be sufficiently usable to help test other - components. - - T - Implemented, pending test/inspection: Implementation believed - to be complete, and informal testing suggests it is ready for - formal verification. - - V - Verified, passes all test suites: Verified to satisfy all - generically testable conformance requirements. - - Q - Qualified by inspection for non-testable correctness: - Inspected, "implementation-defined" documentation accepted, - local usability criteria satisfied, formally inspected for - other untestable conformance. (Untestable requirements - include exception-safety, thread-safety, worst-case - complexity, memory cleanliness, usefulness.) - - P - Portability verified: Qualified on all primary target platforms. - - C - Certified: Formally certified to have passed all tests, - inspections, qualifications; approved under "signing authority" - to be used to satisfy contractual guarantees. - - ---------------------------------------------------------------------- - - - -X - - - - - [C header names must be in std:: to qualify. Related to shadow/ dir.] - - -X - - - Macro: -X errno, declared or defined in . - - Macro fn: -X setjmp(jmp_buf), declared or defined in -X va_end(va_list), declared or defined in - - Types: -X clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t, -X ptrdiff_t, sig_atomic_t, size_t, time_t, tm, va_list, -X wctrans_t, wctype_t, and wint_t. - - 1 Which of the functions in the C++ Standard Library are not reentrant - subroutines is implementation-defined. - - 18.1 Types [lib.support.types] -X -X NULL -X offsetof -X ptrdiff_t -X size_t - - 18.2 Implementation properties [lib.support.limits] - - , , and - - 18.2.1 Numeric limits [lib.limits] - -X template class numeric_limits; - -T enum float_round_style; -T enum float_denorm_style; - -T template<> class numeric_limits; - -T template<> class numeric_limits; -T template<> class numeric_limits; -T template<> class numeric_limits; -T template<> class numeric_limits; - -T template<> class numeric_limits; -T template<> class numeric_limits; -T template<> class numeric_limits; -T template<> class numeric_limits; -T template<> class numeric_limits; -T template<> class numeric_limits; - -X template<> class numeric_limits; -X template<> class numeric_limits; -X template<> class numeric_limits; - - 18.2.1.1 Template class numeric_limits [lib.numeric.limits] -T template class numeric_limits { - public: -T static const bool is_specialized = false; -T static T min() throw(); -T static T max() throw(); -T static const int digits = 0; -T static const int digits10 = 0; -T static const bool is_signed = false; -T static const bool is_integer = false; -T static const bool is_exact = false; -T static const int radix = 0; -T static T epsilon() throw(); -T static T round_error() throw(); - -T static const int min_exponent = 0; -T static const int min_exponent10 = 0; -T static const int max_exponent = 0; -T static const int max_exponent10 = 0; - -T static const bool has_infinity = false; -T static const bool has_quiet_NaN = false; -T static const bool has_signaling_NaN = false; -T static const float_denorm_style has_denorm = denorm_absent; -T static const bool has_denorm_loss = false; -T static T infinity() throw(); -T static T quiet_NaN() throw(); -T static T signaling_NaN() throw(); -T static T denorm_min() throw(); - -T static const bool is_iec559 = false; -T static const bool is_bounded = false; -T static const bool is_modulo = false; - -T static const bool traps = false; -T static const bool tinyness_before = false; -T static const float_round_style round_style = round_toward_zero; - }; - - 18.2.1.3 Type float_round_style [lib.round.style] - -T enum float_round_style { -T round_indeterminate = -1, -T round_toward_zero = 0, -T round_to_nearest = 1, -T round_toward_infinity = 2, -T round_toward_neg_infinity = 3 - }; - - 18.2.1.4 Type float_denorm_style [lib.denorm.style] - -T enum float_denorm_style { -T denorm_indeterminate = -1; -T denorm_absent = 0; -T denorm present = 1; - }; - - 18.2.1.5 numeric_limits specializations [lib.numeric.special] - - [Note: see Note at 18.2.1. ] - - 18.2.2 C Library [lib.c.limits] - - 1 Header (Table 3): - CHAR_BIT INT_MAX LONG_MIN SCHAR_MIN UCHAR_MAX USHRT_MAX -X CHAR_MAX INT_MIN MB_LEN_MAX SHRT_MAX UINT_MAX - CHAR_MIN LONG_MAX SCHAR_MAX SHRT_MIN ULONG_MAX - - 3 Header (Table 4): - - DBL_DIG DBL_MIN_EXP FLT_MIN_10_EXP LDBL_MAX_10_EXP - DBL_EPSILON FLT_DIG FLT_MIN_EXP LDBL_MAX_EXP - DBL_MANT_DIG FLT_EPSILON FLT_RADIX LDBL_MIN -X DBL_MAX FLT_MANT_DIG FLT_ROUNDS LDBL_MIN_10_EXP - DBL_MAX_10_EXP FLT_MAX LDBL_DIG LDBL_MIN_EXP - DBL_MAX_EXP FLT_MAX_10_EXP LDBL_EPSILON - DBL_MIN FLT_MAX_EXP LDBL_MANT_DIG - DBL_MIN_10_EXP FLT_MIN LDBL_MAX - - - 1 Header (partial), Table 5: -X EXIT_FAILURE EXIT_SUCCESS - abort atexit exit - -S abort(void) -S extern "C" int atexit(void (*f)(void)) -S extern "C++" int atexit(void (*f)(void)) -S exit(int status) - - 18.4 Dynamic memory management [lib.support.dynamic] - - Header synopsis - -T class bad_alloc; -T struct nothrow_t {}; -T extern const nothrow_t nothrow; -T typedef void (*new_handler)(); -T new_handler set_new_handler(new_handler new_p) throw(); - -T void* operator new(std::size_t size) throw(std::bad_alloc); -T void* operator new(std::size_t size, const std::nothrow_t&) throw(); -T void operator delete(void* ptr) throw(); -T void operator delete(void* ptr, const std::nothrow_t&) throw(); -T void* operator new[](std::size_t size) throw(std::bad_alloc); -T void* operator new[](std::size_t size, const std::nothrow_t&) throw(); -T void operator delete[](void* ptr) throw(); -T void operator delete[](void* ptr, const std::nothrow_t&) throw(); -T void* operator new (std::size_t size, void* ptr) throw(); -T void* operator new[](std::size_t size, void* ptr) throw(); -T void operator delete (void* ptr, void*) throw(); -T void operator delete[](void* ptr, void*) throw(); - - 18.4.2.1 Class bad_alloc [lib.bad.alloc] - -T class bad_alloc : public exception { - public: -T bad_alloc() throw(); -T bad_alloc(const bad_alloc&) throw(); -T bad_alloc& operator=(const bad_alloc&) throw(); -T virtual ~bad_alloc() throw(); -T virtual const char* what() const throw(); - - - -T new_handler set_new_handler(new_handler new_p) throw(); - - - Header synopsis - -T class type_info; -T class bad_cast; -T class bad_typeid; - - 18.5.1 - Class type_info [lib.type.info] - -T class type_info { - public: -T virtual ~type_info(); -T bool operator==(const type_info& rhs) const; -T bool operator!=(const type_info& rhs) const; -T bool before(const type_info& rhs) const; -T const char* name() const; - private: -T type_info(const type_info& rhs); -T type_info& operator=(const type_info& rhs); - }; - - 18.5.2 - Class bad_cast [lib.bad.cast] - -T bad_cast() throw(); -T virtual const char* bad_cast::what() const throw(); - - 18.5.3 Class bad_typeid [lib.bad.typeid] - -T class bad_typeid : public exception { - public: -T bad_typeid() throw(); -T bad_typeid(const bad_typeid&) throw(); -T bad_typeid& operator=(const bad_typeid&) throw(); -T virtual ~bad_typeid() throw(); -T virtual const char* what() const throw(); - }; - - 18.6 Exception handling [lib.support.exception] - -T Header synopsis - -T class exception; -T class bad_exception; - -T typedef void (*unexpected_handler)(); -T unexpected_handler set_unexpected(unexpected_handler f) throw(); -T void unexpected(); -T typedef void (*terminate_handler)(); -T terminate_handler set_terminate(terminate_handler f) throw(); -T void terminate(); -T bool uncaught_exception(); - - 18.6.1 Class exception [lib.exception] - -T class exception { - public: -T exception() throw(); -T exception(const exception&) throw(); -T exception& operator=(const exception&) throw(); -T virtual ~exception() throw(); -T virtual const char* what() const throw(); - }; - - 18.6.2.1 Class bad_exception [lib.bad.exception] -T class bad_exception : public exception { - public: -T bad_exception() throw(); -T bad_exception(const bad_exception&) throw(); -T bad_exception& operator=(const bad_exception&) throw(); -T virtual ~bad_exception() throw(); -T virtual const char* what() const throw(); - }; - - 18.7 Other runtime support [lib.support.runtime] - - 1 Headers (variable arguments), (nonlocal jumps), - (system clock clock(), time()), (signal handling), - and (runtime environment getenv(), system()). - - Table 6--Header synopsis - Macros: va_arg va_end va_start -X Type: va_list - - Table 7--Header synopsis - - Macro: setjmp | -X Type: jmp_buf - Function: longjmp - - Table 8--Header synopsis - - Macros: CLOCKS_PER_SEC -X Types: clock_t - Functions: clock - - Table 9--Header synopsis - -X Macros: SIGABRT SIGILL SIGSEGV SIG_DFL - SIG_IGN SIGFPE SIGINT SIGTERM SIG_ERR - Type: sig_atomic_t - Functions: raise signal - - Table 10--Header synopsis - -X Functions: getenv system - - 19.1 Exception classes [lib.std.exceptions] - - Header synopsis - -T class logic_error; -T class domain_error; -T class invalid_argument; -T class length_error; -T class out_of_range; -T class runtime_error; -T class range_error; -T class overflow_error; -T class underflow_error; - - 19.1.1 Class logic_error [lib.logic.error] -T class logic_error : public exception { - public: -T explicit logic_error(const string& what_arg); - }; - - 19.1.2 Class domain_error [lib.domain.error] - -T class domain_error : public logic_error { - public: -T explicit domain_error(const string& what_arg); - }; - - 19.1.3 Class invalid_argument [lib.invalid.argument] - -T class invalid_argument : public logic_error { - public: -T explicit invalid_argument(const string& what_arg); - }; - - 19.1.4 Class length_error [lib.length.error] - -T class length_error : public logic_error { - public: -T explicit length_error(const string& what_arg); - }; - - 19.1.5 Class out_of_range [lib.out.of.range] - -T class out_of_range : public logic_error { - public: -T explicit out_of_range(const string& what_arg); - }; - - - 19.1.6 Class runtime_error [lib.runtime.error] - -T class runtime_error : public exception { - public: -T explicit runtime_error(const string& what_arg); - }; - - - 19.1.7 Class range_error [lib.range.error] - -T class range_error : public runtime_error { - public: -T explicit range_error(const string& what_arg); - }; - - 19.1.8 Class overflow_error [lib.overflow.error] - -T class overflow_error : public runtime_error { - public: -T explicit overflow_error(const string& what_arg); - }; - - - 19.1.9 Class underflow_error [lib.underflow.error] - -T class underflow_error : public runtime_error { - public: -T explicit underflow_error(const string& what_arg); - }; - - - 19.2 Assertions [lib.assertions] - - Table 2--Header synopsis - -X Macro: assert - - 19.3 Error numbers [lib.errno] - - Table 3--Header synopsis - -X |Macros: EDOM ERANGE errno | - - - 20.2 Utility components [lib.utility] - - Header synopsis - - // _lib.operators_, operators: -T namespace rel_ops { -T template bool operator!=(const T&, const T&); -T template bool operator> (const T&, const T&); -T template bool operator<=(const T&, const T&); -T template bool operator>=(const T&, const T&); - } - // _lib.pairs_, pairs: -T template struct pair; -T template - bool operator==(const pair&, const pair&); -T template - bool operator< (const pair&, const pair&); -T template - bool operator!=(const pair&, const pair&); -T template - bool operator> (const pair&, const pair&); -T template - bool operator>=(const pair&, const pair&); -T template - bool operator<=(const pair&, const pair&); -T template pair make_pair(const T1&, const T2&); - - - 20.2.2 Pairs [lib.pairs] - -T template - struct pair { -T typedef T1 first_type; -T typedef T2 second_type; - -T T1 first; -T T2 second; -T pair(); -T pair(const T1& x, const T2& y); -T template pair(const pair &p); - }; - - 20.3 Function objects [lib.function.objects] - - Header synopsis - - // _lib.base_, base: -V template struct unary_function; -V template struct binary_function; - - // _lib.arithmetic.operations_, arithmetic operations: -V template struct plus; -V template struct minus; -V template struct multiplies; -V template struct divides; -V template struct modulus; -V template struct negate; - // _lib.comparisons_, comparisons: -V template struct equal_to; -V template struct not_equal_to; -V template struct greater; -V template struct less; -V template struct greater_equal; -V template struct less_equal; - // _lib.logical.operations_, logical operations: -V template struct logical_and; -V template struct logical_or; -V template struct logical_not; - // _lib.negators_, negators: - template struct unary_negate; -V template - unary_negate not1(const Predicate&); -V template struct binary_negate; -V template - binary_negate not2(const Predicate&); - // _lib.binders_, binders: -V template class binder1st; -V template - binder1st bind1st(const Operation&, const T&); -V template class binder2nd; -V template - binder2nd bind2nd(const Operation&, const T&); - // _lib.function.pointer.adaptors_, adaptors: -V template class pointer_to_unary_function; -V template - pointer_to_unary_function ptr_fun(Result (*)(Arg)); -V template - class pointer_to_binary_function; -V template - pointer_to_binary_function - ptr_fun(Result (*)(Arg1,Arg2)); - - // _lib.member.pointer.adaptors_, adaptors: -V template class mem_fun_t; -V template class mem_fun1_t; -V template - mem_fun_t mem_fun(S (T::*f)()); -V template - mem_fun1_t mem_fun(S (T::*f)(A)); -V template class mem_fun_ref_t; -V template class mem_fun1_ref_t; -V template - mem_fun_ref_t mem_fun_ref(S (T::*f)()); -V template - mem_fun1_ref_t mem_fun_ref(S (T::*f)(A)); - -V template class const_mem_fun_t; -V template class const_mem_fun1_t; -V template - const_mem_fun_t mem_fun(S (T::*f)() const); -V template - const_mem_fun1_t mem_fun(S (T::*f)(A) const); -V template class const_mem_fun_ref_t; -V template class const_mem_fun1_ref_t; -V template - const_mem_fun_ref_t mem_fun_ref(S (T::*f)() const); -V template - const_mem_fun1_ref_t mem_fun_ref(S (T::*f)(A) const); - } - - 20.3.1 Base [lib.base] - -V template - struct unary_function { -V typedef Arg argument_type; -V typedef Result result_type; - }; -V template - struct binary_function { -V typedef Arg1 first_argument_type; -V typedef Arg2 second_argument_type; -V typedef Result result_type; - }; - - 20.3.2 Arithmetic operations [lib.arithmetic.operations] - -T template struct plus : binary_function { -V T operator()(const T& x, const T& y) const; - }; - -T template struct minus : binary_function { -V T operator()(const T& x, const T& y) const; - }; - -T template struct multiplies : binary_function { -V T operator()(const T& x, const T& y) const; - }; - -T template struct divides : binary_function { -V T operator()(const T& x, const T& y) const; - }; - -T template struct modulus : binary_function { -V T operator()(const T& x, const T& y) const; - }; - -T template struct negate : unary_function { -V T operator()(const T& x) const; - }; - - 20.3.3 Comparisons [lib.comparisons] - -T template struct equal_to : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct not_equal_to : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct greater : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct less : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct greater_equal : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct less_equal : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - - 20.3.4 Logical operations [lib.logical.operations] - -T template struct logical_and : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct logical_or : binary_function { -V bool operator()(const T& x, const T& y) const; - }; - -T template struct logical_not : unary_function { -V bool operator()(const T& x) const; - }; - - 20.3.5 Negators [lib.negators] - -T template - class unary_negate - : public unary_function { - public: -T explicit unary_negate(const Predicate& pred); -V bool operator()(const typename Predicate::argument_type& x) const; - }; - -T template - class binary_negate - : public binary_function { - public: -T explicit binary_negate(const Predicate& pred); -V bool operator()(const typename Predicate::first_argument_type& x, - const typename Predicate::second_argument_type& y) const; - }; - - - 20.3.6 Binders [lib.binders] - - 20.3.6.1 Template class binder1st [lib.binder.1st] -T template - class binder1st - : public unary_function { - protected: -T Operation op; -T typename Operation::first_argument_type value; - public: -V binder1st(const Operation& x, - const typename Operation::first_argument_type& y); -V typename Operation::result_type - operator()(const typename Operation::second_argument_type& x) const; - }; - - 20.3.6.2 bind1st [lib.bind.1st] - -V template - binder1st bind1st(const Operation& op, const T& x); - - 20.3.6.3 Template class binder2nd [lib.binder.2nd] -T template - class binder2nd - : public unary_function { - protected: -T Operation op; -T typename Operation::second_argument_type value; - public: -V binder2nd(const Operation& x, - const typename Operation::second_argument_type& y); -V typename Operation::result_type - operator()(const typename Operation::first_argument_type& x) const; - }; - - 20.3.6.4 bind2nd [lib.bind.2nd] - -T template - binder2nd bind2nd(const Operation& op, const T& x); - - - 20.3.7 Adaptors for pointers to [lib.function.pointer.adaptors] - functions - - 1 To allow pointers to (unary and binary) functions to work with func- - tion adaptors the library provides: - -T template - class pointer_to_unary_function : public unary_function { - public: -T explicit pointer_to_unary_function(Result (*f)(Arg)); -V Result operator()(Arg x) const; - }; - -T template - pointer_to_unary_function ptr_fun(Result (*f)(Arg)); - -T template - class pointer_to_binary_function : - public binary_function { - public: -T explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2)); -V Result operator()(Arg1 x, Arg2 y) const; - }; - - - 20.3.8 Adaptors for pointers to [lib.member.pointer.adaptors] - members - -T template class mem_fun_t - : public unary_function { - public: -T explicit mem_fun_t(S (T::*p)()); -V S operator()(T* p) const; - }; - -T template class mem_fun1_t - : public binary_function { - public: -T explicit mem_fun1_t(S (T::*p)(A)); -V S operator()(T* p, A x) const; - }; - -V template mem_fun_t - mem_fun(S (T::*f)()); -V template mem_fun1_t - mem_fun(S (T::*f)(A)); - -T template class mem_fun_ref_t - : public unary_function { - public: -T explicit mem_fun_ref_t(S (T::*p)()); -V S operator()(T& p) const; - }; - -T template class mem_fun1_ref_t - : public binary_function { - public: -T explicit mem_fun1_ref_t(S (T::*p)(A)); -V S operator()(T& p, A x) const; - }; - -T template mem_fun_ref_t - mem_fun_ref(S (T::*f)()); - -T template mem_fun1_ref_t - mem_fun_ref(S (T::*f)(A)); - -T template class const_mem_fun_t - : public unary_function { - public: -T explicit const_mem_fun_t(S (T::*p)() const); -V S operator()(const T* p) const; - }; - -T template class const_mem_fun1_t - : public binary_function { - public: -T explicit const mem_fun1_t(S (T::*p)(A) const); -V S operator()(const T* p, A x) const; - }; - -V template const_mem_fun_t - mem_fun(S (T::*f)() const); -V template const_mem_fun1_t - mem_fun(S (T::*f)(A) const); - -T template class const_mem_fun_ref_t - : public unary_function { - public: -T explicit const_mem_fun_ref_t(S (T::*p)() const); -V S operator()(const T& p) const; - }; - -T template class const_mem_fun1_ref_t - : public binary_function { - public: -T explicit const_mem_fun1_ref_t(S (T::*p)(A) const); -V S operator()(const T& p, A x) const; - }; - -T template const_mem_fun_ref_t - mem_fun_ref(S (T::*f)() const); - -T template const_mem_fun1_ref_t - mem_fun_ref(S (T::*f)(A) const); - - 20.4 Memory [lib.memory] - - Header synopsis - - // _lib.default.allocator_, the default allocator: -T template class allocator; -T template <> class allocator; -T template - bool operator==(const allocator&, const allocator&) throw(); -T template - bool operator!=(const allocator&, const allocator&) throw(); - // _lib.storage.iterator_, raw storage iterator: -T template class raw_storage_iterator; - // _lib.temporary.buffer_, temporary buffers: -T template - pair get_temporary_buffer(ptrdiff_t n); -T template - void return_temporary_buffer(T* p); - // _lib.specialized.algorithms_, specialized algorithms: -T template - ForwardIterator - uninitialized_copy(InputIterator first, InputIterator last, - ForwardIterator result); -T template - void uninitialized_fill(ForwardIterator first, ForwardIterator last, - const T& x); -T template - void uninitialized_fill_n(ForwardIterator first, Size n, const T& x); - // _lib.auto.ptr_, pointers: -X template class auto_ptr; - } - - 20.4.1 The default allocator [lib.default.allocator] - -T template class allocator; - // specialize for void: -T template <> class allocator { - public: -T typedef void* pointer; -T typedef const void* const_pointer; - // reference-to-void members are impossible. -T typedef void value_type; -T template struct rebind { typedef allocator other; }; - }; - -T template class allocator { - public: -T typedef size_t size_type; -T typedef ptrdiff_t difference_type; -T typedef T* pointer; -T typedef const T* const_pointer; -T typedef T& reference; -T typedef const T& const_reference; -T typedef T value_type; -T template struct rebind { typedef allocator other; }; -T allocator() throw(); -T allocator(const allocator&) throw(); -T template allocator(const allocator&) throw(); -T ~allocator() throw(); -T pointer address(reference x) const; -T const_pointer address(const_reference x) const; -T pointer allocate( - size_type, allocator::const_pointer hint = 0); -T void deallocate(pointer p, size_type n); -T size_type max_size() const throw(); -T void construct(pointer p, const T& val); -T void destroy(pointer p); - }; - - 20.4.1.2 allocator globals [lib.allocator.globals] - -T template - bool operator==(const allocator&, const allocator&) throw(); -T template - bool operator!=(const allocator&, const allocator&) throw(); - - 20.4.2 Raw storage iterator [lib.storage.iterator] - -T template - class raw_storage_iterator - : public iterator { - public: -T explicit raw_storage_iterator(OutputIterator x); -T raw_storage_iterator& operator*(); -T raw_storage_iterator& operator=(const T& element); -T raw_storage_iterator& operator++(); -T raw_storage_iterator operator++(int); - }; - - 20.4.3 Temporary buffers [lib.temporary.buffer] - -T template - pair get_temporary_buffer(ptrdiff_t n); - -T template void return_temporary_buffer(T* p); - - 20.4.4 Specialized algorithms [lib.specialized.algorithms] - - 20.4.4.1 uninitialized_copy [lib.uninitialized.copy] - -V template - ForwardIterator - uninitialized_copy(InputIterator first, InputIterator last, - ForwardIterator result); - - 20.4.4.2 uninitialized_fill [lib.uninitialized.fill] - -V template - void uninitialized_fill(ForwardIterator first, ForwardIterator last, - const T& x); - - 20.4.4.3 uninitialized_fill_n [lib.uninitialized.fill.n] - -V template - void uninitialized_fill_n(ForwardIterator first, Size n, const T& x); - - 20.4.5 Template class auto_ptr [lib.auto.ptr] - -X template class auto_ptr { - template struct auto_ptr_ref {}; - public: -T typedef X element_type; - // _lib.auto.ptr.cons_ construct/copy/destroy: -T explicit auto_ptr(X* p =0) throw(); -T auto_ptr(auto_ptr&) throw(); -T template auto_ptr(auto_ptr&) throw(); -T auto_ptr& operator=(auto_ptr&) throw(); -T template auto_ptr& operator=(auto_ptr&) throw(); -T ~auto_ptr() throw(); - // _lib.auto.ptr.members_ members: -T X& operator*() const throw(); -T X* operator->() const throw(); -T X* get() const throw(); -T X* release() throw(); -T void reset(X* p =0) throw(); - - // _lib.auto.ptr.conv_ conversions: -X auto_ptr(auto_ptr_ref) throw(); -X template operator auto_ptr_ref() throw(); -X template operator auto_ptr() throw(); - }; - - 20.4.6 C Library [lib.c.malloc] - - Table 7--Header synopsis - -X Functions: calloc malloc - free realloc - - - Table 8--Header synopsis - -X Macro: NULL -X Type: size_t -X Functions: memchr memcmp -X memcpy memmove memset - - Table 9--Header synopsis - -X Macros: NULL -X Types: size_t clock_t time_t -X Struct: tm - Functions: -X asctime clock difftime localtime strftime -X ctime gmtime mktime time - - 21.1.1 Character traits requirements [lib.char.traits.require] - - 2 The struct template -T template struct char_traits; - shall be provided in the header as a basis for explicit spe- - cializations. - - - 21.1.3.1 struct [lib.char.traits.specializations.char] - char_traits - -T template<> - struct char_traits { -T typedef char char_type; -T typedef int int_type; -T typedef streamoff off_type; -T typedef streampos pos_type; -T typedef mbstate_t state_type; - -T static void assign(char_type& c1, const char_type& c2); -T static bool eq(const char_type& c1, const char_type& c2); -T static bool lt(const char_type& c1, const char_type& c2); - -T static int compare(const char_type* s1, const char_type* s2, size_t n); -T static size_t length(const char_type* s); -T static const char_type* find(const char_type* s, size_t n, - const char_type& a); -T static char_type* move(char_type* s1, const char_type* s2, size_t n); -T static char_type* copy(char_type* s1, const char_type* s2, size_t n); -T static char_type* assign(char_type* s, size_t n, char_type a); - -T static int_type not_eof(const int_type& c); -T static char_type to_char_type(const int_type& c); -T static int_type to_int_type(const char_type& c); -T static bool eq_int_type(const int_type& c1, const int_type& c2); -T static int_type eof(); - }; - - 21.1.3.2 struct [lib.char.traits.specializations.wchar.t] - char_traits - -V template<> - struct char_traits { -V typedef wchar_t char_type; -V typedef wint_t int_type; -V typedef streamoff off_type; -V typedef wstreampos pos_type; -V typedef mbstate_t state_type; - -V static void assign(char_type& c1, const char_type& c2); -V static bool eq(const char_type& c1, const char_type& c2); -V static bool lt(const char_type& c1, const char_type& c2); - -V static int compare(const char_type* s1, const char_type* s2, size_t n); -V static size_t length(const char_type* s); -V static const char_type* find(const char_type* s, size_t n, - const char_type& a); -V static char_type* move(char_type* s1, const char_type* s2, size_t n); -V static char_type* copy(char_type* s1, const char_type* s2, size_t n); -V static char_type* assign(char_type* s, size_t n, char_type a); - -V static int_type not_eof(const int_type& c); -V static char_type to_char_type(const int_type& c); -V static int_type to_int_type(const char_type& c); -V static bool eq_int_type(const int_type& c1, const int_type& c2); -V static int_type eof(); - }; - - 21.2 String classes [lib.string.classes] - - // _lib.char.traits_, character traits: -V template - struct char_traits; -V template <> struct char_traits; -V template <> struct char_traits; - - // _lib.basic.string_, basic_string: -V template, - class Allocator = allocator > - class basic_string; -V template - basic_string - operator+(const basic_string& lhs, - const basic_string& rhs); -V template - basic_string - operator+(const charT* lhs, - const basic_string& rhs); -V template - basic_string - operator+(charT lhs, const basic_string& rhs); -V template - basic_string - operator+(const basic_string& lhs, - const charT* rhs); -V template - basic_string - operator+(const basic_string& lhs, charT rhs); - -V template - bool operator==(const basic_string& lhs, - const basic_string& rhs); -V template - bool operator==(const charT* lhs, - const basic_string& rhs); -V template - bool operator==(const basic_string& lhs, - const charT* rhs); -V template - bool operator!=(const basic_string& lhs, - const basic_string& rhs); -V template - bool operator!=(const charT* lhs, - const basic_string& rhs); -V template - bool operator!=(const basic_string& lhs, - const charT* rhs); -V template - bool operator< (const basic_string& lhs, - const basic_string& rhs); -V template - bool operator< (const basic_string& lhs, - const charT* rhs); -V template - bool operator< (const charT* lhs, - const basic_string& rhs); -V template - bool operator> (const basic_string& lhs, - const basic_string& rhs); -V template - bool operator> (const basic_string& lhs, - const charT* rhs); -V template - bool operator> (const charT* lhs, - const basic_string& rhs); -V template - bool operator<=(const basic_string& lhs, - const basic_string& rhs); -V template - bool operator<=(const basic_string& lhs, - const charT* rhs); -V template - bool operator<=(const charT* lhs, - const basic_string& rhs); -V template - bool operator>=(const basic_string& lhs, - const basic_string& rhs); -V template - bool operator>=(const basic_string& lhs, - const charT* rhs); -V template - bool operator>=(const charT* lhs, - const basic_string& rhs); - - // _lib.string.special_: -V template - void swap(basic_string& lhs, - basic_string& rhs); -V template - basic_istream& - operator>>(basic_istream& is, - basic_string& str); -T template - basic_ostream& - operator<<(basic_ostream& os, - const basic_string& str); -V template - basic_istream& - getline(basic_istream& is, - basic_string& str, - charT delim); -V template - basic_istream& - getline(basic_istream& is, - basic_string& str); -V typedef basic_string string; -T typedef basic_string wstring; - } - - 21.3 Template class basic_string [lib.basic.string] - -V namespace std { - template, - class Allocator = allocator > - class basic_string { - public: - // types: - typedef traits traits_type; - typedef typename traits::char_type value_type; - typedef Allocator allocator_type; - typedef typename Allocator::size_type size_type; - typedef typename Allocator::difference_type difference_type; - typedef typename Allocator::reference reference; - typedef typename Allocator::const_reference const_reference; - typedef typename Allocator::pointer pointer; - typedef typename Allocator::const_pointer const_pointer; - typedef implementation defined iterator; - typedef implementation defined const_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; - static const size_type npos = -1; - - // _lib.string.cons_ construct/copy/destroy: -V explicit basic_string(const Allocator& a = Allocator()); -V basic_string(const basic_string& str, size_type pos = 0, - size_type n = npos, const Allocator& a = Allocator()); -V basic_string(const charT* s, - size_type n, const Allocator& a = Allocator()); -V basic_string(const charT* s, const Allocator& a = Allocator()); -V basic_string(size_type n, charT c, const Allocator& a = Allocator()); -V template - basic_string(InputIterator begin, InputIterator end, - const Allocator& a = Allocator()); -V ~basic_string(); -V basic_string& operator=(const basic_string& str); -V basic_string& operator=(const charT* s); -V basic_string& operator=(charT c); - // _lib.string.iterators_ iterators: -V iterator begin(); -V const_iterator begin() const; -V iterator end(); -V const_iterator end() const; - -V reverse_iterator rbegin(); -V const_reverse_iterator rbegin() const; -V reverse_iterator rend(); -V const_reverse_iterator rend() const; - // _lib.string.capacity_ capacity: -V size_type size() const; -V size_type length() const; -V size_type max_size() const; -V void resize(size_type n, charT c); -V void resize(size_type n); -V size_type capacity() const; -V void reserve(size_type res_arg = 0); -V void clear(); -V bool empty() const; - // _lib.string.access_ element access: -V const_reference operator[](size_type pos) const; -V reference operator[](size_type pos); -V const_reference at(size_type n) const; -V reference at(size_type n); - // _lib.string.modifiers_ modifiers: -V basic_string& operator+=(const basic_string& str); -V basic_string& operator+=(const charT* s); -V basic_string& operator+=(charT c); -V basic_string& append(const basic_string& str); -V basic_string& append(const basic_string& str, size_type pos, - size_type n); -V basic_string& append(const charT* s, size_type n); -V basic_string& append(const charT* s); -V basic_string& append(size_type n, charT c); -V template - basic_string& append(InputIterator first, InputIterator last); -V void push_back(const charT); - -V basic_string& assign(const basic_string&); -V basic_string& assign(const basic_string& str, size_type pos, - size_type n); -V basic_string& assign(const charT* s, size_type n); -V basic_string& assign(const charT* s); -V basic_string& assign(size_type n, charT c); -V template - basic_string& assign(InputIterator first, InputIterator last); -V basic_string& insert(size_type pos1, const basic_string& str); -V basic_string& insert(size_type pos1, const basic_string& str, - size_type pos2, size_type n); -V basic_string& insert(size_type pos, const charT* s, size_type n); -V basic_string& insert(size_type pos, const charT* s); -V basic_string& insert(size_type pos, size_type n, charT c); -V iterator insert(iterator p, charT c); -V void insert(iterator p, size_type n, charT c); -V template - void insert(iterator p, InputIterator first, InputIterator last); -V basic_string& erase(size_type pos = 0, size_type n = npos); -V iterator erase(iterator position); -V iterator erase(iterator first, iterator last); -V basic_string& replace(size_type pos1, size_type n1, - const basic_string& str); -V basic_string& replace(size_type pos1, size_type n1, - const basic_string& str, - size_type pos2, size_type n2); -V basic_string& replace(size_type pos, size_type n1, const charT* s, - size_type n2); -V basic_string& replace(size_type pos, size_type n1, const charT* s); -V basic_string& replace(size_type pos, size_type n1, size_type n2, - charT c); -V basic_string& replace(iterator i1, iterator i2, const basic_string& str); -V basic_string& replace(iterator i1, iterator i2, const charT* s, - size_type n); -V basic_string& replace(iterator i1, iterator i2, const charT* s); -V basic_string& replace(iterator i1, iterator i2, - size_type n, charT c); -V template - basic_string& replace(iterator i1, iterator i2, - InputIterator j1, InputIterator j2); -V size_type copy(charT* s, size_type n, size_type pos = 0) const; -V void swap(basic_string&); - // _lib.string.ops_ string operations: -V const charT* c_str() const; // explicit -V const charT* data() const; -V allocator_type get_allocator() const; -V size_type find (const basic_string& str, size_type pos = 0) const; -V size_type find (const charT* s, size_type pos, size_type n) const; -V size_type find (const charT* s, size_type pos = 0) const; -V size_type find (charT c, size_type pos = 0) const; -V size_type rfind(const basic_string& str, size_type pos = npos) const; -V size_type rfind(const charT* s, size_type pos, size_type n) const; -V size_type rfind(const charT* s, size_type pos = npos) const; -V size_type rfind(charT c, size_type pos = npos) const; - -V size_type find_first_of(const basic_string& str, - size_type pos = 0) const; -V size_type find_first_of(const charT* s, - size_type pos, size_type n) const; -V size_type find_first_of(const charT* s, size_type pos = 0) const; -V size_type find_first_of(charT c, size_type pos = 0) const; -V size_type find_last_of (const basic_string& str, - size_type pos = npos) const; -V size_type find_last_of (const charT* s, - size_type pos, size_type n) const; -V size_type find_last_of (const charT* s, size_type pos = npos) const; -V size_type find_last_of (charT c, size_type pos = npos) const; -V size_type find_first_not_of(const basic_string& str, - size_type pos = 0) const; -V size_type find_first_not_of(const charT* s, size_type pos, - size_type n) const; -V size_type find_first_not_of(const charT* s, size_type pos = 0) const; -V size_type find_first_not_of(charT c, size_type pos = 0) const; -V size_type find_last_not_of (const basic_string& str, - size_type pos = npos) const; -V size_type find_last_not_of (const charT* s, size_type pos, - size_type n) const; -V size_type find_last_not_of (const charT* s, - size_type pos = npos) const; -V size_type find_last_not_of (charT c, size_type pos = npos) const; -V basic_string substr(size_type pos = 0, size_type n = npos) const; -V int compare(const basic_string& str) const; -V int compare(size_type pos1, size_type n1, - const basic_string& str) const; -V int compare(size_type pos1, size_type n1, - const basic_string& str, - size_type pos2, size_type n2) const; -V int compare(const charT* s) const; -V int compare(size_type pos1, size_type n1, - const charT* s, size_type n2 = npos) const; - }; - } - - 21.4 Null-terminated sequence utilities [lib.c.strings] - - Table 10--Header synopsis - - isalnum isdigit isprint isupper tolower -X isalpha isgraph ispunct isxdigit toupper - iscntrl islower isspace - - Table 11--Header synopsis - -X Macro: WEOF -X Types: wctrans_t wctype_t wint_t - Functions: -X iswalnum iswctype iswlower iswspace towctrans wctrans -X iswalpha iswdigit iswprint iswupper towlower wctype -X iswcntrl iswgraph iswpunct iswxdigit towupper - - Table 12--Header synopsis - -X Macro: NULL -X Type: size_t - Functions: -X memchr strcat strcspn strncpy strtok -X memcmp strchr strerror strpbrk strxfrm -X memcpy strcmp strlen strrchr -X memmove strcoll strncat strspn -X memset strcpy strncmp strstr - - Table 13--Header synopsis - Macros: NULL WCHAR_MAX WCHAR_MIN WEOF - Types: mbstate_t wint_t size_t - Functions: -X btowc getwchar ungetwc wcscpy wcsrtombs wmemchr -X fgetwc mbrlen vfwprintf wcscspn wcsspn wmemcmp -X fgetws mbrtowc vswprintf wcsftime wcsstr wmemcpy -X fputwc mbsinit vwprintf wcslen wcstod wmemmove -X fputws mbsrtowcs wcrtomb wcsncat wcstok wmemset -X fwide putwc wcscat wcsncmp wcstol wprintf -X fwprintf putwchar wcschr wcsncpy wcstoul wscanf -X fwscanf swprintf wcscmp wcspbrk wcsxfrm -X getwc swscanf wcscoll wcsrchr wctob - - Table 14--Header synopsis - - Macros: MB_CUR_MAX - Functions: -X atol mblen strtod wctomb -X atof mbstowcs strtol wcstombs -X atoi mbtowc strtoul - -X const char* strchr(const char* s, int c); -X char* strchr( char* s, int c); - -X const char* strpbrk(const char* s1, const char* s2); -X char* strpbrk( char* s1, const char* s2); - -X const char* strrchr(const char* s, int c); -X char* strrchr( char* s, int c); - -X const char* strstr(const char* s1, const char* s2); -X char* strstr( char* s1, const char* s2); - -X const void* memchr(const void* s, int c, size_t n); -X void* memchr( void* s, int c, size_t n); - -X const wchar_t* wcschr(const wchar_t* s, wchar_t c); -X wchar_t* wcschr( wchar_t* s, wchar_t c); - -X const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2); -X wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2); - -X const wchar_t* wcsrchr(const wchar_t* s, wchar_t c); -X wchar_t* wcsrchr( wchar_t* s, wchar_t c); - -X const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2); -X wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2); - -X const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n); -X wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n); - - [for initial efforts on the above, see shadow/string.h] - - 22.1 Locales [lib.locales] - - Header synopsis - - // _lib.locale_, locale: -T class locale; -T template const Facet& use_facet(const locale&); -T template bool has_facet(const locale&) throw(); - - // _lib.locale.convenience_, convenience interfaces: -T template bool isspace (charT c, const locale& loc); -T template bool isprint (charT c, const locale& loc); -T template bool iscntrl (charT c, const locale& loc); -T template bool isupper (charT c, const locale& loc); -T template bool islower (charT c, const locale& loc); -T template bool isalpha (charT c, const locale& loc); -T template bool isdigit (charT c, const locale& loc); -T template bool ispunct (charT c, const locale& loc); -T template bool isxdigit(charT c, const locale& loc); -T template bool isalnum (charT c, const locale& loc); -T template bool isgraph (charT c, const locale& loc); -T template charT toupper(charT c, const locale& loc); -T template charT tolower(charT c, const locale& loc); - // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype: - class ctype_base; -T template class ctype; -T template <> class ctype; // specialization -S template class ctype_byname; -S template <> class ctype_byname; // specialization -T class codecvt_base; -X template class codecvt; -S template class codecvt_byname; - // _lib.category.numeric_ and _lib.facet.numpunct_, numeric: -X template class num_get; -X template class num_put; -T template class numpunct; -S template class numpunct_byname; - // _lib.category.collate_, collation: -T template class collate; -S template class collate_byname; - // _lib.category.time_, date and time: -T class time_base; -S template class time_get; -S template class time_get_byname; -S template class time_put; -S template class time_put_byname; - // _lib.category.monetary_, money: -T class money_base; -S template class money_get; -S template class money_put; -S template class moneypunct; -S template class moneypunct_byname; - // _lib.category.messages_, message retrieval: -T class messages_base; -S template class messages; -S template class messages_byname; - - - 22.1.1 Class locale [lib.locale] - -X class locale { - public: - // types: -T class facet; -T class id; -T typedef int category; -T static const category // values assigned here are for exposition only -T none = 0, -T collate = 0x010, ctype = 0x020, -T monetary = 0x040, numeric = 0x080, -T time = 0x100, messages = 0x200, -T all = collate | ctype | monetary | numeric | time | messages; - // construct/copy/destroy: -T locale() throw() -T locale(const locale& other) throw() -X explicit locale(const char* std_name); -X locale(const locale& other, const char* std_name, category); -T template locale(const locale& other, Facet* f); -T locale(const locale& other, const locale& one, category); -T ~locale() throw(); // non-virtual -T const locale& operator=(const locale& other) throw(); -T template locale combine(const locale& other) const; - // locale operations: -X basic_string name() const; -T bool operator==(const locale& other) const; -T bool operator!=(const locale& other) const; -T template - bool operator()(const basic_string& s1, - const basic_string& s2) const; - // global locale objects: -T static locale global(const locale&); -T static const locale& classic(); - }; - - 22.1.1.1 locale types [lib.locale.types] - - 22.1.1.1.1 Type locale::category [lib.locale.category] - -T typedef int category; - -T none, collate, ctype, monetary, numeric, time, and messages - - [required locale members] -T collate, collate -T ctype, ctype -T codecvt, -S codecvt -T moneypunct, moneypunct -T moneypunct, moneypunct, -S money_get, money_get, money_put -T numpunct, numpunct, -X num_get, num_get -X num_put, num_put -S time_get, time_get, -S time_put, time_put -S messages, messages - - [required instantiations] -S collate_byname, collate_byname -S ctype_byname, ctype_byname -S codecvt_byname, -S codecvt_byname -S moneypunct_byname, -S moneypunct_byname, -S money_get, -S money_put -S numpunct_byname, numpunct_byname -X num_get, num_put -S time_get, -S time_get_byname, -S time_get, -S time_get_byname, -S time_put, -S time_put_byname, -S time_put -S time_put_byname -S messages_byname, messages_byname - - - 22.1.1.1.2 Class locale::facet [lib.locale.facet] - -T class locale::facet { - protected: -T explicit facet(size_t refs = 0); -T virtual ~facet(); - private: -T facet(const facet&); // not defined -T void operator=(const facet&); // not defined - }; - } - - - 22.1.1.1.3 Class locale::id [lib.locale.id] - -T class locale::id { - public: -T id(); - private: -T void operator=(const id&); // not defined -T id(const id&); // not defined - }; - } - - - 22.2.1 The ctype category [lib.category.ctype] - -T class ctype_base { - public: -T enum mask { // numeric values are for exposition only. -T space=, print=, cntrl=, upper=, lower=, -T alpha=, digit=, punct=, xdigit=, -T alnum=, graph= - }; - }; - - - 22.2.1.1 Template class ctype [lib.locale.ctype] - -T template - class ctype : public locale::facet, public ctype_base { - public: -T typedef charT char_type; -T explicit ctype(size_t refs = 0); -T bool is(mask m, charT c) const; -T const charT* is(const charT* low, const charT* high, mask* vec) const; -T const charT* scan_is(mask m, - const charT* low, const charT* high) const; -T const charT* scan_not(mask m, - const charT* low, const charT* high) const; -T charT toupper(charT c) const; -T const charT* toupper(charT* low, const charT* high) const; -T charT tolower(charT c) const; -T const charT* tolower(charT* low, const charT* high) const; -T charT widen(char c) const; -T const char* widen(const char* low, const char* high, charT* to) const; -T char narrow(charT c, char dfault) const; -T const charT* narrow(const charT* low, const charT*, char dfault, - char* to) const; -T static locale::id id; - - protected: -T ~ctype(); // virtual -T virtual bool do_is(mask m, charT c) const; -T virtual const charT* do_is(const charT* low, const charT* high, - mask* vec) const; -T virtual const charT* do_scan_is(mask m, - const charT* low, const charT* high) const; -T virtual const charT* do_scan_not(mask m, - const charT* low, const charT* high) const; -T virtual charT do_toupper(charT) const; -T virtual const charT* do_toupper(charT* low, const charT* high) const; -T virtual charT do_tolower(charT) const; -T virtual const charT* do_tolower(charT* low, const charT* high) const; -T virtual charT do_widen(char) const; -T virtual const char* do_widen(const char* low, const char* high, - charT* dest) const; -T virtual char do_narrow(charT, char dfault) const; -T virtual const charT* do_narrow(const charT* low, const charT* high, - char dfault, char* dest) const; - }; - - - 22.2.1.2 Template class ctype_byname [lib.locale.ctype.byname] - -X template - class ctype_byname : public ctype { - public: -T typedef ctype::mask mask; -S explicit ctype_byname(const char*, size_t refs = 0); - protected: -S ~ctype_byname(); // virtual -S virtual bool do_is(mask m, charT c) const; -S virtual const charT* do_is(const charT* low, const charT* high, - mask* vec) const; -S virtual const char* do_scan_is(mask m, - const charT* low, const charT* high) const; -S virtual const char* do_scan_not(mask m, - const charT* low, const charT* high) const; -S virtual charT do_toupper(charT) const; -S virtual const charT* do_toupper(charT* low, const charT* high) const; -S virtual charT do_tolower(charT) const; -S virtual const charT* do_tolower(charT* low, const charT* high) const; -S virtual charT do_widen(char) const; -S virtual const char* do_widen(const char* low, const char* high, - charT* dest) const; -S virtual char do_narrow(charT, char dfault) const; -S virtual const charT* do_narrow(const charT* low, const charT* high, - char dfault, char* dest) const; - }; - - 22.2.1.3 ctype specializations [lib.facet.ctype.special] - -T template <> class ctype - : public locale::facet, public ctype_base { - public: -T typedef char char_type; -T explicit ctype(const mask* tab = 0, bool del = false, - size_t refs = 0); -T bool is(mask m, char c) const; -T const char* is(const char* low, const char* high, mask* vec) const; -T const char* scan_is (mask m, - const char* low, const char* high) const; -T const char* scan_not(mask m, - const char* low, const char* high) const; -T char toupper(char c) const; -T const char* toupper(char* low, const char* high) const; -T char tolower(char c) const; -T const char* tolower(char* low, const char* high) const; -T char widen(char c) const; -T const char* widen(const char* low, const char* high, char* to) const; -T char narrow(char c, char dfault) const; -T const char* narrow(const char* low, const char* high, char dfault, - char* to) const; -T static locale::id id; -T static const size_t table_size = IMPLEMENTATION_DEFINED; - - protected: -T const mask* table() const throw(); -T static const mask* classic_table() throw(); -T ~ctype(); // virtual -T virtual char do_toupper(char c) const; -T virtual const char* do_toupper(char* low, const char* high) const; -T virtual char do_tolower(char c) const; -T virtual const char* do_tolower(char* low, const char* high) const; - -T virtual char do_widen(char c) const; -T virtual const char* do_widen(const char* low, - const char* high, - char* to) const; -T virtual char do_narrow(char c, char dfault) const; -T virtual const char* do_narrow(const char* low, - const char* high, - char dfault, char* to) const; - }; - - - 22.2.1.4 Class [lib.locale.ctype.byname.special] - ctype_byname - -X template <> class ctype_byname : public ctype { - public: -S explicit ctype_byname(const char*, size_t refs = 0); - protected: -S ~ctype_byname(); // virtual -S virtual char do_toupper(char c) const; -S virtual const char* do_toupper(char* low, const char* high) const; -S virtual char do_tolower(char c) const; -S virtual const char* do_tolower(char* low, const char* high) const; - -S virtual char do_widen(char c) const; -S virtual const char* do_widen(char* low, - const char* high, - char* to) const; -S virtual char do_widen(char c) const; -S virtual const char* do_widen(char* low, const char* high) const; - - }; - - - - 22.2.1.5 Template class codecvt [lib.locale.codecvt] - -T class codecvt_base { - public: -T enum result { ok, partial, error, noconv }; - }; - -T template - class codecvt : public locale::facet, public codecvt_base { - public: -T typedef internT intern_type; -T typedef externT extern_type; -T typedef stateT state_type; -T explicit codecvt(size_t refs = 0) -T result out(stateT& state, - const internT* from, const internT* from_end, const internT*& from_next, - externT* to, externT* to_limit, externT*& to_next) const; -T result unshift(stateT& state, - externT* to, externT* to_limit, externT*& to_next) const; -T result in(stateT& state, - const externT* from, const externT* from_end, const externT*& from_next, - internT* to, internT* to_limit, internT*& to_next) const; -T int encoding() const throw(); -T bool always_noconv() const throw(); -T int length(const stateT&, const externT* from, const externT* end, - size_t max) const; -T int max_length() const throw(); -T static locale::id id; - - protected: -T ~codecvt(); // virtual -T virtual result do_out(stateT& state, - const internT* from, const internT* from_end, const internT*& from_next, - externT* to, externT* to_limit, externT*& to_next) const; -T virtual result do_in(stateT& state, -T const externT* from, const externT* from_end, const externT*& from_next, - internT* to, internT* to_limit, internT*& to_next) const; -T virtual result do_unshift(stateT& state, - externT* to, externT* to_limit, externT*& to_next) const; -T virtual int do_encoding() const throw(); -T virtual bool do_always_noconv() const throw(); -T virtual int do_length(const stateT&, const externT* from, - const externT* end, size_t max) const; -T virtual int do_max_length() const throw(); - }; - } - - - 22.2.1.6 Template class [lib.locale.codecvt.byname] - codecvt_byname - -X template - class codecvt_byname : public codecvt { - public: -S explicit codecvt_byname(const char*, size_t refs = 0); - protected: -S ~codecvt_byname(); // virtual -S virtual result do_out(stateT& state, - const internT* from, const internT* from_end, const internT*& from_next, - externT* to, externT* to_limit, externT*& to_next) const; -S virtual result do_in(stateT& state, - const externT* from, const externT* from_end, const externT*& from_next, - internT* to, internT* to_limit, internT*& to_next) const; -S virtual result do_unshift(stateT& state, - externT* to, externT* to_limit, externT*& to_next) const; -S virtual int do_encoding() const throw(); -S virtual bool do_always_noconv() const throw(); -S virtual int do_length(const stateT&, const externT* from, - const externT* end, size_t max) const; -S virtual result do_unshift(stateT& state, - externT* to, externT* to_limit, externT*& to_next) const; -S virtual int do_max_length() const throw(); - }; - - - 22.2.2.1 Template class num_get [lib.locale.num.get] - -X template > - class num_get : public locale::facet { - public: -T typedef charT char_type; -T typedef InputIterator iter_type; -T explicit num_get(size_t refs = 0); -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, bool& v) const; -T iter_type get(iter_type in, iter_type end, ios_base& , - ios_base::iostate& err, long& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned short& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned int& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned long& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, float& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, double& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, long double& v) const; -T iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, void*& v) const; -T static locale::id id; - - protected: -T ~num_get(); // virtual -T virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, bool& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, long& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned short& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned int& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned long& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, float& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, double& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, long double& v) const; -S virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, void*& v) const; - }; - - - - 22.2.2.2 Template class num_put [lib.locale.nm.put] - -X template > - class num_put : public locale::facet { - public: -T typedef charT char_type; -T typedef OutputIterator iter_type; -T explicit num_put(size_t refs = 0); -T iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const; -T iter_type put(iter_type s, ios_base& f, char_type fill, long v) const; -T iter_type put(iter_type s, ios_base& f, char_type fill, - unsigned long v) const; -T iter_type put(iter_type s, ios_base& f, char_type fill, - double v) const; -T iter_type put(iter_type s, ios_base& f, char_type fill, - long double v) const; -T iter_type put(iter_type s, ios_base& f, char_type fill, - const void* v) const; -T static locale::id id; - protected: -T ~num_put(); // virtual -T virtual iter_type do_put(iter_type, ios_base&, char_type fill, - bool v) const; -T virtual iter_type do_put(iter_type, ios_base&, char_type fill, - long v) const; -T virtual iter_type do_put(iter_type, ios_base&, char_type fill, - unsigned long) const; -S virtual iter_type do_put(iter_type, ios_base&, char_type fill, - double v) const; -S virtual iter_type do_put(iter_type, ios_base&, char_type fill, - long double v) const; -T virtual iter_type do_put(iter_type, ios_base&, char_type fill, - const void* v) const; - }; - } - - 22.2.3.1 Template class numpunct [lib.locale.numpunct] - -T template - class numpunct : public locale::facet { - public: -T typedef charT char_type; -T typedef basic_string string_type; -T explicit numpunct(size_t refs = 0); -T char_type decimal_point() const; -T char_type thousands_sep() const; -T string grouping() const; -T string_type truename() const; -T string_type falsename() const; -T static locale::id id; - protected: -T ~numpunct(); // virtual -T virtual char_type do_decimal_point() const; -T virtual char_type do_thousands_sep() const; -T virtual string do_grouping() const; -T virtual string_type do_truename() const; // for bool -T virtual string_type do_falsename() const; // for bool - }; - } - - - - 22.2.3.2 Template class [lib.locale.numpunct.byname] - numpunct_byname - -X template - class numpunct_byname : public numpunct { - // this class is specialized for char and wchar_t. - public: -T typedef charT char_type; -T typedef basic_string string_type; -S explicit numpunct_byname(const char*, size_t refs = 0); - protected: -S ~numpunct_byname(); // virtual -S virtual char_type do_decimal_point() const; -S virtual char_type do_thousands_sep() const; -S virtual string do_grouping() const; -S virtual string_type do_truename() const; // for bool -S virtual string_type do_falsename() const; // for bool - }; - - - 22.2.4.1 Template class collate [lib.locale.collate] - -T template - class collate : public locale::facet { - public: -T typedef charT char_type; -T typedef basic_string string_type; -T explicit collate(size_t refs = 0); -T int compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; -T string_type transform(const charT* low, const charT* high) const; -T long hash(const charT* low, const charT* high) const; -T static locale::id id; - protected: -T ~collate(); // virtual -T virtual int do_compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; -T virtual string_type do_transform - (const charT* low, const charT* high) const; -T virtual long do_hash (const charT* low, const charT* high) const; - }; - - - 22.2.4.2 Template class [lib.locale.collate.byname] - collate_byname - -X template - class collate_byname : public collate { - public: -T typedef basic_string string_type; -T explicit collate_byname(const char*, size_t refs = 0); - protected: -S ~collate_byname(); // virtual -S virtual int do_compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; -S virtual string_type do_transform - (const charT* low, const charT* high) const; -S virtual long do_hash (const charT* low, const charT* high) const; - }; - - - 22.2.5.1 Template class time_get [lib.locale.time.get] - -T class time_base { - public: -T enum dateorder { no_order, dmy, mdy, ymd, ydm }; - }; - - [Note: semantics of time_get members are implementation-defined. - To complete implementation requires documenting behavior.] - -X template > - class time_get : public locale::facet, public time_base { - public: -T typedef charT char_type; -T typedef InputIterator iter_type; -T explicit time_get(size_t refs = 0); - -T dateorder date_order() const { return do_date_order(); } -T iter_type get_time(iter_type s, iter_type end, ios_base& f, - ios_base::iostate& err, tm* t) const; -T iter_type get_date(iter_type s, iter_type end, ios_base& f, - ios_base::iostate& err, tm* t) const; -T iter_type get_weekday(iter_type s, iter_type end, ios_base& f, - ios_base::iostate& err, tm* t) const; -T iter_type get_monthname(iter_type s, iter_type end, ios_base& f, - ios_base::iostate& err, tm* t) const; -T iter_type get_year(iter_type s, iter_type end, ios_base& f, - ios_base::iostate& err, tm* t) const; -T static locale::id id; - protected: - ~time_get(); // virtual -X virtual dateorder do_date_order() const; -S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -S virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -S virtual iter_type do_get_monthname(iter_type s, ios_base&, - ios_base::iostate& err, tm* t) const; -S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; - }; - - - - 22.2.5.2 Template class [lib.locale.time.get.byname] - time_get_byname - -X template > - class time_get_byname : public time_get { - public: -T typedef time_base::dateorder dateorder; -T typedef InputIterator iter_type - -S explicit time_get_byname(const char*, size_t refs = 0); - protected: -S ~time_get_byname(); // virtual -S virtual dateorder do_date_order() const; -S virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -S virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -T virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -T virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; -S virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&, - ios_base::iostate& err, tm* t) const; - }; - } - - 22.2.5.3 Template class time_put [lib.locale.time.put] - -X template > - class time_put : public locale::facet { - public: -T typedef charT char_type; -T typedef OutputIterator iter_type; -T explicit time_put(size_t refs = 0); - // the following is implemented in terms of other member functions. -S iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb, - const charT* pattern, const charT* pat_end) const; -T iter_type put(iter_type s, ios_base& f, char_type fill, - const tm* tmb, char format, char modifier = 0) const; -T static locale::id id; - protected: -T ~time_put(); // virtual -S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t, - char format, char modifier) const; - }; - - - - 22.2.5.4 Template class [lib.locale.time.put.byname] - time_put_byname - -T template > - class time_put_byname : public time_put - { - public: -T typedef charT char_type; -T typedef OutputIterator iter_type; - -T explicit time_put_byname(const char*, size_t refs = 0); - protected: -T ~time_put_byname(); // virtual -S virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t, - char format, char modifier) const; - }; - - - 22.2.6.1 Template class money_get [lib.locale.money.get] - -X template > - class money_get : public locale::facet { - public: -T typedef charT char_type; -T typedef InputIterator iter_type; -T typedef basic_string string_type; -T explicit money_get(size_t refs = 0); -T iter_type get(iter_type s, iter_type end, bool intl, - ios_base& f, ios_base::iostate& err, - long double& units) const; -T iter_type get(iter_type s, iter_type end, bool intl, - ios_base& f, ios_base::iostate& err, - string_type& digits) const; -T static locale::id id; - protected: -T ~money_get(); // virtual -S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&, - ios_base::iostate& err, long double& units) const; -S virtual iter_type do_get(iter_type, iter_type, bool, ios_base&, - ios_base::iostate& err, string_type& digits) const; - }; - - 22.2.6.2 Template class money_put [lib.locale.money.put] - -X template > - class money_put : public locale::facet { - public: -T typedef charT char_type; -T typedef OutputIterator iter_type; -T typedef basic_string string_type; -T explicit money_put(size_t refs = 0); -T iter_type put(iter_type s, bool intl, ios_base& f, - char_type fill, long double units) const; -T iter_type put(iter_type s, bool intl, ios_base& f, - char_type fill, const string_type& digits) const; -T static locale::id id; - - protected: -T ~money_put(); // virtual -S virtual iter_type - do_put(iter_type, bool, ios_base&, char_type fill, - long double units) const; -S virtual iter_type - do_put(iter_type, bool, ios_base&, char_type fill, - const string_type& digits) const; - }; - - - 22.2.6.3 Template class moneypunct [lib.locale.moneypunct] - -T class money_base { - public: -T enum part { none, space, symbol, sign, value }; -T struct pattern { char field[4]; }; - }; - -X template - class moneypunct : public locale::facet, public money_base { - public: -T typedef charT char_type; -T typedef basic_string string_type; -T explicit moneypunct(size_t refs = 0); -T charT decimal_point() const; -T charT thousands_sep() const; -T string grouping() const; -T string_type curr_symbol() const; -T string_type positive_sign() const; -T string_type negative_sign() const; -T int frac_digits() const; -T pattern pos_format() const; -T pattern neg_format() const; -T static locale::id id; -T static const bool intl = International; - protected: -T ~moneypunct(); // virtual -S virtual charT do_decimal_point() const; -S virtual charT do_thousands_sep() const; -S virtual string do_grouping() const; -S virtual string_type do_curr_symbol() const; -S virtual string_type do_positive_sign() const; -S virtual string_type do_negative_sign() const; -S virtual int do_frac_digits() const; -T virtual pattern do_pos_format() const; -T virtual pattern do_neg_format() const; - }; - } - - 22.2.6.4 Template class [lib.locale.moneypunct.byname] - moneypunct_byname - -X template - class moneypunct_byname : public moneypunct { - public: -T typedef money_base::pattern pattern; -T typedef basic_string string_type; - -T explicit moneypunct_byname(const char*, size_t refs = 0); - protected: -T ~moneypunct_byname(); // virtual -S virtual charT do_decimal_point() const; -S virtual charT do_thousands_sep() const; -S virtual string do_grouping() const; -S virtual string_type do_curr_symbol() const; -S virtual string_type do_positive_sign() const; -S virtual string_type do_negative_sign() const; -S virtual int do_frac_digits() const; -S virtual pattern do_pos_format() const; -S virtual pattern do_neg_format() const; - }; - - 22.2.7.1 Template class messages [lib.locale.messages] - -T class messages_base { - public: -T typedef int catalog; - }; - -X template - class messages : public locale::facet, public messages_base { - public: -T typedef charT char_type; -T typedef basic_string string_type; -T explicit messages(size_t refs = 0); -T catalog open(const basic_string& fn, const locale&) const; -T string_type get(catalog c, int set, int msgid, - const string_type& dfault) const; -T void close(catalog c) const; -T static locale::id id; - protected: -T ~messages(); // virtual -S virtual catalog do_open(const basic_string&, const locale&) const; -S virtual string_type do_get(catalog, int set, int msgid, - const string_type& dfault) const; -S virtual void do_close(catalog) const; - }; - - 22.2.7.2 Template class [lib.locale.messages.byname] - messages_byname - - -X template - class messages_byname : public messages { - public: -T typedef messages_base::catalog catalog; -T typedef basic_string string_type; - -T explicit messages_byname(const char*, size_t refs = 0); - protected: -T ~messages_byname(); // virtual -S virtual catalog do_open(const basic_string&, const locale&) const; -S virtual string_type do_get(catalog, int set, int msgid, - const string_type& dfault) const; -S virtual void do_close(catalog) const; - }; - - - 22.3 C Library Locales [lib.c.locales] - - - Table 13--Header synopsis - Macros: -X LC_ALL LC_COLLATE LC_CTYPE -X LC_MONETARY LC_NUMERIC LC_TIME -X NULL -X Struct: lconv -X Functions: localeconv setlocale - - - 23.2 Sequences [lib.sequences] - - , , , , and . - - Header synopsis - -T template > class deque; -T template - bool operator==(const deque& x, const deque& y); -T template - bool operator< (const deque& x, const deque& y); -T template - bool operator!=(const deque& x, const deque& y); -T template - bool operator> (const deque& x, const deque& y); -T template - bool operator>=(const deque& x, const deque& y); -T template - bool operator<=(const deque& x, const deque& y); -T template - void swap(deque& x, deque& y); - } - - Header synopsis - -T template > class list; -T template - bool operator==(const list& x, const list& y); -T template - bool operator< (const list& x, const list& y); -T template - bool operator!=(const list& x, const list& y); -T template - bool operator> (const list& x, const list& y); -T template - bool operator>=(const list& x, const list& y); -T template - bool operator<=(const list& x, const list& y); -T template - void swap(list& x, list& y); - } - - Header synopsis - - namespace std { -T template > class queue; -T template - bool operator==(const queue& x, - const queue& y); -T template - bool operator< (const queue& x, - const queue& y); -T template - bool operator!=(const queue& x, - const queue& y); -T template - bool operator> (const queue& x, - const queue& y); -T template - bool operator>=(const queue& x, - const queue& y); -T template - bool operator<=(const queue& x, - const queue& y); -T template , - class Compare = less > -T class priority_queue; - } - - Header synopsis - - namespace std { -T template > class stack; -T template - bool operator==(const stack& x, - const stack& y); -T template - bool operator< (const stack& x, - const stack& y); -T template - bool operator!=(const stack& x, - const stack& y); -T template - bool operator> (const stack& x, - const stack& y); -T template - bool operator>=(const stack& x, - const stack& y); -T template - bool operator<=(const stack& x, - const stack& y); - } - - Header synopsis - -T template > class vector; - -T template - bool operator==(const vector& x, - const vector& y); -T template - bool operator< (const vector& x, - const vector& y); -T template - bool operator!=(const vector& x, - const vector& y); -T template - bool operator> (const vector& x, - const vector& y); -T template - bool operator>=(const vector& x, - const vector& y); -T template - bool operator<=(const vector& x, - const vector& y); -T template - void swap(vector& x, vector& y); - -T template class vector; -T template - bool operator==(const vector& x, - const vector& y); -T template - bool operator< (const vector& x, - const vector& y); -T template - bool operator!=(const vector& x, - const vector& y); -T template - bool operator> (const vector& x, - const vector& y); -T template - bool operator>=(const vector& x, - const vector& y); -T template - bool operator<=(const vector& x, - const vector& y); -T template - void swap(vector& x, vector& y); - } - - 23.2.1 Template class deque [lib.deque] - - template > -T class deque { - public: - // types: -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type; -T typedef T value_type; -T typedef Allocator allocator_type; -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer; -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; - // _lib.deque.cons_ construct/copy/destroy: -T explicit deque(const Allocator& = Allocator()); -T explicit deque(size_type n, const T& value = T(), - const Allocator& = Allocator()); -T template - deque(InputIterator first, InputIterator last, - const Allocator& = Allocator()); -T deque(const deque& x); -T ~deque(); -T deque& operator=(const deque& x); -T template - void assign(InputIterator first, InputIterator last); -T void assign(size_type n, const T& t); -T allocator_type get_allocator() const; - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // _lib.deque.capacity_ capacity: -T size_type size() const; -T size_type max_size() const; -T void resize(size_type sz, T c = T()); -T bool empty() const; - - // element access: -T reference operator[](size_type n); -T const_reference operator[](size_type n) const; -T reference at(size_type n); -T const_reference at(size_type n) const; -T reference front(); -T const_reference front() const; -T reference back(); -T const_reference back() const; - // _lib.deque.modifiers_ modifiers: -T void push_front(const T& x); -T void push_back(const T& x); -T iterator insert(iterator position, const T& x); -T void insert(iterator position, size_type n, const T& x); -T template - void insert (iterator position, - InputIterator first, InputIterator last); -T void pop_front(); -T void pop_back(); -T iterator erase(iterator position); -T iterator erase(iterator first, iterator last); -T void swap(deque&); -T void clear(); - }; -T template - bool operator==(const deque& x, - const deque& y); -T template - bool operator< (const deque& x, - const deque& y); -T template - bool operator!=(const deque& x, - const deque& y); -T template - bool operator> (const deque& x, - const deque& y); -T template - bool operator>=(const deque& x, - const deque& y); -T template - bool operator<=(const deque& x, - const deque& y); - // specialized algorithms: -T template - void swap(deque& x, deque& y); - - - 23.2.2 Template class list [lib.list] - -T template > - class list { - public: - // types: -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type; -T typedef T value_type; -T typedef Allocator allocator_type; -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer; -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; - - // _lib.list.cons_ construct/copy/destroy: -T explicit list(const Allocator& = Allocator()); -T explicit list(size_type n, const T& value = T(), - const Allocator& = Allocator()); -T template - list(InputIterator first, InputIterator last, - const Allocator& = Allocator()); -T list(const list& x); -T ~list(); -T list& operator=(const list& x); -T template - void assign(InputIterator first, InputIterator last); -T void assign(size_type n, const T& t); -T allocator_type get_allocator() const; - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // _lib.list.capacity_ capacity: -T bool empty() const; -T size_type size() const; -T size_type max_size() const; -T void resize(size_type sz, T c = T()); - // element access: -T reference front(); -T const_reference front() const; -T reference back(); -T const_reference back() const; - // _lib.list.modifiers_ modifiers: -T void push_front(const T& x); -T void pop_front(); -T void push_back(const T& x); -T void pop_back(); -T iterator insert(iterator position, const T& x); -T void insert(iterator position, size_type n, const T& x); -T template - void insert(iterator position, InputIterator first, - InputIterator last); -T iterator erase(iterator position); -T iterator erase(iterator position, iterator last); -T void swap(list&); -T void clear(); - // _lib.list.ops_ list operations: -T void splice(iterator position, list& x); -T void splice(iterator position, list& x, iterator i); -T void splice(iterator position, list& x, iterator first, - iterator last); -T void remove(const T& value); -T template void remove_if(Predicate pred); - -T void unique(); -T template - void unique(BinaryPredicate binary_pred); -T void merge(list& x); -T template void merge(list& x, Compare comp); - void sort(); -T template void sort(Compare comp); - void reverse(); - }; -T template - bool operator==(const list& x, const list& y); -T template - bool operator< (const list& x, const list& y); -T template - bool operator!=(const list& x, const list& y); -T template - bool operator> (const list& x, const list& y); -T template - bool operator>=(const list& x, const list& y); -T template - bool operator<=(const list& x, const list& y); - // specialized algorithms: -T template - void swap(list& x, list& y); - - - 23.2.3.1 Template class queue [lib.queue] - -T template > - class queue { - public: -T typedef typename Container::value_type value_type; -T typedef typename Container::size_type size_type; -T typedef Container container_type; - protected: -T Container c; - public: -T explicit queue(const Container& = Container()); - -T bool empty() const { return c.empty(); } -T size_type size() const { return c.size(); } -T value_type& front() { return c.front(); } -T const value_type& front() const { return c.front(); } -T value_type& back() { return c.back(); } -T const value_type& back() const { return c.back(); } -T void push(const value_type& x) { c.push_back(x); } -T void pop() { c.pop_front(); } - }; - -T template - bool operator==(const queue& x, - const queue& y); -T template - bool operator< (const queue& x, - const queue& y); -T template - bool operator!=(const queue& x, - const queue& y); -T template - bool operator> (const queue& x, - const queue& y); -T template - bool operator>=(const queue& x, - const queue& y); -T template - bool operator<=(const queue& x, - const queue& y); - - 23.2.3.2 Template class priority_queue [lib.priority.queue] - -T template , - class Compare = less > - class priority_queue { - public: -T typedef typename Container::value_type value_type; -T typedef typename Container::size_type size_type; -T typedef Container container_type; - protected: -T Container c; -T Compare comp; - public: -T explicit priority_queue(const Compare& x = Compare(), - const Container& = Container()); -T template - priority_queue(InputIterator first, InputIterator last, - const Compare& x = Compare(), - const Container& = Container()); - -T bool empty() const { return c.empty(); } -T size_type size() const { return c.size(); } -T const value_type& top() const { return c.front(); } -T void push(const value_type& x); -T void pop(); - }; - - 23.2.3.3 Template class stack [lib.stack] - -T template > - class stack { - public: -T typedef typename Container::value_type value_type; -T typedef typename Container::size_type size_type; -T typedef Container container_type; - protected: -T Container c; - public: -T explicit stack(const Container& = Container()); - -T bool empty() const { return c.empty(); } -T size_type size() const { return c.size(); } -T value_type& top() { return c.back(); } -T const value_type& top() const { return c.back(); } -T void push(const value_type& x) { c.push_back(x); } -T void pop() { c.pop_back(); } - }; -T template - bool operator==(const stack& x, - const stack& y); -T template - bool operator< (const stack& x, - const stack& y); -T template - bool operator!=(const stack& x, - const stack& y); -T template - bool operator> (const stack& x, - const stack& y); -T template - bool operator>=(const stack& x, - const stack& y); -T template - bool operator<=(const stack& x, - const stack& y); - - 23.2.4 Template class vector [lib.vector] - - template > -T class vector { - public: - // types: -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type; -T typedef T value_type; -T typedef Allocator allocator_type; -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; - // _lib.vector.cons_ construct/copy/destroy: -T explicit vector(const Allocator& = Allocator()); -T explicit vector(size_type n, const T& value = T(), - const Allocator& = Allocator()); -T template - vector(InputIterator first, InputIterator last, - const Allocator& = Allocator()); -T vector(const vector& x); -T ~vector(); -T vector& operator=(const vector& x); -T template - void assign(InputIterator first, InputIterator last); -T void assign(size_type n, const T& u); -T allocator_type get_allocator() const; - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // _lib.vector.capacity_ capacity: -T size_type size() const; -T size_type max_size() const; -T void resize(size_type sz, T c = T()); -T size_type capacity() const; -T bool empty() const; -T void reserve(size_type n); - - // element access: -T reference operator[](size_type n); -T const_reference operator[](size_type n) const; -T const_reference at(size_type n) const; -T reference at(size_type n); -T reference front(); -T const_reference front() const; -T reference back(); -T const_reference back() const; - // _lib.vector.modifiers_ modifiers: -T void push_back(const T& x); -T void pop_back(); -T iterator insert(iterator position, const T& x); -T void insert(iterator position, size_type n, const T& x); -T template - void insert(iterator position, - InputIterator first, InputIterator last); -T iterator erase(iterator position); -T iterator erase(iterator first, iterator last); -T void swap(vector&); -T void clear(); - }; - -T template - bool operator==(const vector& x, - const vector& y); -T template - bool operator< (const vector& x, - const vector& y); -T template - bool operator!=(const vector& x, - const vector& y); -T template - bool operator> (const vector& x, - const vector& y); -T template - bool operator>=(const vector& x, - const vector& y); -T template - bool operator<=(const vector& x, - const vector& y); - // specialized algorithms: -T template - void swap(vector& x, vector& y); - - - 23.2.5 Class vector [lib.vector.bool] - -T template class vector { - public: - // types: -T typedef bool const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type; -T typedef bool value_type; -T typedef Allocator allocator_type; -T typedef implementation defined pointer; -T typedef implementation defined const_pointer -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; - // bit reference: -T class reference { - friend class vector; -T reference(); - public: -T ~reference(); -T operator bool() const; -T reference& operator=(const bool x); -T reference& operator=(const reference& x); -T void flip(); // flips the bit - }; - - // construct/copy/destroy: -T explicit vector(const Allocator& = Allocator()); -T explicit vector(size_type n, const bool& value = bool(), - const Allocator& = Allocator()); -T template - vector(InputIterator first, InputIterator last, - const Allocator& = Allocator()); -T vector(const vector& x); -T ~vector(); -T vector& operator=(const vector& x); -T template - void assign(InputIterator first, InputIterator last); -T void assign(size_type n, const T& t); -T allocator_type get_allocator() const; - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // capacity: -T size_type size() const; -T size_type max_size() const; -T void resize(size_type sz, bool c = false); -T size_type capacity() const; -T bool empty() const; -T void reserve(size_type n); - // element access: -T reference operator[](size_type n); -T const_reference operator[](size_type n) const; -T const_reference at(size_type n) const; -T reference at(size_type n); -T reference front(); -T const_reference front() const; -T reference back(); -T const_reference back() const; - // modifiers: -T void push_back(const bool& x); -T void pop_back(); -T iterator insert(iterator position, const bool& x); -T void insert (iterator position, size_type n, const bool& x); -T template - void insert(iterator position, - InputIterator first, InputIterator last); -T iterator erase(iterator position); -T iterator erase(iterator first, iterator last); -T void swap(vector&); -T static void swap(reference x, reference y); -T void flip(); // flips all bits -T void clear(); - }; - -T template - bool operator==(const vector& x, - const vector& y); -T template - bool operator< (const vector& x, - const vector& y); -T template - bool operator!=(const vector& x, - const vector& y); -T template - bool operator> (const vector& x, - const vector& y); -T template - bool operator>=(const vector& x, - const vector& y); -T template - bool operator<=(const vector& x, - const vector& y); - // specialized algorithms: -T template - void swap(vector& x, vector& y); - - 23.3 Associative containers [lib.associative] - - and : - - Header synopsis - - template , - class Allocator = allocator > > -T class map; - -T template - bool operator==(const map& x, - const map& y); -T template - bool operator< (const map& x, - const map& y); -T template - bool operator!=(const map& x, - const map& y); -T template - bool operator> (const map& x, - const map& y); -T template - bool operator>=(const map& x, - const map& y); -T template - bool operator<=(const map& x, - const map& y); -T template - void swap(map& x, - map& y); -T template , - class Allocator = allocator > > - class multimap; -T template - bool operator==(const multimap& x, - const multimap& y); -T template - bool operator< (const multimap& x, - const multimap& y); -T template - bool operator!=(const multimap& x, - const multimap& y); -T template - bool operator> (const multimap& x, - const multimap& y); -T template - bool operator>=(const multimap& x, - const multimap& y); -T template - bool operator<=(const multimap& x, - const multimap& y); -T template - void swap(multimap& x, - multimap& y); - } - - Header synopsis - - template , - class Allocator = allocator > -T class set; - -T template - bool operator==(const set& x, - const set& y); -T template - bool operator< (const set& x, - const set& y); -T template - bool operator!=(const set& x, - const set& y); -T template - bool operator> (const set& x, - const set& y); -T template - bool operator>=(const set& x, - const set& y); -T template - bool operator<=(const set& x, - const set& y); -T template - void swap(set& x, - set& y); -T template , - class Allocator = allocator > - class multiset; -T template - bool operator==(const multiset& x, - const multiset& y); -T template - bool operator< (const multiset& x, - const multiset& y); -T template - bool operator!=(const multiset& x, - const multiset& y); -T template - bool operator> (const multiset& x, - const multiset& y); -T template - bool operator>=(const multiset& x, - const multiset& y); -T template - bool operator<=(const multiset& x, - const multiset& y); -T template - void swap(multiset& x, - multiset& y); - } - - 23.3.1 Template class map [lib.map] - - template , - class Allocator = allocator > > -T class map { - public: - // types: -T typedef Key key_type; -T typedef T mapped_type; -T typedef pair value_type; -T typedef Compare key_compare; -T typedef Allocator allocator_type; -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type; -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer; -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; -T class value_compare - : public binary_function { - friend class map; - protected: -T Compare comp; -T value_compare(Compare c) : comp(c) {} - public: -T bool operator()(const value_type& x, const value_type& y) const { - return comp(x.first, y.first); - } - }; - - // _lib.map.cons_ construct/copy/destroy: -T explicit map(const Compare& comp = Compare(), - const Allocator& = Allocator()); -T template - map(InputIterator first, InputIterator last, - const Compare& comp = Compare(), const Allocator& = Allocator()); -T map(const map& x); -T ~map(); -T map& - operator=(const map& x); - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // capacity: -T bool empty() const; -T size_type size() const; -T size_type max_size() const; - // _lib.map.access_ element access: -T T& operator[](const key_type& x); - // modifiers: -T pair insert(const value_type& x); -T iterator insert(iterator position, const value_type& x); -T template - void insert(InputIterator first, InputIterator last); -T void erase(iterator position); -T size_type erase(const key_type& x); -T void erase(iterator first, iterator last); -T void swap(map&); -T void clear(); - // observers: -T key_compare key_comp() const; -T value_compare value_comp() const; - // _lib.map.ops_ map operations: -T iterator find(const key_type& x); -T const_iterator find(const key_type& x) const; -T size_type count(const key_type& x) const; -T iterator lower_bound(const key_type& x); -T const_iterator lower_bound(const key_type& x) const; -T iterator upper_bound(const key_type& x); -T const_iterator upper_bound(const key_type& x) const; -T pair - equal_range(const key_type& x); -T pair - equal_range(const key_type& x) const; - }; - -T template - bool operator==(const map& x, - const map& y); -T template - bool operator< (const map& x, - const map& y); -T template - bool operator!=(const map& x, - const map& y); -T template - bool operator> (const map& x, - const map& y); -T template - bool operator>=(const map& x, - const map& y); -T template - bool operator<=(const map& x, - const map& y); - // specialized algorithms: -T template - void swap(map& x, - map& y); - - 23.3.2 Template class multimap [lib.multimap] - - template , - class Allocator = allocator > > -T class multimap { - public: - // types: -T typedef Key key_type; -T typedef T mapped_type; -T typedef pair value_type; -T typedef Compare key_compare; -T typedef Allocator allocator_type; -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer; -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; -T class value_compare - : public binary_function { - friend class multimap; - protected: -T Compare comp; -T value_compare(Compare c) : comp(c) {} - public: -T bool operator()(const value_type& x, const value_type& y) const { - return comp(x.first, y.first); - } - }; - // construct/copy/destroy: -T explicit multimap(const Compare& comp = Compare(), - const Allocator& = Allocator()); -T template - multimap(InputIterator first, InputIterator last, - const Compare& comp = Compare(), - const Allocator& = Allocator()); -T multimap(const multimap& x); -T ~multimap(); -T multimap& - operator=(const multimap& x); -T allocator_type get_allocator() const; - - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // capacity: -T bool empty() const; -T size_type size() const; -T size_type max_size() const; - // modifiers: -T iterator insert(const value_type& x); -T iterator insert(iterator position, const value_type& x); -T template - void insert(InputIterator first, InputIterator last); -T void erase(iterator position); -T size_type erase(const key_type& x); -T void erase(iterator first, iterator last); -T void swap(multimap&); -T void clear(); - // observers: -T key_compare key_comp() const; -T value_compare value_comp() const; - // map operations: -T iterator find(const key_type& x); -T const_iterator find(const key_type& x) const; -T size_type count(const key_type& x) const; -T iterator lower_bound(const key_type& x); -T const_iterator lower_bound(const key_type& x) const; -T iterator upper_bound(const key_type& x); -T const_iterator upper_bound(const key_type& x) const; -T pair equal_range(const key_type& x); -T pair equal_range(const key_type& x) const; - }; - -T template - bool operator==(const multimap& x, - const multimap& y); -T template - bool operator< (const multimap& x, - const multimap& y); -T template - bool operator!=(const multimap& x, - const multimap& y); -T template - bool operator> (const multimap& x, - const multimap& y); -T template - bool operator>=(const multimap& x, - const multimap& y); -T template - bool operator<=(const multimap& x, - const multimap& y); - // specialized algorithms: -T template - void swap(multimap& x, - multimap& y); - - - 23.3.3 Template class set [lib.set] - - template , - class Allocator = allocator > -T class set { - public: - // types: -T typedef Key key_type; -T typedef Key value_type; -T typedef Compare key_compare; -T typedef Compare value_compare; -T typedef Allocator allocator_type; -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type; -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer; -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; - // _lib.set.cons_ construct/copy/destroy: -T explicit set(const Compare& comp = Compare(), - const Allocator& = Allocator()); -T template - set(InputIterator first, InputIterator last, - const Compare& comp = Compare(), const Allocator& = Allocator()); -T set(const set& x); -T ~set(); -T set& - operator=(const set& x); -T allocator_type get_allocator() const; - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // capacity: -T bool empty() const; -T size_type size() const; -T size_type max_size() const; - // modifiers: -T pair insert(const value_type& x); -T iterator insert(iterator position, const value_type& x); -T template -T void insert(InputIterator first, InputIterator last); -T void erase(iterator position); -T size_type erase(const key_type& x); -T void erase(iterator first, iterator last); -T void swap(set&); -T void clear(); - - // observers: -T key_compare key_comp() const; -T value_compare value_comp() const; - // set operations: -T iterator find(const key_type& x) const; -T size_type count(const key_type& x) const; -T iterator lower_bound(const key_type& x) const; -T iterator upper_bound(const key_type& x) const; -T pair equal_range(const key_type& x) const; - }; -T template - bool operator==(const set& x, - const set& y); -T template - bool operator< (const set& x, - const set& y); -T template - bool operator!=(const set& x, - const set& y); -T template - bool operator> (const set& x, - const set& y); -T template - bool operator>=(const set& x, - const set& y); -T template - bool operator<=(const set& x, - const set& y); - // specialized algorithms: -T template - void swap(set& x, - set& y); - - 23.3.4 Template class multiset [lib.multiset] - - template , - class Allocator = allocator > -T class multiset { - public: - // types: -T typedef Key key_type; -T typedef Key value_type; -T typedef Compare key_compare; -T typedef Compare value_compare; -T typedef Allocator allocator_type; -T typedef typename Allocator::reference reference; -T typedef typename Allocator::const_reference const_reference; -T typedef implementation defined iterator; -T typedef implementation defined const_iterator; -T typedef implementation defined size_type; -T typedef implementation defined difference_type -T typedef typename Allocator::pointer pointer; -T typedef typename Allocator::const_pointer const_pointer; -T typedef std::reverse_iterator reverse_iterator; -T typedef std::reverse_iterator const_reverse_iterator; - - // construct/copy/destroy: -T explicit multiset(const Compare& comp = Compare(), - const Allocator& = Allocator()); -T template - multiset(InputIterator first, InputIterator last, - const Compare& comp = Compare(), - const Allocator& = Allocator()); -T multiset(const multiset& x); -T ~multiset(); -T multiset& - operator=(const multiset& x); -T allocator_type get_allocator() const; - // iterators: -T iterator begin(); -T const_iterator begin() const; -T iterator end(); -T const_iterator end() const; -T reverse_iterator rbegin(); -T const_reverse_iterator rbegin() const; -T reverse_iterator rend(); -T const_reverse_iterator rend() const; - // capacity: -T bool empty() const; -T size_type size() const; -T size_type max_size() const; - // modifiers: -T iterator insert(const value_type& x); -T iterator insert(iterator position, const value_type& x); -T template - void insert(InputIterator first, InputIterator last); -T void erase(iterator position); -T size_type erase(const key_type& x); -T void erase(iterator first, iterator last); -T void swap(multiset&); -T void clear(); - // observers: -T key_compare key_comp() const; -T value_compare value_comp() const; - // set operations: -T iterator find(const key_type& x) const; -T size_type count(const key_type& x) const; -T iterator lower_bound(const key_type& x) const; -T iterator upper_bound(const key_type& x) const; -T pair equal_range(const key_type& x) const; - }; - -T template - bool operator==(const multiset& x, - const multiset& y); -T template - bool operator< (const multiset& x, - const multiset& y); -T template - bool operator!=(const multiset& x, - const multiset& y); -T template - bool operator> (const multiset& x, - const multiset& y); -T template - bool operator>=(const multiset& x, - const multiset& y); -T template - bool operator<=(const multiset& x, - const multiset& y); - // specialized algorithms: -T template - void swap(multiset& x, - multiset& y); - - 23.3.5 Template class bitset [lib.template.bitset] - - Header synopsis - -T template class bitset; - // _lib.bitset.operators_ bitset operations: -T template - bitset operator&(const bitset&, const bitset&); -T template - bitset operator|(const bitset&, const bitset&); -T template - bitset operator^(const bitset&, const bitset&); -T template - basic_istream& - operator>>(basic_istream& is, bitset& x); -T template - basic_ostream& - operator<<(basic_ostream& os, const bitset& x); - -T template class bitset { - public: - // bit reference: -T class reference { - friend class bitset; -T reference(); - public: -T ~reference(); -T reference& operator=(bool x); // for b[i] = x; -T reference& operator=(const reference&); // for b[i] = b[j]; -T bool operator~() const; // flips the bit -T operator bool() const; // for x = b[i]; -T reference& flip(); // for b[i].flip(); - }; - - // _lib.bitset.cons_ constructors: -T bitset(); -T bitset(unsigned long val); -T template - explicit bitset( - const basic_string& str, - typename basic_string::size_type pos = 0, - typename basic_string::size_type n = - basic_string::npos); - // _lib.bitset.members_ bitset operations: -T bitset& operator&=(const bitset& rhs); -T bitset& operator|=(const bitset& rhs); -T bitset& operator^=(const bitset& rhs); -T bitset& operator<<=(size_t pos); -T bitset& operator>>=(size_t pos); -T bitset& set(); -T bitset& set(size_t pos, int val = true); -T bitset& reset(); -T bitset& reset(size_t pos); -T bitset operator~() const; -T bitset& flip(); -T bitset& flip(size_t pos); - // element access: -T reference operator[](size_t pos); // for b[i]; -T unsigned long to_ulong() const; -T template - basic_string to_string() const; -T size_t count() const; -T size_t size() const; -T bool operator==(const bitset& rhs) const; -T bool operator!=(const bitset& rhs) const; -T bool test(size_t pos) const; -T bool any() const; -T bool none() const; -T bitset operator<<(size_t pos) const; -T bitset operator>>(size_t pos) const; - }; - - - - - 24.2 Header synopsis [lib.iterator.synopsis] - - // _lib.iterator.primitives_, primitives: -T template struct iterator_traits; -T template struct iterator_traits; - -X template struct iterator; -T struct input_iterator_tag {}; -T struct output_iterator_tag {}; -T struct forward_iterator_tag: public input_iterator_tag {}; -T struct bidirectional_iterator_tag: public forward_iterator_tag {}; -T struct random_access_iterator_tag: public bidirectional_iterator_tag {}; - // _lib.iterator.operations_, iterator operations: -T template - void advance(InputIterator& i, Distance n); -T template - typename iterator_traits::difference_type - distance(InputIterator first, InputIterator last); - // _lib.predef.iterators_, predefined iterators: -X template class reverse_iterator; -T template - bool operator==( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator<( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator!=( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator>( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator>=( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator<=( - const reverse_iterator& x, - const reverse_iterator& y); -T template - typename reverse_iterator::difference_type operator-( - const reverse_iterator& x, - const reverse_iterator& y); -T template - reverse_iterator - operator+( - typename reverse_iterator::difference_type n, - const reverse_iterator& x); - -X template class back_insert_iterator; -T template - back_insert_iterator back_inserter(Container& x); -X template class front_insert_iterator; -T template - front_insert_iterator front_inserter(Container& x); -X template class insert_iterator; -T template - insert_iterator inserter(Container& x, Iterator i); - // _lib.stream.iterators_, stream iterators: -X template , - class Distance = ptrdiff_t> - class istream_iterator; - template -X bool operator==(const istream_iterator& x, - const istream_iterator& y); - template -X bool operator!=(const istream_iterator& x, - const istream_iterator& y); -X template > - class ostream_iterator; -X template > - class istreambuf_iterator; -X template - bool operator==(const istreambuf_iterator& a, - const istreambuf_iterator& b); -X template - bool operator!=(const istreambuf_iterator& a, - const istreambuf_iterator& b); -T template > - class ostreambuf_iterator; - - 24.3 Iterator primitives [lib.iterator.primitives] - -T template struct iterator_traits { -T typedef typename Iterator::difference_type difference_type; -T typedef typename Iterator::value_type value_type; -T typedef typename Iterator::pointer pointer; -T typedef typename Iterator::reference reference; -T typedef typename Iterator::iterator_category iterator_category; - }; - -T template struct iterator_traits { -T typedef ptrdiff_t difference_type; -T typedef T value_type; -T typedef T* pointer; -T typedef T& reference; -T typedef random_access_iterator_tag iterator_category; - }; - -T template struct iterator_traits { -T typedef ptrdiff_t difference_type; -T typedef T value_type; -T typedef const T* pointer; -T typedef const T& reference; -T typedef random_access_iterator_tag iterator_category; - }; - - 24.3.2 Basic iterator [lib.iterator.basic] - - template -X struct iterator { -T typedef T value_type; -T typedef Distance difference_type; -T typedef Pointer pointer; -T typedef Reference reference; -T typedef Category iterator_category; - }; - - 24.3.3 Standard iterator tags [lib.std.iterator.tags] - -T struct input_iterator_tag {}; -T struct output_iterator_tag {}; -T struct forward_iterator_tag: public input_iterator_tag {}; -T struct bidirectional_iterator_tag: public forward_iterator_tag {}; -T struct random_access_iterator_tag: public bidirectional_iterator_tag {}; - - - 24.4.1 Reverse iterators [lib.reverse.iterators] - - template -X class reverse_iterator : public - iterator::iterator_category, - typename iterator_traits::value_type, - typename iterator_traits::difference_type, - typename iterator_traits::pointer, - typename iterator_traits::reference> { - protected: -T Iterator current; - public: -T typedef Iterator - iterator_type; -T typedef typename iterator_traits::difference_type - difference_type; -T typedef typename iterator_traits::reference - reference; -T typedef typename iterator_traits::pointer - pointer; - -T reverse_iterator(); -T explicit reverse_iterator(Iterator x); -T template reverse_iterator(const reverse_iterator& u); -T Iterator base() const; // explicit -T reference operator*() const; -T pointer operator->() const; -T reverse_iterator& operator++(); -T reverse_iterator operator++(int); -T reverse_iterator& operator--(); -T reverse_iterator operator--(int); - -T reverse_iterator operator+ (difference_type n) const; -T reverse_iterator& operator+=(difference_type n); -T reverse_iterator operator- (difference_type n) const; -T reverse_iterator& operator-=(difference_type n); -T reference operator[](difference_type n) const; - }; -T template - bool operator==( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator<( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator!=( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator>( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator>=( - const reverse_iterator& x, - const reverse_iterator& y); -T template - bool operator<=( - const reverse_iterator& x, - const reverse_iterator& y); -T template - typename reverse_iterator::difference_type operator-( - const reverse_iterator& x, - const reverse_iterator& y); -T template - reverse_iterator operator+( - typename reverse_iterator::difference_type n, - const reverse_iterator& x); - - - 24.4.2.1 Template class [lib.back.insert.iterator] - back_insert_iterator - - template -X class back_insert_iterator : - public iterator { - protected: -T Container* container; - public: -T typedef Container container_type; -T explicit back_insert_iterator(Container& x); -T back_insert_iterator& - operator=(typename Container::const_reference value); - -T back_insert_iterator& operator*(); -T back_insert_iterator& operator++(); -T back_insert_iterator operator++(int); - }; -T template - back_insert_iterator back_inserter(Container& x); - - - - 24.4.2.3 Template class [lib.front.insert.iterator] - front_insert_iterator - - template -X class front_insert_iterator : - public iterator { - protected: -T Container* container; - public: -T typedef Container container_type; -T explicit front_insert_iterator(Container& x); -T front_insert_iterator& - operator=(typename Container::const_reference value); -T front_insert_iterator& operator*(); -T front_insert_iterator& operator++(); -T front_insert_iterator operator++(int); - }; -T template - front_insert_iterator front_inserter(Container& x); - - - 24.4.2.5 Template class insert_iterator [lib.insert.iterator] - - template -X class insert_iterator : - public iterator { - protected: -T Container* container; -T typename Container::iterator iter; - public: -T typedef Container container_type; -T insert_iterator(Container& x, typename Container::iterator i); -T insert_iterator& - operator=(typename Container::const_reference value); -T insert_iterator& operator*(); -T insert_iterator& operator++(); -T insert_iterator& operator++(int); - }; -T template - insert_iterator inserter(Container& x, Iterator i); - - 24.5.1 Template class istream_iterator [lib.istream.iterator] - - template , - class Distance = ptrdiff_t> -X class istream_iterator: - public iterator { - public: -T typedef charT char_type -T typedef traits traits_type; -T typedef basic_istream istream_type; -T istream_iterator(); -T istream_iterator(istream_type& s); -T istream_iterator(const istream_iterator& x); -T ~istream_iterator(); - -T const T& operator*() const; -T const T* operator->() const; -T istream_iterator& operator++(); -T istream_iterator operator++(int); - }; - -T template - bool operator==(const istream_iterator& x, - const istream_iterator& y); -T template - bool operator!=(const istream_iterator& x, - const istream_iterator& y); - - - 24.5.2 Template class ostream_iterator [lib.ostream.iterator] - - template > -X class ostream_iterator: - public iterator { - public: -T typedef charT char_type; -T typedef traits traits_type; -T typedef basic_ostream ostream_type; -T ostream_iterator(ostream_type& s); -T ostream_iterator(ostream_type& s, const charT* delimiter); -T ostream_iterator(const ostream_iterator& x); -T ~ostream_iterator(); -T ostream_iterator& operator=(const T& value); - -T ostream_iterator& operator*(); -T ostream_iterator& operator++(); -T ostream_iterator& operator++(int); - }; - - - 24.5.3 Template class [lib.istreambuf.iterator] - istreambuf_iterator - - template > -X class istreambuf_iterator - : public iterator { - public: -T typedef charT char_type; -T typedef traits traits_type; -T typedef typename traits::int_type int_type; -T typedef basic_streambuf streambuf_type; -T typedef basic_istream istream_type; -T class proxy; // exposition only -T istreambuf_iterator() throw(); -T istreambuf_iterator(istream_type& s) throw(); -T istreambuf_iterator(streambuf_type* s) throw(); -T istreambuf_iterator(const proxy& p) throw(); -T charT operator*() const; -T istreambuf_iterator& operator++(); -T proxy operator++(int); -X bool equal(istreambuf_iterator& b); - }; - -T template - bool operator==(const istreambuf_iterator& a, - const istreambuf_iterator& b); - -T template - bool operator!=(const istreambuf_iterator& a, - const istreambuf_iterator& b); - - 24.5.3.1 Template class [lib.istreambuf.iterator::proxy] - istreambuf_iterator::proxy - - template > -T class istreambuf_iterator::proxy - { -T charT keep_; -T basic_streambuf* sbuf_; -T proxy(charT c, - basic_streambuf* sbuf); - : keep_(c), sbuf_(sbuf) {} - public: -T charT operator*() { return keep_; } - }; - - - - 24.5.4 Template class [lib.ostreambuf.iterator] - ostreambuf_iterator - - template > -T class ostreambuf_iterator: - public iterator { - public: -T typedef charT char_type; -T typedef traits traits_type; -T typedef basic_streambuf streambuf_type; -T typedef basic_ostream ostream_type; - public: -T ostreambuf_iterator(ostream_type& s) throw(); -T ostreambuf_iterator(streambuf_type* s) throw(); -T ostreambuf_iterator& operator=(charT c); -T ostreambuf_iterator& operator*(); -T ostreambuf_iterator& operator++(); -T ostreambuf_iterator& operator++(int); -T bool failed() const throw(); - }; - - - Header synopsis - - - // _lib.alg.nonmodifying_, non-modifying sequence operations: -T template - Function for_each(InputIterator first, InputIterator last, Function f); -T template - InputIterator find(InputIterator first, InputIterator last, - const T& value); -T template - InputIterator find_if(InputIterator first, InputIterator last, - Predicate pred); -T template - ForwardIterator1 - find_end(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2); -T template - ForwardIterator1 - find_end(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); -T template - ForwardIterator1 - find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2); -T template - ForwardIterator1 - find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); -T template - ForwardIterator adjacent_find(ForwardIterator first, - ForwardIterator last); -T template - ForwardIterator adjacent_find(ForwardIterator first, - ForwardIterator last, BinaryPredicate pred); -T template - typename iterator_traits::difference_type - count(InputIterator first, InputIterator last, const T& value); -T template - typename iterator_traits::difference_type - count_if(InputIterator first, InputIterator last, Predicate pred); -T template - pair - mismatch(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2); -T template - pair - mismatch(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, BinaryPredicate pred); - -T template - bool equal(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2); -T template - bool equal(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, BinaryPredicate pred); -T template - ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2); -T template - ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); -T template - ForwardIterator search_n(ForwardIterator first, ForwardIterator last, - Size count, const T& value); -T template - ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last, - Size count, const T& value, - BinaryPredicate pred); - // _lib.alg.modifying.operations_, modifying sequence operations: - // _lib.alg.copy_, copy: -T template - OutputIterator copy(InputIterator first, InputIterator last, - OutputIterator result); -T template - BidirectionalIterator2 - copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, - BidirectionalIterator2 result); - // _lib.alg.swap_, swap: -T template void swap(T& a, T& b); -T template - ForwardIterator2 swap_ranges(ForwardIterator1 first1, - ForwardIterator1 last1, ForwardIterator2 first2); -T template - void iter_swap(ForwardIterator1 a, ForwardIterator2 b); -T template - OutputIterator transform(InputIterator first, InputIterator last, - OutputIterator result, UnaryOperation op); -T template - OutputIterator transform(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, OutputIterator result, - BinaryOperation binary_op); - -T template - void replace(ForwardIterator first, ForwardIterator last, - const T& old_value, const T& new_value); -T template - void replace_if(ForwardIterator first, ForwardIterator last, - Predicate pred, const T& new_value); -T template - OutputIterator replace_copy(InputIterator first, InputIterator last, - OutputIterator result, - const T& old_value, const T& new_value); -T template - OutputIterator replace_copy_if(Iterator first, Iterator last, - OutputIterator result, - Predicate pred, const T& new_value); -T template - void fill(ForwardIterator first, ForwardIterator last, const T& value); -T template - void fill_n(OutputIterator first, Size n, const T& value); -T template - void generate(ForwardIterator first, ForwardIterator last, Generator gen); -T template - void generate_n(OutputIterator first, Size n, Generator gen); -T template - ForwardIterator remove(ForwardIterator first, ForwardIterator last, - const T& value); -T template - ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, - Predicate pred); -T template - OutputIterator remove_copy(InputIterator first, InputIterator last, - OutputIterator result, const T& value); -T template - OutputIterator remove_copy_if(InputIterator first, InputIterator last, - OutputIterator result, Predicate pred); -T template - ForwardIterator unique(ForwardIterator first, ForwardIterator last); -T template - ForwardIterator unique(ForwardIterator first, ForwardIterator last, - BinaryPredicate pred); -T template - OutputIterator unique_copy(InputIterator first, InputIterator last, - OutputIterator result); -T template - OutputIterator unique_copy(InputIterator first, InputIterator last, - OutputIterator result, BinaryPredicate pred); -T template - void reverse(BidirectionalIterator first, BidirectionalIterator last); -T template - OutputIterator reverse_copy(BidirectionalIterator first, - BidirectionalIterator last, - OutputIterator result); - -T template - void rotate(ForwardIterator first, ForwardIterator middle, - ForwardIterator last); -T template - OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle, - ForwardIterator last, OutputIterator result); -T template - void random_shuffle(RandomAccessIterator first, - RandomAccessIterator last); -T template - void random_shuffle(RandomAccessIterator first, - RandomAccessIterator last, - RandomNumberGenerator& rand); - // _lib.alg.partitions_, partitions: -T template - BidirectionalIterator partition(BidirectionalIterator first, - BidirectionalIterator last, - Predicate pred); -T template - BidirectionalIterator stable_partition(BidirectionalIterator first, - BidirectionalIterator last, - Predicate pred); - // _lib.alg.sorting_, sorting and related operations: - // _lib.alg.sort_, sorting: -T template - void sort(RandomAccessIterator first, RandomAccessIterator last); -T template - void sort(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); -T template - void stable_sort(RandomAccessIterator first, RandomAccessIterator last); -T template - void stable_sort(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); -T template - void partial_sort(RandomAccessIterator first, - RandomAccessIterator middle, - RandomAccessIterator last); -T template - void partial_sort(RandomAccessIterator first, - RandomAccessIterator middle, - RandomAccessIterator last, Compare comp); -T template - RandomAccessIterator - partial_sort_copy(InputIterator first, InputIterator last, - RandomAccessIterator result_first, - RandomAccessIterator result_last); -T template - RandomAccessIterator - partial_sort_copy(InputIterator first, InputIterator last, - RandomAccessIterator result_first, - RandomAccessIterator result_last, - Compare comp); - -T template - void nth_element(RandomAccessIterator first, RandomAccessIterator nth, - RandomAccessIterator last); -T template - void nth_element(RandomAccessIterator first, RandomAccessIterator nth, - RandomAccessIterator last, Compare comp); - // _lib.alg.binary.search_, binary search: -T template - ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, - const T& value); -T template - ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, - const T& value, Compare comp); -T template - ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, - const T& value); -T template - ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, - const T& value, Compare comp); -T template - pair - equal_range(ForwardIterator first, ForwardIterator last, - const T& value); -T template - pair - equal_range(ForwardIterator first, ForwardIterator last, - const T& value, Compare comp); -T template - bool binary_search(ForwardIterator first, ForwardIterator last, - const T& value); -T template - bool binary_search(ForwardIterator first, ForwardIterator last, - const T& value, Compare comp); - // _lib.alg.merge_, merge: -T template - OutputIterator merge(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result); -T template - OutputIterator merge(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result, Compare comp); -T template - void inplace_merge(BidirectionalIterator first, - BidirectionalIterator middle, - BidirectionalIterator last); -T template - void inplace_merge(BidirectionalIterator first, - BidirectionalIterator middle, - BidirectionalIterator last, Compare comp); - - // _lib.alg.set.operations_, set operations: -T template - bool includes(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2); -T template - bool includes(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, Compare comp); -T template - OutputIterator set_union(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result); -T template - OutputIterator set_union(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result, Compare comp); -T template - OutputIterator set_intersection - (InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result); -T template - OutputIterator set_intersection - (InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result, Compare comp); -T template - OutputIterator set_difference - (InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result); -T template - OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result, Compare comp); -T template - OutputIterator - set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result); -T template - OutputIterator - set_symmetric_difference(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - OutputIterator result, Compare comp); - // _lib.alg.heap.operations_, heap operations: -T template - void push_heap(RandomAccessIterator first, RandomAccessIterator last); -T template - void push_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); - -T template - void pop_heap(RandomAccessIterator first, RandomAccessIterator last); -T template - void pop_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); -T template - void make_heap(RandomAccessIterator first, RandomAccessIterator last); -T template - void make_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); -T template - void sort_heap(RandomAccessIterator first, RandomAccessIterator last); -T template - void sort_heap(RandomAccessIterator first, RandomAccessIterator last, - Compare comp); - // _lib.alg.min.max_, minimum and maximum: -T template const T& min(const T& a, const T& b); -T template - const T& min(const T& a, const T& b, Compare comp); -T template const T& max(const T& a, const T& b); -T template - const T& max(const T& a, const T& b, Compare comp); -T template - ForwardIterator min_element(ForwardIterator first, ForwardIterator last); -T template - ForwardIterator min_element(ForwardIterator first, ForwardIterator last, - Compare comp); -T template - ForwardIterator max_element(ForwardIterator first, ForwardIterator last); -T template - ForwardIterator max_element(ForwardIterator first, ForwardIterator last, - Compare comp); -T template - bool lexicographical_compare - (InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2); -T template - bool lexicographical_compare - (InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - Compare comp); - - // _lib.alg.permutation.generators_, permutations -T template - bool next_permutation(BidirectionalIterator first, - BidirectionalIterator last); -T template - bool next_permutation(BidirectionalIterator first, - BidirectionalIterator last, Compare comp); -T template - bool prev_permutation(BidirectionalIterator first, - BidirectionalIterator last); -T template - bool prev_permutation(BidirectionalIterator first, - BidirectionalIterator last, Compare comp); - - - 25.4 C library algorithms [lib.alg.c.library] - - 1 Header (partial, Table 2): - - Table 2--Header synopsis - - Functions: bsearch qsort - - -X extern "C" void *bsearch(const void *key, const void *base, - size_t nmemb, size_t size, - int (*compar)(const void *, const void *)); -X extern "C++" void *bsearch(const void *key, const void *base, - size_t nmemb, size_t size, - int (*compar)(const void *, const void *)); - -X extern "C" void qsort(void* base, size_t nmemb, size_t size, - int (*compar)(const void*, const void*)); -X extern "C++" void qsort(void* base, size_t nmemb, size_t size, - int (*compar)(const void*, const void*)); - - - - 26.2 Complex numbers [lib.complex.numbers] - - - 26.2.1 Header synopsis [lib.complex.synopsis] - -T template class complex; -T template<> class complex; -T template<> class complex; -T template<> class complex; - // _lib.complex.ops_ operators: -T template - complex operator+(const complex&, const complex&); -T template complex operator+(const complex&, const T&); -T template complex operator+(const T&, const complex&); -T template complex operator- - (const complex&, const complex&); -T template complex operator-(const complex&, const T&); -T template complex operator-(const T&, const complex&); -T template complex operator* - (const complex&, const complex&); -T template complex operator*(const complex&, const T&); -T template complex operator*(const T&, const complex&); -T template complex operator/ - (const complex&, const complex&); -T template complex operator/(const complex&, const T&); -T template complex operator/(const T&, const complex&); -T template complex operator+(const complex&); -T template complex operator-(const complex&); -T template bool operator== - (const complex&, const complex&); -T template bool operator==(const complex&, const T&); -T template bool operator==(const T&, const complex&); -T template bool operator!=(const complex&, const complex&); -T template bool operator!=(const complex&, const T&); -T template bool operator!=(const T&, const complex&); -T template - basic_istream& - operator>>(basic_istream&, complex&); - -T template - basic_ostream& - operator<<(basic_ostream&, const complex&); - // _lib.complex.value.ops_ values: -T template T real(const complex&); -T template T imag(const complex&); - -T template T abs(const complex&); -T template T arg(const complex&); -T template T norm(const complex&); -T template complex conj(const complex&); -T template complex polar(const T&, const T&); - // _lib.complex.transcendentals_ transcendentals: -T template complex cos (const complex&); -T template complex cosh (const complex&); -T template complex exp (const complex&); -T template complex log (const complex&); -T template complex log10(const complex&); -T template complex pow(const complex&, int); -T template complex pow(const complex&, const T&); -T template complex pow(const complex&, const complex&); -T template complex pow(const T&, const complex&); -T template complex sin (const complex&); -T template complex sinh (const complex&); -T template complex sqrt (const complex&); -T template complex tan (const complex&); -T template complex tanh (const complex&); - } - - 26.2.2 Template class complex [lib.complex] - - template -T class complex { - public: -T typedef T value_type; - -T complex(const T& re = T(), const T& im = T()); -T complex(const complex&); -T template complex(const complex&); - -T T real() const; -T T imag() const; - -T complex& operator= (const T&); -T complex& operator+=(const T&); -T complex& operator-=(const T&); -T complex& operator*=(const T&); -T complex& operator/=(const T&); - -T complex& operator=(const complex&); -T template complex& operator= (const complex&); -T template complex& operator+=(const complex&); -T template complex& operator-=(const complex&); -T template complex& operator*=(const complex&); -T template complex& operator/=(const complex&); - }; - -T template complex operator+ - (const complex&, const complex&); -T template complex operator+(const complex&, const T&); -T template complex operator+(const T&, const complex&); - -T template complex operator- - (const complex&, const complex&); -T template complex operator-(const complex&, const T&); -T template complex operator-(const T&, const complex&); - -T template complex operator* - (const complex&, const complex&); -T template complex operator*(const complex&, const T&); -T template complex operator*(const T&, const complex&); - -T template complex operator/ - (const complex&, const complex&); -T template complex operator/(const complex&, const T&); -T template complex operator/(const T&, const complex&); - -T template complex operator+(const complex&); -T template complex operator-(const complex&); - -T template bool operator==(const complex&, const complex&); -T template bool operator==(const complex&, const T&); -T template bool operator==(const T&, const complex&); - -T template bool operator!=(const complex&, const complex&); -T template bool operator!=(const complex&, const T&); -T template bool operator!=(const T&, const complex&); - -T template - basic_istream& - operator>>(basic_istream&, complex&); - -T template - basic_ostream& - operator<<(basic_ostream&, const complex&); - - - 26.2.3 complex specializations [lib.complex.special] - -T template<> class complex { - public: -T typedef float value_type; - -T complex(float re = 0.0f, float im = 0.0f); -T explicit complex(const complex&); -T explicit complex(const complex&); -T float real() const; -T float imag() const; - -T complex& operator= (float); -T complex& operator+=(float); -T complex& operator-=(float); -T complex& operator*=(float); -T complex& operator/=(float); - -T complex& operator=(const complex&); -T template complex& operator= (const complex&); -T template complex& operator+=(const complex&); -T template complex& operator-=(const complex&); -T template complex& operator*=(const complex&); -T template complex& operator/=(const complex&); - }; -T template<> class complex { - public: -T typedef double value_type; - -T complex(double re = 0.0, double im = 0.0); -T complex(const complex&); -T explicit complex(const complex&); -T double real() const; -T double imag() const; - -T complex& operator= (double); -T complex& operator+=(double); -T complex& operator-=(double); -T complex& operator*=(double); -T complex& operator/=(double); - -T complex& operator=(const complex&); -T template complex& operator= (const complex&); -T template complex& operator+=(const complex&); -T template complex& operator-=(const complex&); -T template complex& operator*=(const complex&); -T template complex& operator/=(const complex&); - }; - -T template<> class complex { - public: -T typedef long double value_type; - -T complex(long double re = 0.0L, long double im = 0.0L); -T complex(const complex&); -T complex(const complex&); -T long double real() const; -T long double imag() const; - -T complex& operator=(const complex&); -T complex& operator= (long double); -T complex& operator+=(long double); -T complex& operator-=(long double); -T complex& operator*=(long double); -T complex& operator/=(long double); - -T template complex& operator= (const complex&); -T template complex& operator+=(const complex&); -T template complex& operator-=(const complex&); -T template complex& operator*=(const complex&); -T template complex& operator/=(const complex&); - }; - - 26.3 Numeric arrays [lib.numarray] - - 26.3.1 Header synopsis [lib.valarray.synopsis] - -T template class valarray; // An array of type T -T class slice; -T template class slice_array; -T class gslice; -T template class gslice_array; -T template class mask_array; // a masked array -T template class indirect_array; // an indirected array - -T template valarray operator* - (const valarray&, const valarray&); -T template valarray operator* (const valarray&, const T&); -T template valarray operator* (const T&, const valarray&); -T template valarray operator/ - (const valarray&, const valarray&); -T template valarray operator/ (const valarray&, const T&); -T template valarray operator/ (const T&, const valarray&); -T template valarray operator% - (const valarray&, const valarray&); -T template valarray operator% (const valarray&, const T&); -T template valarray operator% (const T&, const valarray&); -T template valarray operator+ - (const valarray&, const valarray&); -T template valarray operator+ (const valarray&, const T&); -T template valarray operator+ (const T&, const valarray&); -T template valarray operator- - (const valarray&, const valarray&); -T template valarray operator- (const valarray&, const T&); -T template valarray operator- (const T&, const valarray&); -T template valarray operator^ - (const valarray&, const valarray&); -T template valarray operator^ (const valarray&, const T&); -T template valarray operator^ (const T&, const valarray&); -T template valarray operator& - (const valarray&, const valarray&); -T template valarray operator& (const valarray&, const T&); -T template valarray operator& (const T&, const valarray&); -T template valarray operator| - (const valarray&, const valarray&); -T template valarray operator| (const valarray&, const T&); -T template valarray operator| (const T&, const valarray&); -T template valarray operator<< - (const valarray&, const valarray&); -T template valarray operator<<(const valarray&, const T&); -T template valarray operator<<(const T&, const valarray&); -T template valarray operator>> - (const valarray&, const valarray&); -T template valarray operator>>(const valarray&, const T&); -T template valarray operator>>(const T&, const valarray&); -T template valarray operator&& - (const valarray&, const valarray&); -T template valarray operator&&(const valarray&, const T&); -T template valarray operator&&(const T&, const valarray&); -T template valarray operator|| - (const valarray&, const valarray&); -T template valarray operator||(const valarray&, const T&); -T template valarray operator||(const T&, const valarray&); - -T template - valarray operator==(const valarray&, const valarray&); -T template valarray operator==(const valarray&, const T&); -T template valarray operator==(const T&, const valarray&); -T template - valarray operator!=(const valarray&, const valarray&); -T template valarray operator!=(const valarray&, const T&); -T template valarray operator!=(const T&, const valarray&); -T template - valarray operator< (const valarray&, const valarray&); -T template valarray operator< (const valarray&, const T&); -T template valarray operator< (const T&, const valarray&); -T template - valarray operator> (const valarray&, const valarray&); -T template valarray operator> (const valarray&, const T&); -T template valarray operator> (const T&, const valarray&); -T template - valarray operator<=(const valarray&, const valarray&); -T template valarray operator<=(const valarray&, const T&); -T template valarray operator<=(const T&, const valarray&); -T template - valarray operator>=(const valarray&, const valarray&); -T template valarray operator>=(const valarray&, const T&); -T template valarray operator>=(const T&, const valarray&); -T template valarray abs (const valarray&); -T template valarray acos (const valarray&); -T template valarray asin (const valarray&); -T template valarray atan (const valarray&); -T template valarray atan2 - (const valarray&, const valarray&); -T template valarray atan2(const valarray&, const T&); -T template valarray atan2(const T&, const valarray&); -T template valarray cos (const valarray&); -T template valarray cosh (const valarray&); -T template valarray exp (const valarray&); -T template valarray log (const valarray&); -T template valarray log10(const valarray&); -T template valarray pow(const valarray&, const valarray&); -T template valarray pow(const valarray&, const T&); -T template valarray pow(const T&, const valarray&); -T template valarray sin (const valarray&); -T template valarray sinh (const valarray&); -T template valarray sqrt (const valarray&); -T template valarray tan (const valarray&); -T template valarray tanh (const valarray&); - } - - - 26.3.2 Template class valarray [lib.template.valarray] - -T template class valarray { - public: -T typedef T value_type; - - // _lib.valarray.cons_ construct/destroy: -T valarray(); -T explicit valarray(size_t); -T valarray(const T&, size_t); -T valarray(const T*, size_t); -T valarray(const valarray&); -T valarray(const slice_array&); -T valarray(const gslice_array&); -T valarray(const mask_array&); -T valarray(const indirect_array&); -T ~valarray(); - - // _lib.valarray.assign_ assignment: -T valarray& operator=(const valarray&); -T valarray& operator=(const T&); -T valarray& operator=(const slice_array&); -T valarray& operator=(const gslice_array&); -T valarray& operator=(const mask_array&); -T valarray& operator=(const indirect_array&); - // _lib.valarray.access_ element access: -T T operator[](size_t) const; -T T& operator[](size_t); - // _lib.valarray.sub_ subset operations: -T valarray operator[](slice) const; -T slice_array operator[](slice); -T valarray operator[](const gslice&) const; -T gslice_array operator[](const gslice&); -T valarray operator[](const valarray&) const; -T mask_array operator[](const valarray&); -T valarray operator[](const valarray&) const; -T indirect_array operator[](const valarray&); - // _lib.valarray.unary_ unary operators: -T valarray operator+() const; -T valarray operator-() const; -T valarray operator~() const; -T valarray operator!() const; - // _lib.valarray.cassign_ computed assignment: -T valarray& operator*= (const T&); -T valarray& operator/= (const T&); -T valarray& operator%= (const T&); -T valarray& operator+= (const T&); -T valarray& operator-= (const T&); -T valarray& operator^= (const T&); -T valarray& operator&= (const T&); -T valarray& operator|= (const T&); -T valarray& operator<<=(const T&); -T valarray& operator>>=(const T&); -T valarray& operator*= (const valarray&); -T valarray& operator/= (const valarray&); -T valarray& operator%= (const valarray&); -T valarray& operator+= (const valarray&); -T valarray& operator-= (const valarray&); -T valarray& operator^= (const valarray&); -T valarray& operator|= (const valarray&); -T valarray& operator&= (const valarray&); -T valarray& operator<<=(const valarray&); -T valarray& operator>>=(const valarray&); - // _lib.valarray.members_ member functions: -T size_t size() const; -T T sum() const; -T T min() const; -T T max() const; - -T valarray shift (int) const; -T valarray cshift(int) const; -T valarray apply(T func(T)) const; -T valarray apply(T func(const T&)) const; -T void resize(size_t sz, T c = T()); - }; - } - - - - 26.3.4 Class slice [lib.class.slice] - -T class slice { - public: -T slice(); -T slice(size_t, size_t, size_t); - -T size_t start() const; -T size_t size() const; -T size_t stride() const; - }; - } - - - - 26.3.5 Template class slice_array [lib.template.slice.array] - -T template class slice_array { - public: -T typedef T value_type; - -T void operator= (const valarray&) const; -T void operator*= (const valarray&) const; -T void operator/= (const valarray&) const; -T void operator%= (const valarray&) const; -T void operator+= (const valarray&) const; -T void operator-= (const valarray&) const; -T void operator^= (const valarray&) const; -T void operator&= (const valarray&) const; -T void operator|= (const valarray&) const; -T void operator<<=(const valarray&) const; -T void operator>>=(const valarray&) const; -T void operator=(const T&); -T ~slice_array(); - private: -T slice_array(); -T slice_array(const slice_array&); -T slice_array& operator=(const slice_array&); - }; - } - - - - 26.3.6 The gslice class [lib.class.gslice] - -T class gslice { - public: -T gslice(); -T gslice(size_t s, const valarray& l, const valarray& d); - -T size_t start() const; -T valarray size() const; -T valarray stride() const; - }; - - - 26.3.7 Template class gslice_array [lib.template.gslice.array] - -T template class gslice_array { - public: -T typedef T value_type; - -T void operator= (const valarray&) const; -T void operator*= (const valarray&) const; -T void operator/= (const valarray&) const; -T void operator%= (const valarray&) const; -T void operator+= (const valarray&) const; -T void operator-= (const valarray&) const; -T void operator^= (const valarray&) const; -T void operator&= (const valarray&) const; -T void operator|= (const valarray&) const; -T void operator<<=(const valarray&) const; -T void operator>>=(const valarray&) const; -T void operator=(const T&); -T ~gslice_array(); - private: -T gslice_array(); -T gslice_array(const gslice_array&); -T gslice_array& operator=(const gslice_array&); - }; - - - 26.3.8 Template class mask_array [lib.template.mask.array] - -T template class mask_array { - public: -T typedef T value_type; - -T void operator= (const valarray&) const; -T void operator*= (const valarray&) const; -T void operator/= (const valarray&) const; -T void operator%= (const valarray&) const; -T void operator+= (const valarray&) const; -T void operator-= (const valarray&) const; -T void operator^= (const valarray&) const; -T void operator&= (const valarray&) const; -T void operator|= (const valarray&) const; -T void operator<<=(const valarray&) const; -T void operator>>=(const valarray&) const; -T void operator=(const T&); -T ~mask_array(); - private: -T mask_array(); -T mask_array(const mask_array&); -T mask_array& operator=(const mask_array&); - // remainder implementation defined - }; - - - 26.3.9 Template class [lib.template.indirect.array] - indirect_array - -T template class indirect_array { - public: -T typedef T value_type; - -T void operator= (const valarray&) const; -T void operator*= (const valarray&) const; -T void operator/= (const valarray&) const; -T void operator%= (const valarray&) const; -T void operator+= (const valarray&) const; -T void operator-= (const valarray&) const; -T void operator^= (const valarray&) const; -T void operator&= (const valarray&) const; -T void operator|= (const valarray&) const; -T void operator<<=(const valarray&) const; -T void operator>>=(const valarray&) const; -T void operator=(const T&); -T ~indirect_array(); - private: -T indirect_array(); -T indirect_array(const indirect_array&); -T indirect_array& operator=(const indirect_array&); - // remainder implementation defined - }; - - 26.4 Generalized numeric operations [lib.numeric.ops] - - Header synopsis - -T template - T accumulate(InputIterator first, InputIterator last, T init); - -T template - T accumulate(InputIterator first, InputIterator last, T init, - BinaryOperation binary_op); - -T template - T inner_product(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, T init); - -T template - T inner_product(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, T init, - BinaryOperation1 binary_op1, - BinaryOperation2 binary_op2); - -T template - OutputIterator partial_sum(InputIterator first, - InputIterator last, - OutputIterator result); - -T template - OutputIterator partial_sum(InputIterator first, - InputIterator last, - OutputIterator result, - BinaryOperation binary_op); - -T template - OutputIterator adjacent_difference(InputIterator first, - InputIterator last, - OutputIterator result); - -T template - OutputIterator adjacent_difference(InputIterator first, - InputIterator last, - OutputIterator result, - BinaryOperation binary_op); - - - 26.5 C Library [lib.c.math] - - Table 2--Header synopsis -X Macro: HUGE_VAL - Functions: -X acos cos fmod modf tan -X asin cosh frexp pow tanh -X atan exp ldexp sin -X atan2 fabs log sinh -X ceil floor log10 sqrt - - Table 3--Header synopsis -X Macros: RAND_MAX -X Types: div_t ldiv_t - Functions: -X abs labs srand -X div ldiv rand - -X long abs(long); // labs() -X ldiv_t div(long, long); // ldiv() - -X float abs (float); -X float acos (float); -X float asin (float); -X float atan (float); -X float atan2(float, float); -X float ceil (float); -X float cos (float); -X float cosh (float); -X float exp (float); -X float fabs (float); -X float floor(float); -X float fmod (float, float); -X float frexp(float, int*); -X float ldexp(float, int); -X float log (float); -X float log10(float); -X float modf (float, float*); -X float pow (float, float); -X float pow (float, int); -X float sin (float); -X float sinh (float); -X float sqrt (float); -X float tan (float); -X float tanh (float); - -X double abs(double); // fabs() -X double pow(double, int); - -X long double abs (long double); -X long double acos (long double); -X long double asin (long double); -X long double atan (long double); -X long double atan2(long double, long double); -X long double ceil (long double); -X long double cos (long double); -X long double cosh (long double); -X long double exp (long double); -X long double fabs (long double); -X long double floor(long double); -X long double fmod (long double, long double); -X long double frexp(long double, int*); -X long double ldexp(long double, int); -X long double log (long double); -X long double log10(long double); -X long double modf (long double, long double*); -X long double pow (long double, long double); -X long double pow (long double, int); -X long double sin (long double); -X long double sinh (long double); -X long double sqrt (long double); -X long double tan (long double); -X long double tanh (long double); - - Header synopsis - -X template class char_traits; -X template<> class char_traits; -X template<> class char_traits; -X template class allocator; -X template > - class basic_ios; - -X template > - class basic_streambuf; - -X template > - class basic_istream; - -X template > - class basic_ostream; - -X template > - class basic_iostream; - -X template , - class Allocator = allocator > - class basic_stringbuf; - -X template , - class Allocator = allocator > - class basic_istringstream; - -X template , - class Allocator = allocator > - class basic_ostringstream; - -X template , - class Allocator = allocator > - class basic_stringstream; - -X template > - class basic_filebuf; - -X template > - class basic_ifstream; - -X template > - class basic_ofstream; - -X template > - class basic_fstream; -X template > - class istreambuf_iterator; - -X template > - class ostreambuf_iterator; -X typedef basic_ios ios; -X typedef basic_ios wios; -X typedef basic_streambuf streambuf; -X typedef basic_istream istream; -X typedef basic_ostream ostream; -X typedef basic_iostream iostream; -X typedef basic_stringbuf stringbuf; -X typedef basic_istringstream istringstream; -X typedef basic_ostringstream ostringstream; -X typedef basic_stringstream stringstream; -X typedef basic_filebuf filebuf; -X typedef basic_ifstream ifstream; -X typedef basic_ofstream ofstream; -X typedef basic_fstream fstream; -X typedef basic_streambuf wstreambuf; -X typedef basic_istream wistream; -X typedef basic_ostream wostream; -X typedef basic_iostream wiostream; -X typedef basic_stringbuf wstringbuf; -X typedef basic_istringstream wistringstream; -X typedef basic_ostringstream wostringstream; -X typedef basic_stringstream wstringstream; - -X typedef basic_filebuf wfilebuf; -X typedef basic_ifstream wifstream; -X typedef basic_ofstream wofstream; -X typedef basic_fstream wfstream; -X template class fpos; -X typedef fpos::state_type> streampos; -X typedef fpos::state_type> wstreampos; - - 27.3 Standard iostream objects [lib.iostream.objects] - - Header synopsis - -T [must also include and ] -T extern istream cin; -T extern ostream cout; -T extern ostream cerr; -T extern ostream clog; - -T extern wistream wcin; -T extern wostream wcout; -T extern wostream wcerr; -T extern wostream wclog; - - 27.4 Iostreams base classes [lib.iostreams.base] - - Header synopsis - - #include - -T typedef OFF_T streamoff; -T typedef SZ_T streamsize; -T template class fpos; - - class ios_base; - template > - class basic_ios; - // _lib.std.ios.manip_, manipulators: -T ios_base& boolalpha (ios_base& str); -T ios_base& noboolalpha(ios_base& str); -T ios_base& showbase (ios_base& str); -T ios_base& noshowbase (ios_base& str); -T ios_base& showpoint (ios_base& str); -T ios_base& noshowpoint(ios_base& str); -T ios_base& showpos (ios_base& str); -T ios_base& noshowpos (ios_base& str); -T ios_base& skipws (ios_base& str); -T ios_base& noskipws (ios_base& str); -T ios_base& nouppercase(ios_base& str); -T ios_base& uppercase (ios_base& str); -M ios_base& unitbuf (ios_base& str); -M ios_base& nounitbuf (ios_base& str); - // _lib.adjustfield.manip_ adjustfield: -T ios_base& internal (ios_base& str); -T ios_base& left (ios_base& str); -T ios_base& right (ios_base& str); - // _lib.basefield.manip_ basefield: -T ios_base& dec (ios_base& str); -T ios_base& hex (ios_base& str); -T ios_base& oct (ios_base& str); - - // _lib.floatfield.manip_ floatfield: -T ios_base& fixed (ios_base& str); -T ios_base& scientific (ios_base& str); - - - 27.4.2 Class ios_base [lib.ios.base] - -T class ios_base { - public: - class failure; -T typedef T1 fmtflags; -T static const fmtflags boolalpha; -T static const fmtflags dec; -T static const fmtflags fixed; -T static const fmtflags hex; -T static const fmtflags internal; -T static const fmtflags left; -T static const fmtflags oct; -T static const fmtflags right; -T static const fmtflags scientific; -T static const fmtflags showbase; -T static const fmtflags showpoint; -T static const fmtflags showpos; -T static const fmtflags skipws; -X static const fmtflags unitbuf; -T static const fmtflags uppercase; -T static const fmtflags adjustfield; -T static const fmtflags basefield; -T static const fmtflags floatfield; - - typedef T2 iostate; -T static const iostate badbit; -T static const iostate eofbit; -T static const iostate failbit; -T static const iostate goodbit; -T typedef T3 openmode; -T static const openmode app; -T static const openmode ate; -T static const openmode binary; -T static const openmode in; -T static const openmode out; -T static const openmode trunc; -T typedef T4 seekdir; -T static const seekdir beg; -T static const seekdir cur; -T static const seekdir end; -T class Init; - // _lib.fmtflags.state_ fmtflags state: -T fmtflags flags() const; -T fmtflags flags(fmtflags fmtfl); -T fmtflags setf(fmtflags fmtfl); -T fmtflags setf(fmtflags fmtfl, fmtflags mask); -T void unsetf(fmtflags mask); -T streamsize precision() const; -T streamsize precision(streamsize prec); -T streamsize width() const; -T streamsize width(streamsize wide); - // _lib.ios.base.locales_ locales: -T locale imbue(const locale& loc); -T locale getloc() const; - // _lib.ios.base.storage_ storage: -T static int xalloc(); -T long& iword(int index); -T void*& pword(int index); - // destructor -T virtual ~ios_base(); - // _lib.ios.base.callback_ callbacks; -T enum event { erase_event, imbue_event, copyfmt_event }; -T typedef void (*event_callback)(event, ios_base&, int index); -T void register_callback(event_call_back fn, int index); -T static bool sync_with_stdio(bool sync = true); - protected: -T ios_base(); - }; - - 27.4.2.1.1 Class ios_base::failure [lib.ios::failure] - -T class ios_base::failure : public exception { - public: -T explicit failure(const string& msg); -T virtual ~failure(); -T virtual const char* what() const throw(); - }; - - - 27.4.2.1.6 Class ios_base::Init [lib.ios::Init] - -T class ios_base::Init { - public: -T Init(); -T ~Init(); - }; - - - 27.4.3 Template class fpos [lib.fpos] - -X template class fpos { - public: - // _lib.fpos.members_ Members -T stateT state() const; -T void state(stateT); - private; -T stateT st; // exposition only - }; - - - 27.4.5 Template class basic_ios [lib.ios] - - template > -X class basic_ios : public ios_base { - public: - - // Types: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; -T operator void*() const -T bool operator!() const -T iostate rdstate() const; -T void clear(iostate state = goodbit); -T void setstate(iostate state); -T bool good() const; -T bool eof() const; -T bool fail() const; -T bool bad() const; -T iostate exceptions() const; -T void exceptions(iostate except); - // _lib.basic.ios.cons_ Constructor/destructor: -T explicit basic_ios(basic_streambuf* sb); -T virtual ~basic_ios(); - // _lib.basic.ios.members_ Members: -T basic_ostream* tie() const; -T basic_ostream* tie(basic_ostream* tiestr); -T basic_streambuf* rdbuf() const; -T basic_streambuf* rdbuf(basic_streambuf* sb); -X basic_ios& copyfmt(const basic_ios& rhs); -T char_type fill() const; -T char_type fill(char_type ch); - // _lib.ios.base.locales_ locales: -T locale imbue(const locale& loc); -X char narrow(char_type c, char dfault) const; -X char_type widen(char c) const; - protected: - basic_ios(); -T void init(basic_streambuf* sb); - private: -T basic_ios(const basic_ios& ); // not defined -T basic_ios& operator=(const basic_ios&); // not defined - }; - - - 27.5 Stream buffers [lib.stream.buffers] - - Header synopsis - -X template > - class basic_streambuf; -T typedef basic_streambuf streambuf; -T typedef basic_streambuf wstreambuf; - - 27.5.2 Template class [lib.streambuf] - basic_streambuf - - template > -X class basic_streambuf { - public: - - // Types: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; -T virtual ~basic_streambuf(); - // _lib.streambuf.locales_ locales: -T locale pubimbue(const locale &loc); -T locale getloc() const; - // _lib.streambuf.buffer_ buffer and positioning: -T basic_streambuf* - pubsetbuf(char_type* s, streamsize n); -T pos_type pubseekoff(off_type off, ios_base::seekdir way, - ios_base::openmode which = - ios_base::in | ios_base::out); -T pos_type pubseekpos(pos_type sp, - ios_base::openmode which = - ios_base::in | ios_base::out); -T int pubsync(); - - // Get and put areas: - // _lib.streambuf.pub.get_ Get area: -T streamsize in_avail(); -T int_type snextc(); -T int_type sbumpc(); -T int_type sgetc(); -T streamsize sgetn(char_type* s, streamsize n); - // _lib.streambuf.pub.pback_ Putback: -X int_type sputbackc(char_type c); -X int_type sungetc(); - // _lib.streambuf.pub.put_ Put area: -T int_type sputc(char_type c); -X streamsize sputn(const char_type* s, streamsize n); - protected: -T basic_streambuf(); - // _lib.streambuf.get.area_ Get area: -T char_type* eback() const; -T char_type* gptr() const; -T char_type* egptr() const; -T void gbump(int n); -T void setg(char_type* gbeg, char_type* gnext, char_type* gend); - // _lib.streambuf.put.area_ Put area: -T char_type* pbase() const; -T char_type* pptr() const; -T char_type* epptr() const; -T void pbump(int n); -T void setp(char_type* pbeg, char_type* pend); - // _lib.streambuf.virtuals_ virtual functions: - // _lib.streambuf.virt.locales_ Locales: -T virtual void imbue(const locale &loc); - // _lib.streambuf.virt.buffer_ Buffer management and positioning: -T virtual basic_streambuf* - setbuf(char_type* s, streamsize n); -T virtual pos_type seekoff(off_type off, ios_base::seekdir way, - ios_base::openmode which = ios_base::in | ios_base::out); -T virtual pos_type seekpos(pos_type sp, - ios_base::openmode which = ios_base::in | ios_base::out); -T virtual int sync(); - // _lib.streambuf.virt.get_ Get area: -T virtual int showmanyc(); -T virtual streamsize xsgetn(char_type* s, streamsize n); -T virtual int_type underflow(); -T virtual int_type uflow(); - // _lib.streambuf.virt.pback_ Putback: -T virtual int_type pbackfail(int_type c = traits::eof()); - // _lib.streambuf.virt.put_ Put area: -X virtual streamsize xsputn(const char_type* s, streamsize n); -T virtual int_type overflow (int_type c = traits::eof()); - }; - - 27.6 Formatting and manipulators [lib.iostream.format] - - Header synopsis - -T template > - class basic_istream; -T typedef basic_istream istream; -T typedef basic_istream wistream; - -T template > - class basic_iostream; -T typedef basic_iostream iostream; -T typedef basic_iostream wiostream; - -X template - basic_istream& ws(basic_istream& is); - - Header synopsis - -X template > - class basic_ostream; -T typedef basic_ostream ostream; -T typedef basic_ostream wostream; - -T template - basic_ostream& endl(basic_ostream& os); -T template - basic_ostream& ends(basic_ostream& os); -T template - basic_ostream& flush(basic_ostream& os); - - Header synopsis - - // Types T1, T2, ... are unspecified implementation types -T T1 resetiosflags(ios_base::fmtflags mask); -T T2 setiosflags (ios_base::fmtflags mask); -T T3 setbase(int base); -T template T4 setfill(charT c); -T T5 setprecision(int n); -T T6 setw(int n); - - - 27.6.1.1 Template class basic_istream [lib.istream] - - template > -T class basic_istream : virtual public basic_ios { - public: - // Types (inherited from basic_ios (_lib.ios_)): -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.istream.cons_ Constructor/destructor: -T explicit basic_istream(basic_streambuf* sb); -T virtual ~basic_istream(); - // _lib.istream::sentry_ Prefix/suffix: -T class sentry; - - // _lib.istream.formatted_ Formatted input: -T basic_istream& operator>> - (basic_istream& (*pf)(basic_istream&)) -T basic_istream& operator>> - (basic_ios& (*pf)(basic_ios&)) -T basic_istream& operator>> - (ios_base& (*pf)(ios_base&)) -S basic_istream& operator>>(bool& n); -S basic_istream& operator>>(short& n); -S basic_istream& operator>>(unsigned short& n); -S basic_istream& operator>>(int& n); -S basic_istream& operator>>(unsigned int& n); -S basic_istream& operator>>(long& n); -S basic_istream& operator>>(unsigned long& n); -S basic_istream& operator>>(float& f); -S basic_istream& operator>>(double& f); -S basic_istream& operator>>(long double& f); -S basic_istream& operator>>(void*& p); -S basic_istream& operator>> - (basic_streambuf* sb); - // _lib.istream.unformatted_ Unformatted input: -T streamsize gcount() const; -S int_type get(); -S basic_istream& get(char_type& c); -S basic_istream& get(char_type* s, streamsize n); -S basic_istream& get(char_type* s, streamsize n, - char_type delim); -S basic_istream& get(basic_streambuf& sb); -S basic_istream& get(basic_streambuf& sb, - char_type delim); -S basic_istream& getline(char_type* s, streamsize n); -S basic_istream& getline(char_type* s, streamsize n, - char_type delim); -S basic_istream& ignore - (streamsize n = 1, int_type delim = traits::eof()); -S int_type peek(); -S basic_istream& read (char_type* s, streamsize n); -S streamsize readsome(char_type* s, streamsize n); -S basic_istream& putback(char_type c); -S basic_istream& unget(); -S int sync(); - -S pos_type tellg(); -S basic_istream& seekg(pos_type); -S basic_istream& seekg(off_type, ios_base::seekdir); - }; - - // _lib.istream::extractors_ character extraction templates: -S template - basic_istream& operator>>(basic_istream&, - charT&); -S template - basic_istream& operator>>(basic_istream&, - unsigned char&); -S template - basic_istream& operator>>(basic_istream&, - signed char&); - -S template - basic_istream& operator>>(basic_istream&, - charT*); -S template - basic_istream& operator>>(basic_istream&, - unsigned char*); -S template - basic_istream& operator>>(basic_istream&, - signed char*); - - 27.6.1.1.2 Class basic_istream::sentry [lib.istream::sentry] - - - template > -S class basic_istream::sentry { - typedef traits traits_type; -S bool ok_; // exposition only - public: -S explicit sentry(basic_istream& is, bool noskipws = false); -S ~sentry(); -S operator bool() const { return ok_; } - private: -T sentry(const sentry&); // not defined -T sentry& operator=(const sentry&); // not defined - }; - - - 27.6.1.5 Template class basic_iostream [lib.iostreamclass] - - template > -T class basic_iostream : - public basic_istream, - public basic_ostream { - public: - // constructor/destructor -T explicit basic_iostream(basic_streambuf* sb); -T virtual ~basic_iostream(); - }; - - - 27.6.2.1 Template class basic_ostream [lib.ostream] - - template > -X class basic_ostream : virtual public basic_ios { - public: - // Types (inherited from basic_ios (_lib.ios_)): -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.ostream.cons_ Constructor/destructor: -T explicit basic_ostream(basic_streambuf* sb); -T virtual ~basic_ostream(); - // _lib.ostream::sentry_ Prefix/suffix: -T class sentry; - // _lib.ostream.formatted_ Formatted output: -T basic_ostream& operator<< - (basic_ostream& (*pf)(basic_ostream&)); -T basic_ostream& operator<< - (basic_ios& (*pf)(basic_ios&)); -T basic_ostream& operator<< - (ios_base& (*pf)(ios_base&)); -T basic_ostream& operator<<(bool n); -T basic_ostream& operator<<(short n); -T basic_ostream& operator<<(unsigned short n); -T basic_ostream& operator<<(int n); -T basic_ostream& operator<<(unsigned int n); -T basic_ostream& operator<<(long n); -T basic_ostream& operator<<(unsigned long n); -S basic_ostream& operator<<(float f); -S basic_ostream& operator<<(double f); -S basic_ostream& operator<<(long double f); -T basic_ostream& operator<<(const void* p); -X basic_ostream& operator<< - (basic_streambuf* sb); - // _lib.ostream.unformatted_ Unformatted output: -T basic_ostream& put(char_type c); -T basic_ostream& write(const char_type* s, streamsize n); -X basic_ostream& flush(); - - // _lib.ostream.seeks_ seeks: -S pos_type tellp(); -S basic_ostream& seekp(pos_type); -S basic_ostream& seekp(off_type, ios_base::seekdir); - }; - // _lib.ostream.inserters.character_ character inserters -X template - basic_ostream& operator<<(basic_ostream&, - charT); -X template - basic_ostream& operator<<(basic_ostream&, - char); - // specialization -X template - basic_ostream& operator<<(basic_ostream&, - char); - // signed and unsigned -X template - basic_ostream& operator<<(basic_ostream&, - signed char); -X template - basic_ostream& operator<<(basic_ostream&, - unsigned char) -X template - basic_ostream& operator<<(basic_ostream&, - const charT*); -X template - basic_ostream& operator<<(basic_ostream&, - const char*); - // partial specializationss -X template - basic_ostream& operator<<(basic_ostream&, - const char*); - // signed and unsigned -X template - basic_ostream& operator<<(basic_ostream&, - const signed char*); -X template - basic_ostream& operator<<(basic_ostream&, - const unsigned char*); - - - 27.6.2.3 Class basic_ostream::sentry [lib.ostream::sentry] - - template > -X class basic_ostream::sentry { - bool ok_; // exposition only - public: -X explicit sentry(basic_ostream& os); -X ~sentry(); -X operator bool() const { return ok_; } - private -X sentry(const sentry&); // not defined -X sentry& operator=(const sentry&); // not defined - }; - - 27.7 String-based streams [lib.string.streams] - - Header synopsis - -X template , - class Allocator = allocator > - class basic_stringbuf; - -T typedef basic_stringbuf stringbuf; -T typedef basic_stringbuf wstringbuf; - - template , - class Allocator = allocator > -X class basic_istringstream; - -T typedef basic_istringstream istringstream; -T typedef basic_istringstream wistringstream; - - template , - class Allocator = allocator > -X class basic_ostringstream; -T typedef basic_ostringstream ostringstream; -T typedef basic_ostringstream wostringstream; - - template , - class Allocator = allocator > -X class basic_stringstream; -T typedef basic_stringstream stringstream; -T typedef basic_stringstream wstringstream; - - 27.7.1 Template class basic_stringbuf [lib.stringbuf] - - template , - class Allocator = allocator > -X class basic_stringbuf : public basic_streambuf { - public: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.stringbuf.cons_ Constructors: -S explicit basic_stringbuf(ios_base::openmode which - = ios_base::in | ios_base::out); -S explicit basic_stringbuf - (const basic_string& str, - ios_base::openmode which = ios_base::in | ios_base::out); - // _lib.stringbuf.members_ Get and set: -S basic_string str() const; -S void str(const basic_string& s); - - protected: - // _lib.stringbuf.virtuals_ Overridden virtual functions: -S virtual int_type underflow(); -S virtual int_type pbackfail(int_type c = traits::eof()); -S virtual int_type overflow (int_type c = traits::eof()); -S virtual basic_streambuf* setbuf(charT*, streamsize); - -S virtual pos_type seekoff(off_type off, ios_base::seekdir way, - ios_base::openmode which - = ios_base::in | ios_base::out); -S virtual pos_type seekpos(pos_type sp, - ios_base::openmode which - = ios_base::in | ios_base::out); - }; - - - 27.7.2 Template class basic_istringstream [lib.istringstream] - - template , - class Allocator = allocator > -X class basic_istringstream : public basic_istream { - public: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.istringstream.cons_ Constructors: -S explicit basic_istringstream(ios_base::openmode which = ios_base::in); -S explicit basic_istringstream( - const basic_string& str, - ios_base::openmode which = ios_base::in); - - // _lib.istringstream.members_ Members: -S basic_stringbuf* rdbuf() const; -S basic_string str() const; -S void str(const basic_string& s); - private: - // basic_stringbuf sb; exposition only - }; - - 27.7.3 Class basic_ostringstream [lib.ostringstream] - - template , - class Allocator = allocator > -X class basic_ostringstream : public basic_ostream { - public: - - // Types: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; - // _lib.ostringstream.cons_ Constructors/destructor: -S explicit basic_ostringstream(ios_base::openmode which = ios_base::out); -S explicit basic_ostringstream( - const basic_string& str, - ios_base::openmode which = ios_base::out); - // _lib.ostringstream.members_ Members: -S basic_stringbuf* rdbuf() const; -S basic_string str() const; -S void str(const basic_string& s); - }; - - - 27.7.4 Template class basic_stringstream [lib.stringstream] - - template , - class Allocator = allocator > -X class basic_stringstream - : public basic_iostream { - public: - // Types -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; - // constructors/destructors -S explicit basic_stringstream( - ios_base::openmode which = ios_base::out|ios_base::in); -S explicit basic_stringstream( - const basic_string& str, - ios_base::openmode which = ios_base::out|ios_base::in); - // Members: -S basic_stringbuf* rdbuf() const; -S basic_string str() const; -S void str(const basic_string& str); - }; - - - - 27.8.1 File streams [lib.fstreams] - - - Header synopsis - -X template > - class basic_filebuf; -T typedef basic_filebuf filebuf; -T typedef basic_filebuf wfilebuf; - -X template > - class basic_ifstream; -T typedef basic_ifstream ifstream; -T typedef basic_ifstream wifstream; - -X template > - class basic_ofstream; -T typedef basic_ofstream ofstream; -T typedef basic_ofstream wofstream; - -X template > - class basic_fstream; -T typedef basic_fstream fstream; -T typedef basic_fstream wfstream; - - 27.8.1.1 Template class basic_filebuf [lib.filebuf] - - template > -X class basic_filebuf : public basic_streambuf { - public: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.filebuf.cons_ Constructors/destructor: -X basic_filebuf(); -X virtual ~basic_filebuf(); - // _lib.filebuf.members_ Members: -T bool is_open() const; -X basic_filebuf* open - (const char* s, ios_base::openmode mode); -X basic_filebuf* close(); - protected: - // _lib.filebuf.virtuals_ Overridden virtual functions: -X virtual streamsize showmanyc(); -X virtual int_type underflow(); -X virtual int_type uflow(); -X virtual int_type pbackfail(int_type c = traits::eof()); -X virtual int_type overflow (int_type c = traits::eof()); -S virtual basic_streambuf* - setbuf(char_type* s, streamsize n); -S virtual pos_type seekoff(off_type off, ios_base::seekdir way, - ios_base::openmode which - = ios_base::in | ios_base::out); -S virtual pos_type seekpos(pos_type sp, ios_base::openmode which - = ios_base::in | ios_base::out); -S virtual int sync(); -S virtual void imbue(const locale& loc); - }; - - - - 27.8.1.5 Template class basic_ifstream [lib.ifstream] - - template > -X class basic_ifstream : public basic_istream { - public: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.ifstream.cons_ Constructors: -S basic_ifstream(); -S explicit basic_ifstream(const char* s, - ios_base::openmode mode = ios_base::in); - // _lib.ifstream.members_ Members: -S basic_filebuf* rdbuf() const; -S bool is_open(); -S void open(const char* s, ios_base::openmode mode = ios_base::in); -S void close(); - }; - - - 27.8.1.8 Template class basic_ofstream [lib.ofstream] - - template > -X class basic_ofstream : public basic_ostream { - public: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // _lib.ofstream.cons_ Constructors: -X basic_ofstream(); -X explicit basic_ofstream(const char* s, - ios_base::openmode mode - = ios_base::out); - // _lib.ofstream.members_ Members: -X basic_filebuf* rdbuf() const; -T bool is_open(); -X void open(const char* s, ios_base::openmode mode = ios_base::out); -X void close(); - }; - - - 27.8.1.11 Template class basic_fstream [lib.fstream] - - template > -X class basic_fstream - : public basic_iostream { - public: -T typedef charT char_type; -T typedef typename traits::int_type int_type; -T typedef typename traits::pos_type pos_type; -T typedef typename traits::off_type off_type; -T typedef traits traits_type; - // constructors/destructor -S basic_fstream(); -S explicit basic_fstream( - const char* s, - ios_base::openmode mode = ios_base::in|ios_base::out); - - // Members: -S basic_filebuf* rdbuf() const; -S bool is_open(); -S void open( - const char* s, - ios_base::openmode mode = ios_base::in|ios_base::out); -S void close(); - }; - - - - 27.8.2 C Library files [lib.c.files] - - - Table 13--Header synopsis - Macros: -X BUFSIZ L_tmpnam SEEK_SET TMP_MAX -X EOF NULL stderr _IOFBF -X FILENAME_MAX SEEK_CUR stdin _IOLBF -X FOPEN_MAX SEEK_END stdout _IONBF - -X Types: FILE fpos_t size_t - Functions: -X clearerr fgets fscanf gets rewind -X fclose fopen fseek perror scanf tmpnam -X feof fprintf fsetpos printf setbuf ungetc -X ferror fputc ftell putc setvbuf vprintf -X fflush fputs fwrite puts sprintf vfprintf -X fgetc fread getc remove sscanf vsprintf -X fgetpos freopen getchar putchar rename tmpfile - - - - - 1.5 Standard C library headers [depr.c.headers] - -X - - - - - 1.6 Old iostreams members [depr.ios.members] - - [Note: these should be #ifdef'd to permit diagnostics if used.] - namespace std { - class ios_base { - public: -T typedef T1 io_state; -T typedef T2 open_mode; -T typedef T3 seek_dir; -T typedef OFF_T streamoff; -T typedef OFF_T streampos; - // remainder unchanged - }; - } - - [Note: these should be #ifdef'd to permit diagnostics if used.] - namespace std { - template > - class basic_streambuf { - public: -T void stossc(); - // remainder unchanged - }; - } - - 8 An implementation may provide the following member functions that - overload signatures specified in clause _lib.iostreams_: - - [Note: the following overloads should be #ifdef'd to permit - diagnostics to be emitted, by default, if used.] - - template class basic_ios { - public: -M void clear(io_state state); -M void setstate(io_state state); - // remainder unchanged - }; - class ios_base { - public: -M void exceptions(io_state); - // remainder unchanged - }; - template > - class basic_streambuf { - public: -M pos_type pubseekoff(off_type off, ios_base::seek_dir way, - ios_base::open_mode which = ios_base::in | ios_base::out); -M pos_type pubseekpos(pos_type sp, - ios_base::open_mode which = ios_base::in | ios_base::out); - // remainder unchanged - }; - template > - class basic_filebuf : public basic_streambuf { - public: -M basic_filebuf* open - (const char* s, ios_base::open_mode mode); - // remainder unchanged - }; - template > - class basic_ifstream : public basic_istream { - public: -M void open(const char* s, ios_base::open_mode mode = in); - // remainder unchanged - }; - template > - class basic_ofstream : public basic_ostream { - public: -M void open(const char* s, ios_base::open_mode mode = out | trunc); - // remainder unchanged - }; - } - - - - 1.7.1 Class strstreambuf [depr.strstreambuf] - - [Note: It should be possible to adopt these components with only - minor changes from the 2.8 version of the library.] - -M class strstreambuf : public basic_streambuf { - public: -M explicit strstreambuf(streamsize alsize_arg = 0); -M strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*)); -M strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0); -M strstreambuf(const char* gnext_arg, streamsize n); -M strstreambuf(signed char* gnext_arg, streamsize n, - signed char* pbeg_arg = 0); -M strstreambuf(const signed char* gnext_arg, streamsize n); -M strstreambuf(unsigned char* gnext_arg, streamsize n, - unsigned char* pbeg_arg = 0); -M strstreambuf(const unsigned char* gnext_arg, streamsize n); -M virtual ~strstreambuf(); -M void freeze(bool freezefl = true); -M char* str(); -M int pcount(); - protected: -M virtual int_type overflow (int_type c = EOF); -M virtual int_type pbackfail(int_type c = EOF); -M virtual int_type underflow(); -M virtual pos_type seekoff(off_type off, ios_base::seekdir way, - ios_base::openmode which - = ios_base::in | ios_base::out); -M virtual pos_type seekpos(pos_type sp, ios_base::openmode which - = ios_base::in | ios_base::out); -M virtual streambuf* setbuf(char* s, streamsize n); - } - - 1.7.4 Class strstream [depr.strstream] - -M class strstream - : public basic_iostream { - public: - // Types -M typedef char char_type; -M typedef typename char_traits::int_type int_type -M typedef typename char_traits::pos_type pos_type; -M typedef typename char_traits::off_type off_type; - // consturctors/destructor -M strstream(); -M strstream(char* s, int n, - ios_base::openmode mode = ios_base::in|ios_base::out); -M virtual ~strstream(); - // Members: -M strstreambuf* rdbuf() const; -M void freeze(bool freezefl = true); -M int pcount() const; -M char* str(); - }; - diff --git a/libstdc++-v3/docs/html/17_intro/HEADER_POLICY b/libstdc++-v3/docs/html/17_intro/HEADER_POLICY deleted file mode 100644 index c6fa6d3..0000000 --- a/libstdc++-v3/docs/html/17_intro/HEADER_POLICY +++ /dev/null @@ -1,164 +0,0 @@ - -Header Policy -------------- - -The C++ Standard specifies many mutual dependencies among the -headers it defines. It offers no advice on how to arrange headers -to avoid problems. The worst such problem is circular references. -Most simply this is "A includes B, B includes A": - - // file // file - #ifndef A #ifndef B - #define A 1 #define B 1 - #include #include - typedef int A_type; typedef int B_type; - extern B_type g(A_type); extern A_type f(B_type); - #endif /* A */ #endif /* B */ - - // file C.cc - #include - -The typical effect of such an "include loop" may be seen by tracing -the preprocessor activity: - - C // file C.cc - C #include - A // file - A #ifndef A - A #define A 1 - A #include - B // file - B #ifndef B - B #define B 1 - B #include - A // file - A #ifndef A <-- oops, cpp symbol A defined already - A ... <-- skip contents - A #endif - B typedef int B_type; - B extern A_type f(B_type); <-- error, A_type not defined yet. - B #endif /* B */ - A typedef int A_type; - A extern B_type g(A_type); - A #endif /* A */ - -The main symptom of #include loops is that definitions from file -are not available after the #include for certain include orders. -The number of standard headers makes testing all permutations of -include order impractical, so a policy is needed to prevent chaos. -In any case, for some standard headers (as for the above) no ordering -can eliminate the loop. - -Other factors influence the policy. Typical implementations of -Make (unfortunately including GNU make) have bugs relating to file -names with no suffix, that lead to such problems as failure to track -dependencies on such files and an inclination to _delete_ them. -Therefore, headers used in building the library are always of the -form generally, or specifically for -an equivalent to the standard header . - -Standard headers are all placed under directory std/, and -are ignored except during installation. These headers simply -#include the corresponding header . - -Standard substitute headers that have any complexity -may sub-include other headers. When they sub-include non-standard -headers, they first include all the headers required for that -non-standard header. - -Mutual dependencies are handled by splitting up the declarations -intended for standard headers among two or more files, and then -interleaving them as needed. For example, we replace and -above, as follows: - - // file - #ifndef _CPP_A - #define _CPP_A - # include - # include - # include - #endif - - // file - #ifndef _CPP_B - #define _CPP_B - # include - # include - # include - #endif - - // file - #ifndef _CPP_BITS_A_TYPES_H - #define _CPP_BITS_A_TYPES_H - typedef int A_type; - #endif - - // file - #ifndef _CPP_BITS_B_TYPES_H - #define _CPP_BITS_B_TYPES_H - typedef int B_type; - #endif - - // file - #ifndef _CPP_BITS_A_FUNS_H - #define _CPP_BITS_A_FUNS_H - extern B_type g(A_type); - #endif - - // file - #ifndef _CPP_BITS_B_FUNS_H - #define _CPP_BITS_B_FUNS_H - extern A_type f(B_type); - #endif - -Of course we have the standard headers under their mandated names: - - // file - #ifndef _CPP_A - #define _CPP_A - # include - #endif - - // file - #ifndef _CPP_B - #define _CPP_B - # include - #endif - -Notice that the include guards are named uniformly except that -the guard for standard header is just _CPP_A, -identically as the header in std/. - -At installation the files std/* can be replaced by symbolic links, -or simply copied into place as is. The result is: - - include/ - include/A -> bits/std_A.h - include/B -> bits/std_A.h - include/bits/ - include/bits/std_A.h - include/bits/std_B.h - include/bits/A_types.h - include/bits/B_types.h - include/bits/A_funs.h - include/bits/B_funs.h - - -Of course splitting up standard headers this way creates -complexity, so it is not done routinely, but only in response -to discovered needs. - -Another reason to split up headers is for support of separate -compilation of templates. This interacts with the foregoing -because template definitions typically have many more dependencies -on other headers than do pure declarations. Non-inline template -definitions are placed in a separate ".tcc" file that is included -by the standard header, and any other standard header that -requires definitions from it for its implementation. - -The key to preventing chaos, given the above structure, is: - - Only standard headers should sub-include - other headers. - - diff --git a/libstdc++-v3/docs/html/17_intro/PROBLEMS b/libstdc++-v3/docs/html/17_intro/PROBLEMS deleted file mode 100644 index 5222391..0000000 --- a/libstdc++-v3/docs/html/17_intro/PROBLEMS +++ /dev/null @@ -1,8 +0,0 @@ -Irix 6.2: -- math.h: defines extern long double hypotl( long double ); i.e., only - one argument. They've fixed this in 6.3. - -DES OSF 3.2 & 4.0: -- libm define sincos, sincosf, and sincosl but there are no prototypes and - especially the return type is nowhere defined. The functions are - documented in the man pages, though. diff --git a/libstdc++-v3/docs/html/17_intro/RELEASE-NOTES b/libstdc++-v3/docs/html/17_intro/RELEASE-NOTES deleted file mode 100644 index 7992040..0000000 --- a/libstdc++-v3/docs/html/17_intro/RELEASE-NOTES +++ /dev/null @@ -1,83 +0,0 @@ -2002-05-02 - -Release Notes -------------- -The Standard C++ Library, or libstdc++-v3, is an ongoing project -to fully implement the ISO 14882 Standard C++ library as described in -chapters 17 through 27 and annex D. - -This is the fifteenth snapshot of the libstdc++ rewrite. It still -has some incomplet and incorrekt parts, but it's a lot less incomplete -and incorrect than some of the earlier snapshots, and quite usable. - -The Standard C++ Library, follows an open development model, -attempting to be fully buzzword, bazaar, and GNU compliant. Full -details on participating, including contributor guidelines, mailing -list subscription, mailing list archives, up-to-date documentation, -and various and sundry other details can be found at the following -URL: - - http://gcc.gnu.org/libstdc++/ - - -New: ---- -- more doxygen documentation -- more named locale fixups -- stdio_filebuf that takes fd, FILE -- io performance tuning -- allocation tuning, valgrind fixups -- __cxa_demangle now supported - - -Bugs fixed: ------------ -6533, 6513, 6501, 6511, 5820, 6414, 4150, 6360, 4164, 1072, 6124, -5180, 3457, 3139, 5268, 3983, 5542, 3129, 5207, 3719, 5734 -+ others. - - -What doesn't: -------------- -- see BUGS. - - -Build and Install ------------------ -Up to date build and install directions can be found at: -http://gcc.gnu.org/libstdc++/install.html - - -Contact: --------- -Places have changed from previous snapshots. The web page, which has -information about joining the mailing list and searching its archives, -CVS access, and contribution information is now at: - - http://gcc.gnu.org/libstdc++/ - -Please note that the mailing list has moved, and is now hosted on -gcc.gnu.org. (The web site above has the most up-to-date info.) - -Obtain the library snapshot via ftp (including these release notes) from - - ftp://gcc.gnu.org/pub/libstdc++/ - -The library is maintained by Benjamin Kosnik, Gabriel -Dos Reis, Phil Edwards, Ulrich Drepper, Loren James Rittle, -and Paolo Carlini. - - -Development tools: ------------------- - -You will need a current version of gcc to compile this snapshot of -libstdc++. The use of the latest stable gcc-3.0.x release (3.0.4), CVS -gcc, or gcc-3_1-branch is strongly recommended, which may also -introduce additional dependencies for up-to-date binutils. In -particular, current binutils (2.12) is recommended so that symbol -versioning for the library is on by default. In addition, you may need -up-to-date tools for modifying Makefiles and regenerating configure -scripts: automake (version 1.4), autoconf (version 2.13 and higher), -and libtool. - diff --git a/libstdc++-v3/docs/html/17_intro/abi.html b/libstdc++-v3/docs/html/17_intro/abi.html new file mode 100644 index 0000000..c27de61 --- /dev/null +++ b/libstdc++-v3/docs/html/17_intro/abi.html @@ -0,0 +1,991 @@ + + + + + + + + + + Standard C++ Library ABI + + + + + + +

C++ Standard Library ABI

+ +

+ The latest version of this document is always available at + + http://gcc.gnu.org/onlinedocs/libstdc++/abi.html. +

+ +

+ To the libstdc++ homepage. +

+ + +
+

+ The C++ interface +

+ +

C++ applications often dependent on specific language support +routines, say for throwing exceptions, or catching exceptions, and +perhaps also dependent on features in the C++ Standard Library. +

+ +

The C++ Standard Library has many include files, types defined in +those include files, specific named functions, and other behavior. The +text of these behaviors, as written in source include files, is called +the Application Programing Interface, or API. +

+ +

Furthermore, C++ source that is compiled into object files is + transformed by the compiler: it arranges objects with specific + alignment and in a particular layout, mangling names according to a + well-defined algorithm, has specific arrangements for the support of + virtual functions, etc. These details are defined as the compiler + Application Binary Interface, or ABI. The GNU C++ compiler uses an + industry-standard C++ ABI starting with version 3. Details can be + found in the + ABI specification. +

+ +

+ The GNU C++ compiler, g++, has a compiler command line option to + switch between various different C++ ABIs. This explicit version + switch is the flag -fabi-version. In addition, some + g++ command line options may change the ABI as a side-effect of + use. Such flags include -fpack-struct and + -fno-exceptions, but include others: see the complete + list in the GCC manual under the heading Options + for Code Generation Conventions. +

+ +

The configure options used when building a specific libstdc++ +version may also impact the resulting library ABI. The available +configure options, and their impact on the library ABI, are documented + +here. +

+ +

Putting all of these ideas together results in the C++ Standard +library ABI, which is the compilation of a given library API by a +given compiler ABI. In a nutshell: +

+ + library API + compiler ABI = library ABI + +

+ The library ABI is mostly of interest for end-users who have + unresolved symbols and are linking dynamically to the C++ Standard + library, and who thus must be careful to compile their application + with a compiler that is compatible with the available C++ Standard + library binary. In this case, compatible is defined with the equation + above: given an application compiled with a given compiler ABI and + library API, it will work correctly with a Standard C++ Library + created with the same constraints. +

+ +

+ To use a specific version of the C++ ABI, one must use a + corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that + implements the C++ ABI in question. +

+ +

+ Versioning +

+ +

The C++ interface has evolved throughout the history of the GNU +C++ toolchain. With each release, various details have been changed so +as to give distinct versions to the C++ interface. +

+ +
+ Goals of versioning +
+ +

Extending existing, stable ABIs. Versioning gives subsequent stable +releases series libraries the ability to add new symbols and add +functionality, all the while retaining backwards compatibility with +the previous releases in the series. Note: the reverse is not true. It +is not possible to take binaries linked with the latest version of a +release series (if symbols have been added) and expect the initial +release of the series to remain link compatible. +

+ +

Allows multiple, incompatible ABIs to coexist at the same time. +

+ +

+

+ +
+ Version History +
+

+ How can this complexity be managed? What does C++ versioning mean? + Because library and compiler changes often make binaries compiled + with one version of the GNU tools incompatible with binaries + compiled with other (either newer or older) versions of the same GNU + tools, specific techniques are used to make managing this complexity + easier. +

+ +

+ The following techniques are used: +

+ +
    + +
  • Release versioning on the libgcc_s.so binary. This is +implemented via file names and the ELF DT_SONAME mechanism (at least +on ELF systems).

    + +

    It is versioned as follows: +

    +
      +
    • gcc-3.0.0: libgcc_s.so.1
    • +
    • gcc-3.0.1: libgcc_s.so.1
    • +
    • gcc-3.0.2: libgcc_s.so.1
    • +
    • gcc-3.0.3: libgcc_s.so.1
    • +
    • gcc-3.0.4: libgcc_s.so.1
    • +
    • gcc-3.1.0: libgcc_s.so.1
    • +
    • gcc-3.1.1: libgcc_s.so.1
    • +
    • gcc-3.2.0: libgcc_s.so.1
    • +
    • gcc-3.2.1: libgcc_s.so.1
    • +
    • gcc-3.2.2: libgcc_s.so.1
    • +
    • gcc-3.2.3: libgcc_s.so.1
    • +
    • gcc-3.3.0: libgcc_s.so.1
    • +
    • gcc-3.3.1: libgcc_s.so.1
    • +
    • gcc-3.3.2: libgcc_s.so.1
    • +
    • gcc-3.3.3: libgcc_s.so.1
    • +
    • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: on m68k-linux and + hppa-linux this is either libgcc_s.so.1 (when configuring + --with-sjlj-exceptions) or libgcc_s.so.2. For all + others, this is libgcc_s.so.1.
    +

    +
  • + +
  • Symbol versioning on the libgcc_s.so binary. +

    mapfile: gcc/libgcc-std.ver

    + +

    It is versioned with the following labels and version + definitions, where the version definition is the maximum for a + particular release. Labels are cumulative. If a particular release + is not listed, it has the same version labels as the preceeding + release.

    +
      +
    • gcc-3.0.0: GCC_3.0
    • +
    • gcc-3.3.0: GCC_3.3
    • +
    • gcc-3.3.1: GCC_3.3.1
    • +
    • gcc-3.3.2: GCC_3.3.2
    • +
    • gcc-3.3.4: GCC_3.3.4
    • +
    • gcc-3.4.0: GCC_3.4
    • +
    • gcc-3.4.2: GCC_3.4.2
    • +
    • gcc-3.4.4: GCC_3.4.4
    • +
    • gcc-4.0.0: GCC_4.0.0
    • +
    • gcc-4.1.0: GCC_4.1.0
    • +
    • gcc-4.2.0: GCC_4.2.0
    • +
    +

    +
  • + +
  • Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above. + +

    It is versioned as follows: +

    +
      +
    • gcc-3.0.0: libstdc++.so.3.0.0
    • +
    • gcc-3.0.1: libstdc++.so.3.0.1
    • +
    • gcc-3.0.2: libstdc++.so.3.0.2
    • +
    • gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)
    • +
    • gcc-3.0.4: libstdc++.so.3.0.4
    • +
    • gcc-3.1.0: libstdc++.so.4.0.0
    • +
    • gcc-3.1.1: libstdc++.so.4.0.1
    • +
    • gcc-3.2.0: libstdc++.so.5.0.0
    • +
    • gcc-3.2.1: libstdc++.so.5.0.1
    • +
    • gcc-3.2.2: libstdc++.so.5.0.2
    • +
    • gcc-3.2.3: libstdc++.so.5.0.3 (Not strictly required)
    • +
    • gcc-3.3.0: libstdc++.so.5.0.4
    • +
    • gcc-3.3.1: libstdc++.so.5.0.5
    • +
    • gcc-3.3.2: libstdc++.so.5.0.5
    • +
    • gcc-3.3.3: libstdc++.so.5.0.5
    • +
    • gcc-3.4.0: libstdc++.so.6.0.0
    • +
    • gcc-3.4.1: libstdc++.so.6.0.1
    • +
    • gcc-3.4.2: libstdc++.so.6.0.2
    • +
    • gcc-3.4.3: libstdc++.so.6.0.3
    • +
    • gcc-3.4.4: libstdc++.so.6.0.3
    • +
    • gcc-3.4.5: libstdc++.so.6.0.3
    • +
    • gcc-3.4.6: libstdc++.so.6.0.3
    • +
    • gcc-4.0.0: libstdc++.so.6.0.4
    • +
    • gcc-4.0.1: libstdc++.so.6.0.5
    • +
    • gcc-4.0.2: libstdc++.so.6.0.6
    • +
    • gcc-4.0.3: libstdc++.so.6.0.7
    • +
    • gcc-4.1.0: libstdc++.so.6.0.7
    • +
    • gcc-4.1.1: libstdc++.so.6.0.8
    • +
    • gcc-4.1.2: libstdc++.so.6.0.8
    • +
    • gcc-4.2.0: libstdc++.so.6.0.9
    • +
    +

    +
  • + +
  • Symbol versioning on the libstdc++.so binary. + +

    mapfile: libstdc++/config/linker-map.gnu

    +

    It is versioned with the following labels and version + definitions, where the version definition is the maximum for a + particular release. Note, only symbol which are newly introduced + will use the maximum version definition. Thus, for release series + with the same label, but incremented version definitions, the later + release has both versions. (An example of this would be the + gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and + GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0 + release.) If a particular release is not listed, it has the same + version labels as the preceeding release. +

    +
      +
    • gcc-3.0.0: (Error, not versioned)
    • +
    • gcc-3.0.1: (Error, not versioned)
    • +
    • gcc-3.0.2: (Error, not versioned)
    • +
    • gcc-3.0.3: (Error, not versioned)
    • +
    • gcc-3.0.4: (Error, not versioned)
    • +
    • gcc-3.1.0: GLIBCPP_3.1, CXXABI_1
    • +
    • gcc-3.1.1: GLIBCPP_3.1, CXXABI_1
    • +
    • gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2
    • +
    • gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2
    • +
    • gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2
    • +
    • gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2
    • +
    • gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1
    • +
    • gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1
    • +
    • gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1
    • +
    • gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1
    • +
    • gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3
    • +
    • gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3
    • +
    • gcc-3.4.2: GLIBCXX_3.4.2
    • +
    • gcc-3.4.3: GLIBCXX_3.4.3
    • +
    • gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1
    • +
    • gcc-4.0.1: GLIBCXX_3.4.5
    • +
    • gcc-4.0.2: GLIBCXX_3.4.6
    • +
    • gcc-4.0.3: GLIBCXX_3.4.7
    • +
    • gcc-4.1.1: GLIBCXX_3.4.8
    • +
    • gcc-4.2.0: GLIBCXX_3.4.9
    • +
    +

    +
  • + +
  • +

    Incremental bumping of a compiler pre-defined macro, + __GXX_ABI_VERSION. This macro is defined as the version of the + compiler v3 ABI, with g++ 3.0.x being version 100. This macro will + be automatically defined whenever g++ is used (the curious can + test this by invoking g++ with the '-v' flag.) +

    + +

    + This macro was defined in the file "lang-specs.h" in the gcc/cp directory. + Later versions defined it in "c-common.c" in the gcc directory, and from + G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the + '-fabi-version' command line option. +

    + +

    + It is versioned as follows, where 'n' is given by '-fabi-version=n': +

    +
      +
    • gcc-3.0.x: 100
    • +
    • gcc-3.1.x: 100 (Error, should be 101)
    • +
    • gcc-3.2.x: 102
    • +
    • gcc-3.3.x: 102
    • +
    • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 102 (when n=1)
    • +
    • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 1000 + n (when n>1)
    • +
    • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 999999 (when n=0)
    • +
    +

    +
  • + +
  • +

    Changes to the default compiler option for + -fabi-version. +

    +

    + It is versioned as follows: +

    +
      +
    • gcc-3.0.x: (Error, not versioned)
    • +
    • gcc-3.1.x: (Error, not versioned)
    • +
    • gcc-3.2.x: -fabi-version=1
    • +
    • gcc-3.3.x: -fabi-version=1
    • +
    • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: -fabi-version=2
    • +
    +

    +
  • + +
  • +

    Incremental bumping of a library pre-defined macro. For releases + before 3.4.0, the macro is __GLIBCPP__. For later releases, it's + __GLIBCXX__. (The libstdc++ project generously changed from CPP to + CXX throughout its source to allow the "C" pre-processor the CPP + macro namespace.) These macros are defined as the date the library + was released, in compressed ISO date format, as an unsigned long. +

    + +

    + This macro is defined in the file "c++config" in the + "libstdc++/include/bits" directory. (Up to gcc-4.1.0, it was + changed every night by an automated script. Since gcc-4.1.0, it is + the same value as gcc/DATESTAMP.) +

    +

    + It is versioned as follows: +

    +
      +
    • gcc-3.0.0: 20010615
    • +
    • gcc-3.0.1: 20010819
    • +
    • gcc-3.0.2: 20011023
    • +
    • gcc-3.0.3: 20011220
    • +
    • gcc-3.0.4: 20020220
    • +
    • gcc-3.1.0: 20020514
    • +
    • gcc-3.1.1: 20020725
    • +
    • gcc-3.2.0: 20020814
    • +
    • gcc-3.2.1: 20021119
    • +
    • gcc-3.2.2: 20030205
    • +
    • gcc-3.2.3: 20030422
    • +
    • gcc-3.3.0: 20030513
    • +
    • gcc-3.3.1: 20030804
    • +
    • gcc-3.3.2: 20031016
    • +
    • gcc-3.3.3: 20040214
    • +
    • gcc-3.4.0: 20040419
    • +
    • gcc-3.4.1: 20040701
    • +
    • gcc-3.4.2: 20040906
    • +
    • gcc-3.4.3: 20041105
    • +
    • gcc-3.4.4: 20050519
    • +
    • gcc-3.4.5: 20051201
    • +
    • gcc-3.4.6: 20060306
    • +
    • gcc-4.0.0: 20050421
    • +
    • gcc-4.0.1: 20050707
    • +
    • gcc-4.0.2: 20050921
    • +
    • gcc-4.0.3: 20060309
    • +
    • gcc-4.1.0: 20060228
    • +
    • gcc-4.1.1: 20060524
    • +
    • gcc-4.1.2: 20070214
    • +
    • gcc-4.2.0: 20070514
    • +
    +

    +
  • + +
  • +

    + Incremental bumping of a library pre-defined macro, + _GLIBCPP_VERSION. This macro is defined as the released version of + the library, as a string literal. This is only implemented in + gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it + is called _GLIBCXX_VERSION). +

    + +

    + This macro is defined in the file "c++config" in the + "libstdc++/include/bits" directory and is generated + automatically by autoconf as part of the configure-time generation + of config.h. +

    + +

    + It is versioned as follows: +

    +
      +
    • gcc-3.0.0: "3.0.0"
    • +
    • gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")
    • +
    • gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")
    • +
    • gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")
    • +
    • gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")
    • +
    • gcc-3.1.0: "3.1.0"
    • +
    • gcc-3.1.1: "3.1.1"
    • +
    • gcc-3.2.0: "3.2"
    • +
    • gcc-3.2.1: "3.2.1"
    • +
    • gcc-3.2.2: "3.2.2"
    • +
    • gcc-3.2.3: "3.2.3"
    • +
    • gcc-3.3.0: "3.3"
    • +
    • gcc-3.3.1: "3.3.1"
    • +
    • gcc-3.3.2: "3.3.2"
    • +
    • gcc-3.3.3: "3.3.3"
    • +
    • gcc-3.4.x: "version-unused"
    • +
    • gcc-4.0.x: "version-unused"
    • +
    • gcc-4.1.x: "version-unused"
    • +
    • gcc-4.2.x: "version-unused"
    • +
    +

    +
  • + +
  • +

    + Matching each specific C++ compiler release to a specific set of + C++ include files. This is only implemented in gcc-3.1.1 releases + and higher. +

    +

    + All C++ includes are installed in include/c++, then nest in a + directory hierarchy corresponding to the C++ compiler's released + version. This version corresponds to the variable "gcc_version" in + "libstdc++/acinclude.m4," and more details can be found in that + file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0). +

    +

    + C++ includes are versioned as follows: +

    +
      +
    • gcc-3.0.0: include/g++-v3
    • +
    • gcc-3.0.1: include/g++-v3
    • +
    • gcc-3.0.2: include/g++-v3
    • +
    • gcc-3.0.3: include/g++-v3
    • +
    • gcc-3.0.4: include/g++-v3
    • +
    • gcc-3.1.0: include/g++-v3
    • +
    • gcc-3.1.1: include/c++/3.1.1
    • +
    • gcc-3.2.0: include/c++/3.2
    • +
    • gcc-3.2.1: include/c++/3.2.1
    • +
    • gcc-3.2.2: include/c++/3.2.2
    • +
    • gcc-3.2.3: include/c++/3.2.3
    • +
    • gcc-3.3.0: include/c++/3.3
    • +
    • gcc-3.3.1: include/c++/3.3.1
    • +
    • gcc-3.3.2: include/c++/3.3.2
    • +
    • gcc-3.3.3: include/c++/3.3.3
    • +
    • gcc-3.4.0: include/c++/3.4.0
    • +
    • gcc-3.4.1: include/c++/3.4.1
    • +
    • gcc-3.4.2: include/c++/3.4.2
    • +
    • gcc-3.4.3: include/c++/3.4.3
    • +
    • gcc-3.4.4: include/c++/3.4.4
    • +
    • gcc-3.4.5: include/c++/3.4.5
    • +
    • gcc-3.4.6: include/c++/3.4.6
    • +
    • gcc-4.0.0: include/c++/4.0.0
    • +
    • gcc-4.0.1: include/c++/4.0.1
    • +
    • gcc-4.0.2: include/c++/4.0.2
    • +
    • gcc-4.0.3: include/c++/4.0.3
    • +
    • gcc-4.1.0: include/c++/4.1.0
    • +
    • gcc-4.1.1: include/c++/4.1.1
    • +
    • gcc-4.1.2: include/c++/4.1.2
    • +
    • gcc-4.2.0: include/c++/4.2.0
    • +
    +

    +
  • +
+

+ Taken together, these techniques can accurately specify interface + and implementation changes in the GNU C++ tools themselves. Used + properly, they allow both the GNU C++ tools implementation, and + programs using them, an evolving yet controlled development that + maintains backward compatibility. +

+ + + +
+ Minimum requirements for a versioned ABI +
+

+ Minimum environment that supports a versioned ABI: A supported + dynamic linker, a GNU linker of sufficient vintage to understand + demangled C++ name globbing (ld), a shared executable compiled with + g++, and shared libraries (libgcc_s, libstdc++) compiled by a + compiler (g++) with a compatible ABI. Phew. +

+ +

+ On top of all that, an additional constraint: libstdc++ did not + attempt to version symbols (or age gracefully, really) until version + 3.1.0. +

+ +

+ Most modern Linux and BSD versions, particularly ones using + gcc-3.1.x tools and more recent vintages, will meet the requirements above. +

+ + +
+ What configure options impact symbol versioning? +
+

+ It turns out that most of the configure options that change default + behavior will impact the mangled names of exported symbols, and thus + impact versioning and compatibility. +

+ +

+ For more information on configure options, including ABI impacts, see: + http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html +

+ +

+ There is one flag that explicitly deals with symbol versioning: + --enable-symvers. +

+ +

+ In particular, libstdc++/acinclude.m4 has a macro called + GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed + in via --enable-symvers=foo). At that point, the macro attempts to + make sure that all the requirement for symbol versioning are in + place. For more information, please consult acinclude.m4. +

+ + +
+ How to tell if symbol versioning is, indeed, active? +
+

+ When the GNU C++ library is being built with symbol versioning on, + you should see the following at configure time for libstdc++: +

+ + + checking versioning on shared library symbols... gnu + +

+ If you don't see this line in the configure output, or if this line + appears but the last word is 'no', then you are out of luck. +

+ +

+ If the compiler is pre-installed, a quick way to test is to compile + the following (or any) simple C++ file and link it to the shared + libstdc++ library: +

+ +
+#include <iostream>
+
+int main()
+{ std::cout << "hello" << std::endl; return 0; }
+
+%g++ hello.cc -o hello.out
+
+%ldd hello.out
+        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00764000)
+        libm.so.6 => /lib/tls/libm.so.6 (0x004a8000)
+        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
+        libc.so.6 => /lib/tls/libc.so.6 (0x0036d000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
+
+%nm hello.out
+
+ +

+If you see symbols in the resulting output with "GLIBCXX_3" as part +of the name, then the executable is versioned. Here's an example: +

+ + U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4 + +

+ Library allowed ABI changes +

+

+The following will cause the library minor version number to +increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5". +

+
    +
  • adding an exported global or static data member
  • +
  • adding an exported function, static or non-virtual member function
  • +
  • adding an exported symbol or symbols by additional instantiations
  • +
+

+

+

+Other allowed changes are possible. +

+ + +

+ Library disallowed ABI changes +

+ +

+The following non-exhaustive list will cause the library major version +number to increase, say from "libstdc++.so.3.0.4" to +"libstdc++.so.4.0.0". +

+
    +
  • changes in the gcc/g++ compiler ABI
  • +
  • changing size of an exported symbol
  • +
  • changing alignment of an exported symbol
  • +
  • changing the layout of an exported symbol
  • +
  • changing mangling on an exported symbol
  • +
  • deleting an exported symbol
  • +
  • changing the inheritance properties of a type by adding or removing + base classes
  • +
  • + changing the size, alignment, or layout of types + specified in the C++ standard. These may not necessarily be + instantiated or otherwise exported in the library binary, and + include all the required locale facets, as well as things like + std::basic_streambuf, et al. +
  • + +
  • adding an explicit copy constructor or destructor to a +class that would otherwise have implicit versions. This will change +the way the compiler deals with this class in by-value return +statements or parameters: instead of being passing instances of this +class in registers, the compiler will be forced to use memory. See this part + of the C++ ABI documentation for further details. +
  • + +
+ +

+ Library implementation strategy

+ +
    +
  • Separation of interface and implementation +

    This is accomplished by two techniques that separate the API from +the ABI: forcing undefined references to link against a library binary +for definitions. +

    + +
    +
    Include files have declarations, source files have defines
    + +
    For non-templatized types, such as much of class + locale, the appropriate standard C++ include, say + locale, can contain full declarations, while various + source files (say locale.cc, locale_init.cc, + localename.cc) contain definitions.
    + +
    Extern template on required types
    + +
    For parts of the standard that have an explicit list of required + instantiations, the GNU extension syntax extern template + can be used to control where template definitions + reside. By marking required instantiations as extern + template in include files, and providing explicit + instantiations in the appropriate instantiation files, non-inlined + template functions can be versioned. This technique is mostly used + on parts of the standard that require char and + wchar_t instantiations, and includes + basic_string, the locale facets, and the types in + iostreams.
    + +
    +

    In addition, these techniques have the additional benefit that + they reduce binary size, which can increase runtime performance. +

    +
  • + +
  • Namespaces linking symbol definitions to export mapfiles + +

    All symbols in the shared library binary are processed by a linker +script at build time that either allows or disallows external +linkage. Because of this, some symbols, regardless of normal C/C++ +linkage, are not visible. Symbols that are internal have several +appealing characteristics: by not exporting the symbols, there are no +relocations when the shared library is started and thus this makes for +faster runtime loading performance by the underlying dynamic loading +mechanism. In addition, they have the possibility of changing without +impacting ABI compatibility. +

    + +

    The following namespaces are transformed by the mapfile:

    + +
    +
    namespace std
    +
    Defaults to exporting all symbols in label +GLIBCXX that do not begin with an underscore, ie +__test_func would not be exported by default. Select +exceptional symbols are allowed to be visible.
    + +
    namespace __gnu_cxx
    +
    Defaults to not exporting any symbols in label +GLIBCXX, select items are allowed to be visible.
    + +
    namespace __gnu_internal
    +
    Defaults to not exported, no items are allowed to be visible.
    + +
    namespace __cxxabiv1, aliased to namespace abi
    +
    Defaults to not exporting any symbols in label +CXXABI, select items are allowed to be visible.
    +
    +

    +

    +
  • + +
  • Freezing the API +

    Disallowed changes, as above, are not made on a stable release +branch. Enforcement tends to be less strict with GNU extensions that +standard includes.

    +
  • +
+ +

+ Testing ABI changes +

+ +

+Testing for GNU C++ ABI changes is composed of two distinct areas: +testing the C++ compiler (g++) for compiler changes, and testing the +C++ library (libstdc++) for library changes. +

+ +

+Testing the C++ compiler ABI can be done various ways. +

+ +

+One. +Intel ABI checker. More information can be obtained +here. +

+ +

+Two. +The second is yet unreleased, but has been announced on the gcc +mailing list. It is yet unspecified if these tools will be freely +available, and able to be included in a GNU project. Please contact +Mark Mitchell (mark@codesourcery.com) for more details, and current +status. +

+ +

+Three. +Involves using the vlad.consistency test framework. This has also been +discussed on the gcc mailing lists. +

+ +

+Testing the C++ library ABI can also be done various ways. +

+ +

+One. +(Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways, +one with a new compiler and an old library, and the other with an old +compiler and a new library, and look for testsuite regressions) +

+ +

+Details on how to set this kind of test up can be found here: +http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html +

+ +

+Two. +Use the 'make check-abi' rule in the libstdc++ Makefile. +

+ +

+This is a proactive check the library ABI. Currently, exported symbol +names that are either weak or defined are checked against a last known +good baseline. Currently, this baseline is keyed off of 3.4.0 +binaries, as this was the last time the .so number was incremented. In +addition, all exported names are demangled, and the exported objects +are checked to make sure they are the same size as the same object in +the baseline. + +Notice that each baseline is relative to a default +configured library and compiler: in particular, if options such as +--enable-clocale, or --with-cpu, in case of multilibs, are used at +configure time, the check may fail, either because of substantive +differences or because of limitations of the current checking +machinery. +

+ +

+This dataset is insufficient, yet a start. Also needed is a +comprehensive check for all user-visible types part of the standard +library for sizeof() and alignof() changes. +

+ +

+Verifying compatible layouts of objects is not even attempted. It +should be possible to use sizeof, alignof, and offsetof to compute +offsets for each structure and type in the standard library, saving to +another datafile. Then, compute this in a similar way for new +binaries, and look for differences. +

+ +

+Another approach might be to use the -fdump-class-hierarchy flag to +get information. However, currently this approach gives insufficient +data for use in library testing, as class data members, their offsets, +and other detailed data is not displayed with this flag. +(See g++/7470 on how this was used to find bugs.) +

+ +

+Perhaps there are other C++ ABI checkers. If so, please notify +us. We'd like to know about them! +

+ +

+ Testing Multi-ABI binaries +

+ +

+A "C" application, dynamically linked to two shared libraries, liba, +libb. The dependent library liba is C++ shared library compiled with +gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library +libb is a C++ shared library compiled with gcc-3.4.x, and also uses io, +exceptions, locale, etc. +

+ +

As above, libone is constructed as follows:

+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
+
+%ln -s libone.so.1.0.0 libone.so
+
+%$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
+
+%ar cru libone.a a.o 
+
+ +

And, libtwo is constructed as follows:

+ +
+%$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
+
+%$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
+
+%ln -s libtwo.so.1.0.0 libtwo.so
+
+%$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
+
+%ar cru libtwo.a b.o 
+
+ +

...with the resulting libraries looking like

+
+%ldd libone.so.1.0.0
+        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40016000)
+        libm.so.6 => /lib/tls/libm.so.6 (0x400fa000)
+        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
+        libc.so.6 => /lib/tls/libc.so.6 (0x40125000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
+
+%ldd libtwo.so.1.0.0
+        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40027000)
+        libm.so.6 => /lib/tls/libm.so.6 (0x400e1000)
+        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
+        libc.so.6 => /lib/tls/libc.so.6 (0x4010c000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
+
+
+ +

Then, the "C" compiler is used to compile a source file that uses +functions from each library.

+
+gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
+
+ +

+Which gives the expected: +

+
+%ldd a.out
+        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00764000)
+        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40015000)
+        libc.so.6 => /lib/tls/libc.so.6 (0x0036d000)
+        libm.so.6 => /lib/tls/libm.so.6 (0x004a8000)
+        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
+        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
+
+ +

+This resulting binary, when executed, will be able to safely use code +from both liba, and the dependent libstdc++.so.6, and libb, with the +dependent libstdc++.so.5. +

+ + +

+ Outstanding Issues +

+ +

Some features in the C++ language make versioning especially +difficult. In particular, compiler generated constructs such as +implicit instantiations for templates, typeinfo information, and +virtual tables all may cause ABI leakage across shared library +boundaries. Because of this, mixing C++ ABI's is not recommended at +this time. +

+ +

For more background on this issue, see these bugzilla entries:

+ +

+24660: versioning weak symbols in libstdc++ +

+ +

+19664: libstdc++ headers should have pop/push of the visibility around the declarations +

+ +

+ Bibliography / Further Reading +

+ +

+ABIcheck, a vague idea of checking ABI compatibility +
+http://abicheck.sourceforge.net/ +

+ +

+C++ ABI reference +
+http://www.codesourcery.com/cxx-abi/ +

+ +

+Intel ABI documentation, "Intel® Compilers for Linux* -Compatibility with the GNU Compilers" +
+http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm +

+ +

+Sun Solaris 2.9 docs +
+Linker and Libraries Guide (document 816-1386) +
+C++ Migration Guide (document 816-2459) +
+http://docs.sun.com/db/prod/solaris.9 +
+http://docs.sun.com/?p=/doc/816-1386&a=load +

+ +

+Ulrich Drepper, "ELF Symbol Versioning" +
+http://people.redhat.com/drepper/symbol-versioning +

+ +

+C++ ABI for the ARM Architecture +
+http://www.arm.com/miscPDFs/8033.pdf +

+ +

+Benjamin Kosnik, ISO C++ J16/06-0046 +
+Dynamic Shared Objects: Survey and Issues +

+ +

+Benjamin Kosnik, ISO C++ J16/06-0083 +
+Versioning With Namespaces +

+ + + + diff --git a/libstdc++-v3/docs/html/17_intro/api.html b/libstdc++-v3/docs/html/17_intro/api.html new file mode 100644 index 0000000..50c8604 --- /dev/null +++ b/libstdc++-v3/docs/html/17_intro/api.html @@ -0,0 +1,596 @@ + + + + + + + + + + API Evolution and Deprecation History + + + + + + +

API Evolution and Deprecation History

+ +

+ The latest version of this document is always available at + + http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/abi.html. +

+ +

+ To the libstdc++ homepage. +

+ + +
+

+ First. +

+ +

2.72

+

The first generation GNU C++ library was called libg++. It had a +working relationship with at least two kinds of dinosaur. Sadly, the +details were not pried away from the estate. +

+ +

+ +

+ +

Known Issues include many of the limitations of its immediate ancestor.

+ +
No ios_base
+ +

At least some older implementations don't have std::ios_base, so you should use std::ios::badbit, std::ios::failbit and std::ios::eofbit and std::ios::goodbit. +

+ +
No cout in ostream.h, no cin in istream.h + +

+ In earlier versions of the standard, + <fstream.h>, + <ostream.h> + and <istream.h> + used to define + cout, cin and so on. ISO C++ specifies that one needs to include + <iostream> + explicitly to get the required definitions. +

+

Some include adjustment may be required.

+ + +

This project is no longer maintained or supported, and the sources +archived. The code is considered replaced and rewritten. +

+ +
+

+ Second. +

+

The second generation GNU C++ library was called libstdc++, or +libstdc++-v2. It was a separate GNU project, although reliably paired +with GCC. It spans the time between libg++ and pre-ISO C++. +

+ +

egcs 1.x

+

2.95

+

2.96

+ +

Portability Notes

+

Implementation Limitations

+ +
Namespace std:: not supported.
+ +

+ Some care is required to support C++ compiler and or library + implementation that do not have the standard library in + namespace std. +

+

+ The following sections list some possible solutions to support compilers + that cannot ignore std::-qualified names. +

+ +

First, see if the compiler has a flag for this. Namespace + back-portability-issues are generally not a problem for g++ + compilers that do not have libstdc++ in std::, as + the compilers use -fno-honor-std (ignore + std::, :: = std::) by default. That + is, the responsibility for enabling or disabling + std:: is on the user; the maintainer does not have + to care about it. This probably applies to some other compilers + as well. +

+ +

Second, experiment with a variety of pre-processor tricks.

+ +

By defining std as a macro, fully-qualified namespace calls become global. Volia. + +

+#ifdef WICKEDLY_OLD_COMPILER
+# define std
+#endif
+
+(thanks to Juergen Heinzl who posted this solution on gnu.gcc.help) + +

Define a macro NAMESPACE_STD, which is defined to +either "" or "std" based on a compile-type +test. On GNU systems, this can be done with autotools by means of an +autoconf test (see below) for HAVE_NAMESPACE_STD, then +using that to set a value for the NAMESPACE_STD macro. +At that point, one is able to use NAMESPACE_STD::string, +which will evaluate to std::string or +::string (ie, in the global namespace on systems that do +not put string in std::).

+ +

+

+dnl @synopsis AC_CXX_HAVE_STD_NAMESPACE
+dnl
+dnl If the compiler supports the std namespace, define
+dnl HAVE_STD_NAMESPACE.
+dnl
+dnl @category Cxx
+dnl @author Todd Veldhuizen
+dnl @author Luc Maisonobe 
+dnl @version 2004-02-04
+dnl @license AllPermissive
+
+AC_DEFUN([AC_CXX_HAVE_STD_NAMESPACE],
+[AC_CACHE_CHECK(whether the compiler supports the std namespace,
+ac_cv_cxx_have_std_namespace,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include 
+	std::istream& is = std::cin;
+	],[return 0;],
+ ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_have_std_namespace" = yes; then
+  AC_DEFINE(HAVE_STD_NAMESPACE,,[define if the compiler supports the std namespace])
+fi
+])
+
+ +
Illegal iterator usage.
+

+ The following illustrate implementation-allowed illegal iterator + use, and then correct use.

  • you cannot do + ostream::operator<<(iterator) to print the + address of the iterator => use operator<< + &*iterator instead ? +

  • +
  • you cannot clear an iterator's reference + (iterator = 0) => use + iterator = iterator_type(); ? +

  • +
  • +if (iterator) won't work any + more => use if (iterator != iterator_type()) + ?

  • +
+ +
isspace from <cctype> is a macro +
+ +

Glibc 2.0.x and 2.1.x define <ctype.h> +functionality as macros (isspace, isalpha etc.). +

+ +

+This implementations of libstdc++, however, keep these functions as +macros, and so it is not back-portable to use fully qualified +names. For example: +

+ +
 
+#include <cctype> 
+int main() { std::isspace('X'); } 
+
+ +

Results in something like this: +

+ +
 
+std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ; 
+
+ + +

A solution is to modify a header-file so that the compiler tells +<ctype.h> to define functions instead of macros: +

+ +
+// This keeps isalnum, et al from being propagated as macros. 
+#if __linux__
+# define __NO_CTYPE 1
+#endif
+
+ +

Then, include <ctype.h> +

+ +

+Another problem arises if you put a using namespace std; +declaration at the top, and include <ctype.h>. This +will result in ambiguities between the definitions in the global +namespace (<ctype.h>) and the definitions in namespace +std:: (<cctype>). +

+ +
No vector::at, deque::at, string::at
+ +

+ One solution is to add an autoconf-test for this: +

+
+AC_MSG_CHECKING(for container::at)
+AC_TRY_COMPILE(
+[
+#include <vector>
+#include <deque>
+#include <string>
+	
+using namespace std;
+],
+[
+deque<int> test_deque(3);
+test_deque.at(2);
+vector<int> test_vector(2);
+test_vector.at(1);
+string test_string("test_string");
+test_string.at(3);
+],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_CONTAINER_AT)],
+[AC_MSG_RESULT(no)])
+
+ +

+If you are using other (non-GNU) compilers it might be a good idea +to check for string::at separately. +

+ +
No std::char_traits<char>::eof
+ +

+Use some kind of autoconf test, plus this: +

+
 
+#ifdef HAVE_CHAR_TRAITS
+#define CPP_EOF std::char_traits<char>::eof()
+#else
+#define CPP_EOF EOF
+#endif
+
+ +
No string::clear
+ +

+ There are two functions for deleting the contents of a string: + clear and erase (the latter + returns the string). +

+	void 
+	clear() { _M_mutate(0, this->size(), 0); }
+      
+
+	basic_string& 
+	erase(size_type __pos = 0, size_type __n = npos)
+	{ 
+	return this->replace(_M_check(__pos), _M_fold(__pos, __n),
+	_M_data(), _M_data()); 
+	}
+      
+ Unfortunately, ut clear is not + implemented in this version, so you should use + erase (which is probably faster than + operator=(charT*)). +

+ +
Removal of ostream::form and +istream::scan extensions.
+ +

These are no longer supported. Please use + + stringstreams instead. +

+ +
No basic_stringbuf, basic_stringstream
+ +

+ Libstdc++ provides the new + i/ostringstream-classes, (<sstream>), but for compatibility + with older implementations you still have to use + i/ostrstream (<strstream>): +

+	#ifdef HAVE_SSTREAM
+	#include <sstream>
+	#else
+	#include <strstream>
+	#endif
+      
+
    +
  • strstream is considered to be + deprecated +

  • +
  • strstream is limited to + char +

  • +
  • with ostringstream you don't + have to take care of terminating the string or freeing its + memory +

  • +
  • istringstream can be re-filled + (clear(); str(input);) +

  • +
+

+ You can then use output-stringstreams like this: +

+	#ifdef HAVE_SSTREAM
+	std::ostringstream oss;
+	#else
+	std::ostrstream oss;
+	#endif
+	oss << "Name=" << m_name << ", number=" << m_number << std::endl;
+	...
+	#ifndef HAVE_SSTREAM
+	oss << std::ends; // terminate the char*-string
+	#endif
+	// str() returns char* for ostrstream and a string for ostringstream
+	// this also causes ostrstream to think that the buffer's memory
+	// is yours
+	m_label.set_text(oss.str());
+	#ifndef HAVE_SSTREAM
+	// let the ostrstream take care of freeing the memory
+	oss.freeze(false);
+	#endif
+      
+

+ Input-stringstreams can be used similarly: +

+ +
 
+std::string input;
+...
+#ifdef HAVE_SSTREAM
+std::istringstream iss(input);
+#else
+std::istrstream iss(input.c_str());
+#endif
+
+int i;
+iss >> i; 
+
+ +

One (the only?) restriction is that an istrstream cannot be re-filled: +

+ +
+std::istringstream iss(numerator);
+iss >> m_num;
+// this is not possible with istrstream
+iss.clear();
+iss.str(denominator);
+iss >> m_den;
+ 
+ +

+If you don't care about speed, you can put these conversions in + a template-function: +

+
+template <class X>
+void fromString(const string& input, X& any)
+{
+#ifdef HAVE_SSTREAM
+std::istringstream iss(input);
+#else
+std::istrstream iss(input.c_str());
+#endif
+X temp;
+iss >> temp;
+if (iss.fail())
+throw runtime_error(..)
+any = temp;
+}
+
+ +

Another example of using stringstreams is in this howto. +

+ +

There is additional information in the libstdc++-v2 info files, in +particular "info iostream". +

+ +
Little or no wide character support
+ +
No templatized iostreams
+ +
Thread safety issues.
+ +

This project is no longer maintained or supported, and the sources +archived. The code is considered replaced and rewritten. +

+ + +
+

+ Third. +

+

The third generation GNU C++ library is called libstdc++, or +libstdc++-v3. +

+ +

The subset commonly known as the Standard Template Library + (chapters 23 through 25, mostly) is adapted from the final release + of the SGI STL, with extensive changes. +

+ +

A more formal description of the V3 goals can be found in the + official design document. +

+ + +

Portability Notes

+ +
Pre-ISO headers moved to backwards
+

The pre-ISO C++ headers (iostream.h etc.) are available, but inclusion + generates a warning that you are using deprecated headers. +

+ +

This compatibility layer is constructed by including the + standard C++ headers, and injecting any items in + std:: into the global namespace. +

+

For those of you new to ISO C++ (welcome, time travelers!), no, + that isn't a typo. Yes, the headers really have new names. + Marshall Cline's C++ FAQ Lite has a good explanation in item + [27.4]. +

+ +

Some include adjustment may be required.

+ +
Extension headers hash_map, hash_set moved to ext
+ +

Header files hash_map and hash_set +moved to ext/hash_map and ext/hash_set, +respectively. At the same time, all types in these files are enclosed +in namespace __gnu_cxx. +

+ + +
+No ios::nocreate/ios::noreplace. +
+ +

The existence of ios::nocreate being used for +input-streams has been confirmed, most probably because the author +thought it would be more correct to specify nocreate explicitly. So +it can be left out for input-streams. +

+ +

For output streams, "nocreate" is probably the default, +unless you specify std::ios::trunc ? To be safe, you can +open the file for reading, check if it has been opened, and then +decide whether you want to create/replace or not. To my knowledge, +even older implementations support app, ate +and trunc (except for app ?). +

+ + +
+No stream::attach(int fd). +
+ +

+ Phil Edwards writes: It was considered and rejected for the ISO + standard. Not all environments use file descriptors. Of those + that do, not all of them use integers to represent them. +

+ +

+ For a portable solution (among systems which use + filedescriptors), you need to implement a subclass of + std::streambuf (or + std::basic_streambuf<..>) which opens a file + given a descriptor, and then pass an instance of this to the + stream-constructor. +

+ +

+ An extension is available that implements this. + <ext/stdio_filebuf.h> contains a derived class called + __gnu_cxx::stdio_filebuf. + This class can be constructed from a C FILE* or a file + descriptor, and provides the fd() function. +

+ +

+ For another example of this, refer to + fdstream example + by Nicolai Josuttis. +

+ +

Known Issues

+ +
+container iterator types are not necessarily container value_type* +
+ +

API History, User Visible Changes

+ +

3.0.0

+ + +

3.1.0

+

3.2.0

+

3.3.0

+ + +

3.4.0

+ +Macro guard for libstdc++ changed, from _GLIBCPP_ to _GLIBCXX_, to +accomodate a request from the C Pre Processor maintainer. + +

4.0.0

+

4.1.0

+ + how has to be explicitly included for std::assert calls. + +

4.2.0

+ +

4.3.0

+ +Header streamlining. + +Backward include edit. + +PCH files built but not installed. + +Namespace pb_ds moved to __gnu_pb_ds. + +C++OX features appear. + +
+

+ Fourth, and future +

+ +
+

+ Deprecation and Backwards Compatibility +

+ +
+

+ Links +

+ +

+Migrating to gcc-4.1, by Dan Kegel. +

+ +

+Building the whole Debian archive with GCC 4.1: a summary, by Martin Michlmayr +

+ +

+Migration guide for GCC-3.2 +

+ + + + diff --git a/libstdc++-v3/docs/html/17_intro/c++0x_status.html b/libstdc++-v3/docs/html/17_intro/c++0x_status.html new file mode 100644 index 0000000..5627d6f --- /dev/null +++ b/libstdc++-v3/docs/html/17_intro/c++0x_status.html @@ -0,0 +1,2280 @@ + + + + + + + + + + + + Status of C++0x features in GCC + - GNU Project - Free Software Foundation (FSF) + + + + + + +

+ Status of C++0x features in GCC +

+ +

+This table is based on the table of contents of ISO/IEC +Doc No: N2461=07-0331 Date: 2007-10-22 +Working Draft, Standard for Programming Language C++ +

+ +

+In this implementation -std=gnu++0x or +-std=c++0x flags must be used to enable language and +library features. The pre-defined symbol +__GXX_EXPERIMENTAL_CXX0X__ is used to check for the +presence of the required flag. +

+ +

+This page describes the C++0x support in mainline GCC SVN, not in any +particular release. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SectionDescriptionDoneBrokenMissingComments
20General Utilities
20.2Utility Componentsincomplete
20.2.1Operatorspartial
20.2.2forward/move helperspartial
20.2.3Pairsdone
20.3Header <tuple> synopsisdone
20.3.1Class template tupledone
20.3.1.1Constructiondone
20.3.1.2Tuple creation functionsdone
20.3.1.3Tuple helper classesdone
20.3.1.4Element accessdone
20.3.1.5Relational operatorsdone
20.4Metaprogramming and type traits
20.4.1Requirementsdone
20.4.2Header <type_traits> synopsisdone
20.4.3Helper classesdone
20.4.4General Requirementsdone
20.4.5Unary Type Traitsdone
20.4.5.1Primary Type Categoriesdone
20.4.5.2Composite type traitsdone
20.4.5.3Type propertiesdone
20.4.6Relationships between typesdone
20.4.7Transformations between typesdone
20.4.7.1Const-volatile modificationsdone
20.4.7.2Reference modificationsdone
20.4.7.3Array modificationsdone
20.4.7.4Pointer modificationsdone
20.4.8Other transformationsdone
20.4.9Implementation requirementsdone
20.5 Function Objectsdone
20.5Additions to header <functional> synopsisdone
20.5.1Definitionsdone
20.5.2Requirementsdone
20.5.3Basedone
20.5.4Function return typesdone
20.5.5Class template reference_wrapperdone
20.5.5.1reference_wrapper construct/copy/destroydone
20.5.5.2reference_wrapper assignmentdone
20.5.5.3reference_wrapper accessdone
20.5.5.4reference_wrapper invocationdone
20.5.5.5reference_wrapper helper functionsdone
20.5.14Function template mem_fndone
20.5.11Template function binddone
20.5.11.1Function object bindersdone
20.5.11.1.1Class template is_bind_expressiondone
20.5.11.1.2Class template is_placeholderdone
20.5.11.1.3Function template binddone
20.5.11.1.4Placeholdersdone
20.5.15Polymorphic function wrappersdone
20.5.15.1Class bad_function_calldone
20.5.15.1.1bad_function_call constructordone
20.5.15.2Class template functiondone
20.5.15.2.1function construct/copy/destroydone
20.5.15.2.2function modifiersdone
20.5.15.2.3function capacitydone
20.5.15.2.4function invocationdone
20.5.15.2.5function target accessdone
20.5.15.2.7null pointer comparison operatorsdone
20.5.15.2.8specialized algorithmsdone
20.5.16Class template hashdone
20.6Additions to header <memory> synopsispartialmissing unique_ptr
20.6.5Class template unique_ptrmissing
20.6.6Smart pointersdone
20.6.6.1Class bad_weak_ptrdone
20.6.6.2Class template shared_ptrdone1
20.6.6.2.1shared_ptr constructorsdone
20.6.6.2.2shared_ptr destructordone
20.6.6.2.3shared_ptr assignmentdone
20.6.6.2.4shared_ptr modifiersdone
20.6.6.2.5shared_ptr observersdone
20.6.6.2.6shared_ptr comparisondone
20.6.6.2.7shared_ptr I/Odone
20.6.6.2.8shared_ptr specialized algorithmsdone
20.6.6.2.9shared_ptr castsdone
20.6.6.2.10get_deleterdone
20.6.6.3Class template weak_ptrdone
20.6.6.3.1weak_ptr constructorsdone
20.6.6.3.2weak_ptr destructordone
20.6.6.3.3weak_ptr assignmentdone
20.6.6.3.4weak_ptr modifiersdone
20.6.6.3.5weak_ptr observersdone
20.6.6.3.6weak_ptr comparisondone
20.6.6.3.7weak_ptr specialized algorithmsdone
20.6.6.4Class template enable_shared_from_thisdone
23Containers
23.2.1Header <array> synopsisdone
23.2.1Class template arraydone
23.2.1.1array constructors, copy, and assignmentdone
23.2.1.2array specialized algorithmsdone
23.2.1.3array sizedone
23.2.1.4array datamissing
23.2.1.5Zero sized arraysdone
23.2.1.6Tuple interface to class template arraydone
23.4Unordered associative containersdone
23.4.1Class template unordered_mapdone
23.4.1.1unordered_map constructorsdone
23.4.1.2unordered_map element accessdone
23.4.1.3unordered_map swapdone
23.4.2Class template unordered_multimapdone
23.4.2.1unordered_multimap constructorsdone
23.4.2.2unordered_multimap swapdone
23.4.3Class template unordered_setdone
23.4.3.1unordered_set constructorsdone
23.4.3.2unordered_set swapdone
23.4.4Class template unordered_multisetdone
23.4.4.1unordered_multiset constructorsdone
23.4.4.2unordered_multiset swapdone
26Numerics
26.4Random number generationdone
26.4.1Requirementsdone
26.4.2Header <random> synopsispartial
26.4.3Random number engine class templatesdone
26.4.3.1Class template linear_congruential_enginedone
26.4.3.2Class template mersenne_twister_enginedone
26.4.3.3Class template subtract_with_carry_enginedone
26.4.4Random number engine adaptor class templatesdone
26.4.4.1Class template discard_block_enginedone
26.4.4.2Class template independent_bits_enginedone
26.4.4.3Class template shuffle_order_enginedone
26.4.4.4Class template xor_combine_enginedoneoperator()() per N2079
26.4.5Engines and engine adaptors with predefined parametersdone
26.4.6Class random_devicedone
26.4.7Utilitiesdone
26.4.7.1Class seed_seqmissing
26.4.7.2Function template generate_cannonicalmissing
26.4.8Random number generation class templatesdone
26.4.8.1Uniform distributionspartial
26.4.8.1Class template uniform_int_distributionmissing
26.4.8.1Class template uniform_real_distributionmissing
26.4.8.2Bernoulli distributionspartial
26.4.8.2.1Class bernoulli_distributiondone
26.4.8.2.2Class template binomial_distributiondone
26.4.8.2.3Class template geometric_distributiondone
26.4.8.2.4Class template negative_binomial_distributionmissing
26.4.8.3Poisson distributionspartial
26.4.8.3.1Class template poisson_distributiondone
26.4.8.3.2Class template exponential_distributiondone
26.4.8.3.3Class template gamma_distributiondone
26.4.8.3.4Class template weibull_distributionmissing
26.4.8.3.5Class template extreme_value_distributionmissing
26.4.8.4Normal distributionspartial
26.4.8.4.1Class template normal_distributiondone
26.4.8.4.2Class template lognormal_distributionmissing
26.4.8.4.3Class template chi_squared_distributionmissing
26.4.8.4.4Class template cauchy_distributionmissing
26.4.8.4.5Class template fisher_f_distributionmissing
26.4.8.4.6Class template student_t_distributionmissing
26.4.8.5Sampling distributionsmissing
26.4.8.5.1Class template discrete_distributionmissing
26.4.8.5.1Class template piecewise_constant_distributionmissing
26.4.8.5.1Class template general_pdf_distributionmissing
28Regular expressions
28.1Definitionsmissing
28.2Requirementsmissing
28.3Regular expressions summarymissing
28.4Header <regex> synopsismissing
28.5Namespace tr1::regex_constantsmissing
28.5.1Bitmask Type syntax_option_typemissing
28.5.2Bitmask Type regex_constants::match_flag_typemissing
28.5.3Implementation defined error_typemissing
28.6Class regex_errormissing
28.7Class template regex_traitsmissing
28.8Class template basic_regexmissing
28.8.1basic_regex constantsmissing
28.8.2basic_regex constructorsmissing
28.8.3basic_regex assignmissing
28.8.4basic_regex constant operationsmissing
28.8.5basic_regex localemissing
28.8.6basic_regex swapmissing
28.8.7basic_regex non-member functionsmissing
28.8.7.1basic_regex non-member swapmissing
28.9Class template sub_matchmissing
28.9.1sub_match membersmissing
28.9.2sub_match non-member operatorsmissing
28.10Class template match_resultsmissing
28.10.1match_results constructorsmissing
28.10.2match_results sizemissing
28.10.3match_results element accessmissing
28.10.4match_results formattingmissing
28.10.5match_results allocatormissing
28.10.6match_results swapmissing
28.11Regular expression algorithmsmissing
28.11.1exceptionsmissing
28.11.2regex_matchmissing
28.11.3regex_searchmissing
28.11.4regex_replacemissing
28.12Regular expression Iteratorsmissing
28.12.1Class template regex_iteratormissing
28.12.1.1regex_iterator constructorsmissing
28.12.1.2regex_iterator comparisonsmissing
28.12.1.3regex_iterator dereferencemissing
28.12.1.4regex_iterator incrementmissing
28.12.2Class template regex_token_iteratormissing
28.12.2.1regex_token_iterator constructorsmissing
28.12.2.2regex_token_iterator comparisonsmissing
28.12.2.3regex_token_iterator dereferencemissing
28.12.2.4regex_token_iterator incrementmissing
28.13Modified ECMAScript regular expression grammarmissing
CC compatibility
C2.1Additions to header <complex>done
C2.1.1Synopsisdone
C2.1.2Function acosdone
C2.1.3Function asindone
C2.1.4Function atandone
C2.1.5Function acoshdone
C2.1.6Function asinhdone
C2.1.7Function atanhdone
C2.1.8Function fabsdone
C2.1.9Additional Overloadsdone
C2.2Header <ccomplex>missingDR 551
C2.3Header <complex.h>missingDR 551
C2.4Additions to header <cctype>done
C2.4.1Synopsisdone
C2.4.2Function isblankdone
C2.5Additions to header <ctype.h>done
C2.6Header <cfenv>done
C2.6.1Synopsisdone
C2.6.2Definitionsdone
C2.7Header <fenv.h>done
C2.8Additions to header <cfloat>done
C2.9Additions to header <float.h>done
C2.10Additions to header <ios>missing
C2.10.1Synopsismissing
C2.10.2Function hexfloatmissing
C2.11Header <cinttypes>done
C2.11.1SynopsisdoneDR 557
C2.11.2Definitionsdone
C2.12Header <inttypes.h>done
C2.13Additions to header <climits>done
C2.14Additions to header <limits.h>done
C2.15Additions to header <locale>missing
C2.16Additions to header <cmath>done
C2.16.1Synopsisdone
C2.16.2Definitionsdone
C2.16.3Function template definitionsdone
C2.16.4Additional overloadsdoneDR 568; DR 550
C2.17Additions to header <math.h>done
C2.18Additions to header <cstdarg>done
C2.19Additions to header <stdarg.h>done
C2.20The header <cstdbool>done
C2.21The header <stdbool.h>done
C2.22The header <cstdint>done
C2.22.1Synopsisdone
C2.22.2Definitionsdone
C2.23The header <stdint.h>done
C2.24Additions to header <cstdio>done
C2.24.1Synopsisdone
C2.24.2Definitionsdone
C2.24.3Additional format specifiersdoneC library responsibility
C2.24.4Additions to header <stdio.h>done
C2.25Additions to header <cstdlib>done
C2.25.1Synopsisdone
C2.25.2Definitionsdone
C2.25.3Function absdone
C2.25.4Function divdone
C2.26Additions to header <stdlib.h>done
C2.27Header <ctgmath>doneDR 551
C2.28Header <tgmath.h>doneDR 551
C2.29Additions to header <ctime>doneC library responsibility
C2.30Additions to header <cwchar>done
C2.30.1Synopsisdone
C2.30.2Definitionsdone
C2.30.3Additional wide format specifiersdoneC library responsibility
C2.31Additions to header <wchar.h>done
C2.32Additions to header <cwctype>done
C2.32.1Synopsisdone
C2.32.2Function iswblankdone
C2.33Additions to header <wctype.h>done
DCompatibility Features
D.6Old iostream membersdone
D.8Bindersdone33911
D.9Class template auto_ptrdone33911
+ +

Footnotes

+ +
    + +
  1. + + The shared_ptr implementation uses some code from the + Boost + shared_ptr library. +
  2. + +
+ +

+Please send FSF & GNU inquiries & questions to +gnu@gnu.org. +There are also other ways +to contact the FSF. +

+ +

+These pages are maintained by +the GCC team. +

+ +
+For questions related to the use of GCC, please consult these web +pages and the GCC manuals. If +that fails, the gcc-help@gcc.gnu.org +mailing list might help.
+Please send comments on these web pages and the development of GCC to our +developer mailing list at gcc@gnu.org +or gcc@gcc.gnu.org. All of our lists +have public archives. +
+ +

+Copyright (C) Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110, USA. +

+

+Verbatim copying and distribution of this entire article is +permitted in any medium, provided this notice is preserved. +

+ + + + + + +
+ Last modified 2007-10-30 + + + Valid XHTML 1.0 + +
+ + + diff --git a/libstdc++-v3/docs/html/17_intro/c++1998_status.html b/libstdc++-v3/docs/html/17_intro/c++1998_status.html new file mode 100644 index 0000000..7865e64 --- /dev/null +++ b/libstdc++-v3/docs/html/17_intro/c++1998_status.html @@ -0,0 +1,6004 @@ +
+
+   Completion Checklist for the Standard C++ Library
+   Updated: 2003-04-25
+
+   Status Code Legend:
+    M - Missing
+    S - Present as stub.
+    X - Partially implemented, or buggy.
+    T - Implemented, pending test/inspection.
+    V - Verified to pass all available test suites.
+    Q - Qualified by inspection for non-testable correctness.
+    P - Portability verified.
+    C - Certified.
+
+   Lexical notes:
+   Only status codes appear in column 0.  Notes relating to conformance
+   issues appear [in brackets].
+
+   Note that this checklist does not (yet) include all emendations
+   recommended by the ISO Library Working Group:
+   http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-toc.html
+
+   Detailed explanation of status codes:
+
+    M - Missing:  The name is not visible to programs that include
+        the specified header, either at compile or link stage.
+
+    S - Present as stub:  A program can use the name, but no implementation
+        is provided.  Programs that use the name link correctly, but
+        cannot usefully be run.
+
+    X - Partially implemented, or buggy:  Some implementation has been
+        provided, but it is known or believed not to conform fully.
+        It may have an incorrect base class, wrong namespace, wrong
+        storage class, or simply not fully implement requirements.
+        However, it may be sufficiently usable to help test other
+        components.
+
+    T - Implemented, pending test/inspection:  Implementation believed
+        to be complete, and informal testing suggests it is ready for
+        formal verification.
+
+    V - Verified, passes all test suites:  Verified to satisfy all
+        generically testable conformance requirements.
+
+    Q - Qualified by inspection for non-testable correctness:
+        Inspected, "implementation-defined" documentation accepted,
+        local usability criteria satisfied, formally inspected for
+        other untestable conformance.  (Untestable requirements
+        include exception-safety, thread-safety, worst-case
+        complexity, memory cleanliness, usefulness.)
+
+    P - Portability verified:  Qualified on all primary target platforms.
+
+    C - Certified:  Formally certified to have passed all tests,
+        inspections, qualifications; approved under "signing authority"
+        to be used to satisfy contractual guarantees.
+
+   ----------------------------------------------------------------------
+                          
+                                 
+                                  
+X                          
+                             
+                      
+          
+
+   [C header names must be in std:: to qualify.  Related to shadow/ dir.]
+                
+                
+X               
+                
+
+    Macro:
+X   errno,  declared  or  defined in .
+
+    Macro fn:
+X   setjmp(jmp_buf), declared or defined in 
+X   va_end(va_list), declared or defined in 
+
+    Types:
+X   clock_t, div_t, FILE, fpos_t, lconv, ldiv_t, mbstate_t,
+X   ptrdiff_t, sig_atomic_t, size_t,  time_t,  tm,  va_list,
+X   wctrans_t, wctype_t, and wint_t.
+
+   1 Which  of  the functions in the C++ Standard Library are not reentrant
+    subroutines is implementation-defined.
+
+   18.1  Types                                        [lib.support.types]
+X      
+X      NULL
+X      offsetof
+X      ptrdiff_t
+X      size_t
+
+   18.2  Implementation properties                   [lib.support.limits]
+
+    , , and 
+
+   18.2.1  Numeric limits                                    [lib.limits]
+
+X   template class numeric_limits;
+
+T   enum float_round_style;
+T   enum float_denorm_style;
+
+T   template<> class numeric_limits;
+
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+T   template<> class numeric_limits;
+
+X   template<> class numeric_limits;
+X   template<> class numeric_limits;
+X   template<> class numeric_limits;
+
+   18.2.1.1  Template class numeric_limits           [lib.numeric.limits]
+T   template class numeric_limits {
+    public:
+T     static const bool is_specialized = false;
+T     static T min() throw();
+T     static T max() throw();
+T     static const int  digits = 0;
+T     static const int  digits10 = 0;
+T     static const bool is_signed = false;
+T     static const bool is_integer = false;
+T     static const bool is_exact = false;
+T     static const int  radix = 0;
+T     static T epsilon() throw();
+T     static T round_error() throw();
+
+T     static const int  min_exponent = 0;
+T     static const int  min_exponent10 = 0;
+T     static const int  max_exponent = 0;
+T     static const int  max_exponent10 = 0;
+
+T     static const bool has_infinity = false;
+T     static const bool has_quiet_NaN = false;
+T     static const bool has_signaling_NaN = false;
+T     static const float_denorm_style has_denorm = denorm_absent;
+T     static const bool has_denorm_loss = false;
+T     static T infinity() throw();
+T     static T quiet_NaN() throw();
+T     static T signaling_NaN() throw();
+T     static T denorm_min() throw();
+
+T     static const bool is_iec559 = false;
+T     static const bool is_bounded = false;
+T     static const bool is_modulo = false;
+
+T     static const bool traps = false;
+T     static const bool tinyness_before = false;
+T     static const float_round_style round_style = round_toward_zero;
+    };
+
+   18.2.1.3  Type float_round_style                     [lib.round.style]
+
+T   enum float_round_style {
+T     round_indeterminate       = -1,
+T     round_toward_zero         =  0,
+T     round_to_nearest          =  1,
+T     round_toward_infinity     =  2,
+T     round_toward_neg_infinity =  3
+    };
+
+   18.2.1.4  Type float_denorm_style                   [lib.denorm.style]
+
+T   enum float_denorm_style {
+T     denorm_indeterminate = -1;
+T     denorm_absent = 0;
+T     denorm present = 1;
+    };
+
+   18.2.1.5  numeric_limits specializations         [lib.numeric.special]
+   
+   [Note: see Note at 18.2.1.  ]
+
+   18.2.2  C Library                                       [lib.c.limits]
+
+   1 Header  (Table 3):
+      CHAR_BIT   INT_MAX    LONG_MIN     SCHAR_MIN   UCHAR_MAX   USHRT_MAX
+X     CHAR_MAX   INT_MIN    MB_LEN_MAX   SHRT_MAX    UINT_MAX
+      CHAR_MIN   LONG_MAX   SCHAR_MAX    SHRT_MIN    ULONG_MAX
+
+   3 Header  (Table 4):
+
+    DBL_DIG          DBL_MIN_EXP      FLT_MIN_10_EXP   LDBL_MAX_10_EXP
+    DBL_EPSILON      FLT_DIG          FLT_MIN_EXP      LDBL_MAX_EXP
+    DBL_MANT_DIG     FLT_EPSILON      FLT_RADIX        LDBL_MIN
+X   DBL_MAX          FLT_MANT_DIG     FLT_ROUNDS       LDBL_MIN_10_EXP
+    DBL_MAX_10_EXP   FLT_MAX          LDBL_DIG         LDBL_MIN_EXP
+    DBL_MAX_EXP      FLT_MAX_10_EXP   LDBL_EPSILON
+    DBL_MIN          FLT_MAX_EXP      LDBL_MANT_DIG
+    DBL_MIN_10_EXP   FLT_MIN          LDBL_MAX
+
+
+        1 Header  (partial), Table 5:
+X             EXIT_FAILURE     EXIT_SUCCESS
+              abort   atexit   exit
+
+S    abort(void)
+S    extern "C" int atexit(void (*f)(void))
+S    extern "C++" int atexit(void (*f)(void))
+S    exit(int status)
+
+   18.4  Dynamic memory management                  [lib.support.dynamic]
+
+   Header  synopsis
+
+T    class bad_alloc;
+T    struct nothrow_t {};
+T    extern const nothrow_t nothrow;
+T    typedef void (*new_handler)();
+T    new_handler set_new_handler(new_handler new_p) throw();
+
+T    void* operator new(std::size_t size) throw(std::bad_alloc);
+T    void* operator new(std::size_t size, const std::nothrow_t&) throw();
+T    void  operator delete(void* ptr) throw();
+T    void  operator delete(void* ptr, const std::nothrow_t&) throw();
+T    void* operator new[](std::size_t size) throw(std::bad_alloc);
+T    void* operator new[](std::size_t size, const std::nothrow_t&) throw();
+T    void  operator delete[](void* ptr) throw();
+T    void  operator delete[](void* ptr, const std::nothrow_t&) throw();
+T    void* operator new  (std::size_t size, void* ptr) throw();
+T    void* operator new[](std::size_t size, void* ptr) throw();
+T    void  operator delete  (void* ptr, void*) throw();
+T    void  operator delete[](void* ptr, void*) throw();
+
+   18.4.2.1  Class bad_alloc                              [lib.bad.alloc]
+
+T   class bad_alloc : public exception {
+    public:
+T     bad_alloc() throw();
+T     bad_alloc(const bad_alloc&) throw();
+T     bad_alloc& operator=(const bad_alloc&) throw();
+T     virtual ~bad_alloc() throw();
+T     virtual const char* what() const throw();
+
+
+
+T  new_handler set_new_handler(new_handler new_p) throw();
+
+
+     Header  synopsis
+
+T    class type_info;
+T    class bad_cast;
+T    class bad_typeid;
+
+   18.5.1 - Class type_info [lib.type.info]
+
+T    class type_info {
+    public:
+T      virtual ~type_info();
+T      bool operator==(const type_info& rhs) const;
+T      bool operator!=(const type_info& rhs) const;
+T      bool before(const type_info& rhs) const;
+T      const char* name() const;
+    private:
+T      type_info(const type_info& rhs);
+T      type_info& operator=(const type_info& rhs);
+    };
+
+   18.5.2 - Class bad_cast [lib.bad.cast]
+
+T  bad_cast() throw();
+T  virtual const char* bad_cast::what() const throw();
+
+   18.5.3  Class bad_typeid                              [lib.bad.typeid]
+
+T    class bad_typeid : public exception {
+    public:
+T      bad_typeid() throw();
+T      bad_typeid(const bad_typeid&) throw();
+T      bad_typeid& operator=(const bad_typeid&) throw();
+T      virtual ~bad_typeid() throw();
+T      virtual const char* what() const throw();
+    };
+
+   18.6  Exception handling                       [lib.support.exception]
+
+T      Header  synopsis
+
+T    class exception;
+T    class bad_exception;
+
+T    typedef void (*unexpected_handler)();
+T    unexpected_handler set_unexpected(unexpected_handler f) throw();
+T    void unexpected();
+T    typedef void (*terminate_handler)();
+T    terminate_handler set_terminate(terminate_handler f) throw();
+T    void terminate();
+T    bool uncaught_exception();
+
+   18.6.1  Class exception                                [lib.exception]
+
+T    class exception {
+     public:
+T      exception() throw();
+T      exception(const exception&) throw();
+T      exception& operator=(const exception&) throw();
+T      virtual ~exception() throw();
+T      virtual const char* what() const throw();
+    };
+
+   18.6.2.1  Class bad_exception                      [lib.bad.exception]
+T    class bad_exception : public exception {
+    public:
+T      bad_exception() throw();
+T      bad_exception(const bad_exception&) throw();
+T      bad_exception& operator=(const bad_exception&) throw();
+T      virtual ~bad_exception() throw();
+T      virtual const char* what() const throw();
+    };
+
+   18.7  Other runtime support                      [lib.support.runtime]
+
+   1 Headers  (variable arguments),    (nonlocal  jumps),
+      (system  clock clock(), time()),  (signal handling),
+    and  (runtime environment getenv(), system()).
+
+                    Table 6--Header  synopsis
+                 Macros:   va_arg    va_end   va_start
+X                Type:     va_list
+
+                    Table 7--Header  synopsis
+
+                          Macro:      setjmp |
+X                         Type:       jmp_buf
+                          Function:   longjmp
+
+                     Table 8--Header  synopsis
+
+                      Macros:      CLOCKS_PER_SEC
+X                     Types:       clock_t
+                      Functions:   clock
+
+                    Table 9--Header  synopsis
+
+X        Macros:      SIGABRT        SIGILL   SIGSEGV   SIG_DFL
+         SIG_IGN      SIGFPE         SIGINT   SIGTERM   SIG_ERR
+         Type:        sig_atomic_t
+         Functions:   raise          signal
+
+                   Table 10--Header  synopsis
+
+X                     Functions:   getenv   system
+
+   19.1  Exception classes                           [lib.std.exceptions]
+
+   Header  synopsis
+
+T     class logic_error;
+T     class domain_error;
+T     class invalid_argument;
+T     class length_error;
+T     class out_of_range;
+T     class runtime_error;
+T     class range_error;
+T     class overflow_error;
+T     class underflow_error;
+
+   19.1.1  Class logic_error                            [lib.logic.error]
+T   class logic_error : public exception {
+    public:
+T     explicit logic_error(const string& what_arg);
+    };
+
+   19.1.2  Class domain_error                          [lib.domain.error]
+
+T   class domain_error : public logic_error {
+    public:
+T     explicit domain_error(const string& what_arg);
+    };
+
+   19.1.3  Class invalid_argument                  [lib.invalid.argument]
+
+T   class invalid_argument : public logic_error {
+    public:
+T     explicit invalid_argument(const string& what_arg);
+    };
+
+   19.1.4  Class length_error                          [lib.length.error]
+
+T   class length_error : public logic_error {
+    public:
+T     explicit length_error(const string& what_arg);
+    };
+
+   19.1.5  Class out_of_range                          [lib.out.of.range]
+
+T   class out_of_range : public logic_error {
+    public:
+T     explicit out_of_range(const string& what_arg);
+    };
+
+
+   19.1.6  Class runtime_error                        [lib.runtime.error]
+
+T   class runtime_error : public exception {
+    public:
+T     explicit runtime_error(const string& what_arg);
+    };
+
+
+   19.1.7  Class range_error                            [lib.range.error]
+
+T   class range_error : public runtime_error {
+    public:
+T     explicit range_error(const string& what_arg);
+    };
+
+   19.1.8  Class overflow_error                      [lib.overflow.error]
+
+T   class overflow_error : public runtime_error {
+    public:
+T     explicit overflow_error(const string& what_arg);
+    };
+
+
+   19.1.9  Class underflow_error                    [lib.underflow.error]
+
+T   class underflow_error : public runtime_error {
+    public:
+T     explicit underflow_error(const string& what_arg);
+    };
+
+
+   19.2  Assertions                                      [lib.assertions]
+
+                    Table 2--Header  synopsis
+
+X                         Macro:   assert
+
+   19.3  Error numbers                                        [lib.errno]
+
+                    Table 3--Header  synopsis
+
+X                    |Macros:   EDOM   ERANGE   errno |
+
+
+   20.2  Utility components                                 [lib.utility]
+
+   Header  synopsis
+
+    // _lib.operators_, operators:
+T    namespace rel_ops {
+T      template bool operator!=(const T&, const T&);
+T      template bool operator> (const T&, const T&);
+T      template bool operator<=(const T&, const T&);
+T      template bool operator>=(const T&, const T&);
+    }
+    // _lib.pairs_, pairs:
+T   template  struct pair;
+T   template 
+      bool operator==(const pair&, const pair&);
+T   template 
+      bool operator< (const pair&, const pair&);
+T   template 
+      bool operator!=(const pair&, const pair&);
+T   template 
+      bool operator> (const pair&, const pair&);
+T   template 
+      bool operator>=(const pair&, const pair&);
+T   template 
+      bool operator<=(const pair&, const pair&);
+T   template  pair make_pair(const T1&, const T2&);
+
+
+   20.2.2  Pairs                                              [lib.pairs]
+
+T  template 
+   struct pair {
+T    typedef T1 first_type;
+T    typedef T2 second_type;
+
+T    T1 first;
+T    T2 second;
+T    pair();
+T    pair(const T1& x, const T2& y);
+T    template pair(const pair &p);
+   };
+
+   20.3  Function objects                          [lib.function.objects]
+
+   Header  synopsis
+
+    // _lib.base_, base:
+V   template  struct unary_function;
+V   template  struct binary_function;
+
+    // _lib.arithmetic.operations_, arithmetic operations:
+V   template  struct plus;
+V   template  struct minus;
+V   template  struct multiplies;
+V   template  struct divides;
+V   template  struct modulus;
+V   template  struct negate;
+    // _lib.comparisons_, comparisons:
+V   template  struct equal_to;
+V   template  struct not_equal_to;
+V   template  struct greater;
+V   template  struct less;
+V   template  struct greater_equal;
+V   template  struct less_equal;
+    // _lib.logical.operations_, logical operations:
+V   template  struct logical_and;
+V   template  struct logical_or;
+V   template  struct logical_not;
+    // _lib.negators_, negators:
+    template  struct unary_negate;
+V   template 
+      unary_negate  not1(const Predicate&);
+V   template  struct binary_negate;
+V   template 
+      binary_negate not2(const Predicate&);
+    // _lib.binders_, binders:
+V   template   class binder1st;
+V   template 
+      binder1st bind1st(const Operation&, const T&);
+V   template  class binder2nd;
+V   template 
+      binder2nd bind2nd(const Operation&, const T&);
+    // _lib.function.pointer.adaptors_, adaptors:
+V   template  class pointer_to_unary_function;
+V   template 
+      pointer_to_unary_function ptr_fun(Result (*)(Arg));
+V   template 
+      class pointer_to_binary_function;
+V   template 
+      pointer_to_binary_function
+        ptr_fun(Result (*)(Arg1,Arg2));
+
+    // _lib.member.pointer.adaptors_, adaptors:
+V   template class mem_fun_t;
+V   template class mem_fun1_t;
+V   template
+        mem_fun_t mem_fun(S (T::*f)());
+V   template
+        mem_fun1_t mem_fun(S (T::*f)(A));
+V   template class mem_fun_ref_t;
+V   template class mem_fun1_ref_t;
+V   template
+        mem_fun_ref_t mem_fun_ref(S (T::*f)());
+V   template
+        mem_fun1_ref_t mem_fun_ref(S (T::*f)(A));
+
+V   template  class const_mem_fun_t;
+V   template  class const_mem_fun1_t;
+V   template 
+      const_mem_fun_t mem_fun(S (T::*f)() const);
+V   template 
+      const_mem_fun1_t mem_fun(S (T::*f)(A) const);
+V   template  class const_mem_fun_ref_t;
+V   template  class const_mem_fun1_ref_t;
+V   template 
+      const_mem_fun_ref_t mem_fun_ref(S (T::*f)() const);
+V   template 
+      const_mem_fun1_ref_t mem_fun_ref(S (T::*f)(A) const);
+   }
+
+   20.3.1  Base                                                [lib.base]
+
+V   template 
+    struct unary_function {
+V     typedef Arg    argument_type;
+V     typedef Result result_type;
+    };
+V   template 
+    struct binary_function {
+V     typedef Arg1   first_argument_type;
+V     typedef Arg2   second_argument_type;
+V     typedef Result result_type;
+    };
+
+   20.3.2  Arithmetic operations              [lib.arithmetic.operations]
+
+T  template  struct plus : binary_function {
+V   T operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct minus : binary_function {
+V   T operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct multiplies : binary_function {
+V   T operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct divides : binary_function {
+V   T operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct modulus : binary_function {
+V   T operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct negate : unary_function {
+V   T operator()(const T& x) const;
+   };
+
+   20.3.3  Comparisons                                  [lib.comparisons]
+
+T  template  struct equal_to : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct not_equal_to : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct greater : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct less : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct greater_equal : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct less_equal : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+   20.3.4  Logical operations                    [lib.logical.operations]
+
+T  template  struct logical_and : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct logical_or : binary_function {
+V   bool operator()(const T& x, const T& y) const;
+   };
+
+T  template  struct logical_not : unary_function {
+V   bool operator()(const T& x) const;
+   };
+
+   20.3.5  Negators                                        [lib.negators]
+
+T  template 
+    class unary_negate
+      : public unary_function {
+   public:
+T   explicit unary_negate(const Predicate& pred);
+V   bool operator()(const typename Predicate::argument_type& x) const;
+   };
+
+T  template 
+    class binary_negate
+      : public binary_function {
+    public:
+T     explicit binary_negate(const Predicate& pred);
+V     bool operator()(const typename Predicate::first_argument_type&  x,
+          const typename Predicate::second_argument_type& y) const;
+    };
+
+
+   20.3.6  Binders                                          [lib.binders]
+
+   20.3.6.1  Template class binder1st                    [lib.binder.1st]
+T   template 
+    class binder1st
+      : public unary_function {
+    protected:
+T     Operation                      op;
+T     typename Operation::first_argument_type value;
+    public:
+V     binder1st(const Operation& x,
+                const typename Operation::first_argument_type& y);
+V     typename Operation::result_type
+        operator()(const typename Operation::second_argument_type& x) const;
+    };
+
+   20.3.6.2  bind1st                                       [lib.bind.1st]
+
+V  template 
+    binder1st bind1st(const Operation& op, const T& x);
+
+   20.3.6.3  Template class binder2nd                    [lib.binder.2nd]
+T   template 
+    class binder2nd
+      : public unary_function {
+    protected:
+T     Operation                       op;
+T     typename Operation::second_argument_type value;
+    public:
+V     binder2nd(const Operation& x,
+                const typename Operation::second_argument_type& y);
+V     typename Operation::result_type
+        operator()(const typename Operation::first_argument_type& x) const;
+    };
+
+   20.3.6.4  bind2nd                                       [lib.bind.2nd]
+
+T  template 
+    binder2nd bind2nd(const Operation& op, const T& x);
+
+
+   20.3.7  Adaptors for pointers to       [lib.function.pointer.adaptors]
+       functions
+
+   1 To  allow  pointers to (unary and binary) functions to work with func-
+   tion adaptors the library provides:
+
+T   template 
+    class pointer_to_unary_function : public unary_function {
+    public:
+T     explicit pointer_to_unary_function(Result (*f)(Arg));
+V     Result operator()(Arg x) const;
+    };
+
+T  template 
+    pointer_to_unary_function ptr_fun(Result (*f)(Arg));
+
+T       template 
+        class pointer_to_binary_function :
+          public binary_function {
+        public:
+T         explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2));
+V         Result operator()(Arg1 x, Arg2 y) const;
+        };
+
+
+   20.3.8  Adaptors for pointers to         [lib.member.pointer.adaptors]
+       members
+
+T  template  class mem_fun_t
+          : public unary_function {
+   public:
+T   explicit mem_fun_t(S (T::*p)());
+V   S operator()(T* p) const;
+   };
+
+T   template  class mem_fun1_t
+          : public binary_function {
+    public:
+T     explicit mem_fun1_t(S (T::*p)(A));
+V     S operator()(T* p, A x) const;
+   };
+
+V   template mem_fun_t
+       mem_fun(S (T::*f)());
+V   template mem_fun1_t
+       mem_fun(S (T::*f)(A));
+
+T   template  class mem_fun_ref_t
+          : public unary_function {
+    public:
+T     explicit mem_fun_ref_t(S (T::*p)());
+V     S operator()(T& p) const;
+   };
+
+T   template  class mem_fun1_ref_t
+          : public binary_function {
+    public:
+T     explicit mem_fun1_ref_t(S (T::*p)(A));
+V     S operator()(T& p, A x) const;
+   };
+
+T   template mem_fun_ref_t
+       mem_fun_ref(S (T::*f)());
+
+T   template mem_fun1_ref_t
+       mem_fun_ref(S (T::*f)(A));
+
+T  template  class const_mem_fun_t
+        : public unary_function {
+   public:
+T   explicit const_mem_fun_t(S (T::*p)() const);
+V   S operator()(const T* p) const;
+   };
+
+T  template  class const_mem_fun1_t
+        : public binary_function {
+   public:
+T   explicit const mem_fun1_t(S (T::*p)(A) const);
+V   S operator()(const T* p, A x) const;
+   };
+
+V   template const_mem_fun_t
+       mem_fun(S (T::*f)() const);
+V   template const_mem_fun1_t
+       mem_fun(S (T::*f)(A) const);
+
+T   template  class const_mem_fun_ref_t
+          : public unary_function {
+    public:
+T     explicit const_mem_fun_ref_t(S (T::*p)() const);
+V     S operator()(const T& p) const;
+   };
+
+T   template  class const_mem_fun1_ref_t
+          : public binary_function {
+    public:
+T     explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
+V     S operator()(const T& p, A x) const;
+   };
+
+T   template const_mem_fun_ref_t
+       mem_fun_ref(S (T::*f)() const);
+
+T   template const_mem_fun1_ref_t
+        mem_fun_ref(S (T::*f)(A) const);
+
+   20.4  Memory                                              [lib.memory]
+
+   Header  synopsis
+
+    // _lib.default.allocator_, the default allocator:
+T   template  class allocator;
+T   template <> class allocator;
+T   template 
+      bool operator==(const allocator&, const allocator&) throw();
+T   template 
+      bool operator!=(const allocator&, const allocator&) throw();
+    // _lib.storage.iterator_, raw storage iterator:
+T   template  class raw_storage_iterator;
+    // _lib.temporary.buffer_, temporary buffers:
+T   template 
+      pair get_temporary_buffer(ptrdiff_t n);
+T   template 
+      void return_temporary_buffer(T* p);
+    // _lib.specialized.algorithms_, specialized algorithms:
+T   template 
+      ForwardIterator
+        uninitialized_copy(InputIterator first, InputIterator last,
+                           ForwardIterator result);
+T   template 
+      void uninitialized_fill(ForwardIterator first, ForwardIterator last,
+                              const T& x);
+T   template 
+      void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
+    // _lib.auto.ptr_, pointers:
+X   template class auto_ptr;
+   }
+
+   20.4.1  The default allocator                  [lib.default.allocator]
+
+T   template  class allocator;
+    // specialize for void:
+T   template <> class allocator {
+    public:
+T     typedef void*       pointer;
+T     typedef const void* const_pointer;
+      // reference-to-void members are impossible.
+T     typedef void  value_type;
+T     template  struct rebind { typedef allocator other; };
+    };
+
+T   template  class allocator {
+     public:
+T     typedef size_t    size_type;
+T     typedef ptrdiff_t difference_type;
+T     typedef T*        pointer;
+T     typedef const T*  const_pointer;
+T     typedef T&        reference;
+T     typedef const T&  const_reference;
+T     typedef T         value_type;
+T     template  struct rebind { typedef allocator other; };
+T     allocator() throw();
+T     allocator(const allocator&) throw();
+T     template  allocator(const allocator&) throw();
+T    ~allocator() throw();
+T     pointer address(reference x) const;
+T     const_pointer address(const_reference x) const;
+T     pointer allocate(
+        size_type, allocator::const_pointer hint = 0);
+T     void deallocate(pointer p, size_type n);
+T     size_type max_size() const throw();
+T     void construct(pointer p, const T& val);
+T     void destroy(pointer p);
+    };
+
+   20.4.1.2  allocator globals                    [lib.allocator.globals]
+
+T  template 
+    bool operator==(const allocator&, const allocator&) throw();
+T  template 
+    bool operator!=(const allocator&, const allocator&) throw();
+
+   20.4.2  Raw storage iterator                    [lib.storage.iterator]
+
+T   template 
+    class raw_storage_iterator
+      : public iterator {
+    public:
+T     explicit raw_storage_iterator(OutputIterator x);
+T     raw_storage_iterator& operator*();
+T     raw_storage_iterator& operator=(const T& element);
+T     raw_storage_iterator& operator++();
+T     raw_storage_iterator  operator++(int);
+    };
+
+   20.4.3  Temporary buffers                       [lib.temporary.buffer]
+
+T  template 
+    pair get_temporary_buffer(ptrdiff_t n);
+
+T  template  void return_temporary_buffer(T* p);
+
+   20.4.4  Specialized algorithms            [lib.specialized.algorithms]
+
+   20.4.4.1  uninitialized_copy                  [lib.uninitialized.copy]
+
+V  template 
+    ForwardIterator
+      uninitialized_copy(InputIterator first, InputIterator last,
+                         ForwardIterator result);
+
+   20.4.4.2  uninitialized_fill                  [lib.uninitialized.fill]
+
+V  template 
+    void uninitialized_fill(ForwardIterator first, ForwardIterator last,
+                            const T& x);
+
+   20.4.4.3  uninitialized_fill_n              [lib.uninitialized.fill.n]
+
+V  template 
+    void uninitialized_fill_n(ForwardIterator first, Size n, const T& x);
+
+   20.4.5  Template class auto_ptr                         [lib.auto.ptr]
+
+X   template class auto_ptr {
+      template  struct auto_ptr_ref {};
+    public:
+T     typedef X element_type;
+      // _lib.auto.ptr.cons_ construct/copy/destroy:
+T     explicit auto_ptr(X* p =0) throw();
+T     auto_ptr(auto_ptr&) throw();
+T     template auto_ptr(auto_ptr&) throw();
+T     auto_ptr& operator=(auto_ptr&) throw();
+T     template auto_ptr& operator=(auto_ptr&) throw();
+T    ~auto_ptr() throw();
+      // _lib.auto.ptr.members_ members:
+T     X& operator*() const throw();
+T     X* operator->() const throw();
+T     X* get() const throw();
+T     X* release() throw();
+T     void reset(X* p =0) throw();
+
+      // _lib.auto.ptr.conv_ conversions:
+X     auto_ptr(auto_ptr_ref) throw();
+X     template operator auto_ptr_ref() throw();
+X     template operator auto_ptr() throw();
+    };
+
+   20.4.6  C Library                                       [lib.c.malloc]
+
+                    Table 7--Header  synopsis
+
+X                    Functions:   calloc   malloc
+                                  free     realloc
+
+
+                    Table 8--Header  synopsis
+
+X                    Macro:       NULL
+X                    Type:        size_t
+X                    Functions:   memchr    memcmp
+X                    memcpy       memmove   memset
+
+                     Table 9--Header  synopsis
+
+X          Macros:   NULL
+X          Types:    size_t   clock_t    time_t
+X          Struct:   tm
+           Functions:
+X          asctime   clock    difftime   localtime   strftime
+X          ctime     gmtime   mktime     time
+
+   21.1.1  Character traits requirements        [lib.char.traits.require]
+
+   2 The struct template
+T  template struct char_traits;
+   shall be provided in the header  as a basis for  explicit spe-
+   cializations.
+
+
+   21.1.3.1  struct                [lib.char.traits.specializations.char]
+       char_traits
+
+T   template<>
+    struct char_traits {
+T     typedef char        char_type;
+T     typedef int         int_type;
+T     typedef streamoff   off_type;
+T     typedef streampos   pos_type;
+T     typedef mbstate_t   state_type;
+
+T     static void assign(char_type& c1, const char_type& c2);
+T     static bool eq(const char_type& c1, const char_type& c2);
+T     static bool lt(const char_type& c1, const char_type& c2);
+
+T     static int compare(const char_type* s1, const char_type* s2, size_t n);
+T     static size_t length(const char_type* s);
+T     static const char_type* find(const char_type* s, size_t n,
+                                   const char_type& a);
+T     static char_type* move(char_type* s1, const char_type* s2, size_t n);
+T     static char_type* copy(char_type* s1, const char_type* s2, size_t n);
+T     static char_type* assign(char_type* s, size_t n, char_type a);
+
+T     static int_type not_eof(const int_type& c);
+T     static char_type to_char_type(const int_type& c);
+T     static int_type to_int_type(const char_type& c);
+T     static bool eq_int_type(const int_type& c1, const int_type& c2);
+T     static int_type eof();
+    };
+
+   21.1.3.2  struct             [lib.char.traits.specializations.wchar.t]
+       char_traits
+
+V   template<>
+    struct char_traits {
+V     typedef wchar_t      char_type;
+V     typedef wint_t       int_type;
+V     typedef streamoff   off_type;
+V     typedef wstreampos   pos_type;
+V     typedef mbstate_t    state_type;
+
+V     static void assign(char_type& c1, const char_type& c2);
+V     static bool eq(const char_type& c1, const char_type& c2);
+V     static bool lt(const char_type& c1, const char_type& c2);
+
+V     static int compare(const char_type* s1, const char_type* s2, size_t n);
+V     static size_t length(const char_type* s);
+V     static const char_type* find(const char_type* s, size_t n,
+                                   const char_type& a);
+V     static char_type* move(char_type* s1, const char_type* s2, size_t n);
+V     static char_type* copy(char_type* s1, const char_type* s2, size_t n);
+V     static char_type* assign(char_type* s, size_t n, char_type a);
+
+V     static int_type not_eof(const int_type& c);
+V     static char_type to_char_type(const int_type& c);
+V     static int_type to_int_type(const char_type& c);
+V     static bool eq_int_type(const int_type& c1, const int_type& c2);
+V     static int_type eof();
+    };
+
+   21.2  String classes                              [lib.string.classes]
+
+    // _lib.char.traits_, character traits:
+V   template
+      struct char_traits;
+V   template <> struct char_traits;
+V   template <> struct char_traits;
+
+    // _lib.basic.string_, basic_string:
+V   template,
+             class Allocator = allocator >
+      class basic_string;
+V   template
+      basic_string
+        operator+(const basic_string& lhs,
+                  const basic_string& rhs);
+V   template
+      basic_string
+        operator+(const charT* lhs,
+                  const basic_string& rhs);
+V   template
+      basic_string
+        operator+(charT lhs, const basic_string& rhs);
+V   template
+      basic_string
+        operator+(const basic_string& lhs,
+                  const charT* rhs);
+V   template
+      basic_string
+        operator+(const basic_string& lhs, charT rhs);
+
+V   template
+      bool operator==(const basic_string& lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator==(const charT* lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator==(const basic_string& lhs,
+                      const charT* rhs);
+V   template
+      bool operator!=(const basic_string& lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator!=(const charT* lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator!=(const basic_string& lhs,
+                      const charT* rhs);
+V   template
+      bool operator< (const basic_string& lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator< (const basic_string& lhs,
+                      const charT* rhs);
+V   template
+      bool operator< (const charT* lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator> (const basic_string& lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator> (const basic_string& lhs,
+                      const charT* rhs);
+V   template
+      bool operator> (const charT* lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator<=(const basic_string& lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator<=(const basic_string& lhs,
+                      const charT* rhs);
+V   template
+      bool operator<=(const charT* lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator>=(const basic_string& lhs,
+                      const basic_string& rhs);
+V   template
+      bool operator>=(const basic_string& lhs,
+                      const charT* rhs);
+V   template
+      bool operator>=(const charT* lhs,
+                      const basic_string& rhs);
+
+    // _lib.string.special_:
+V   template
+       void swap(basic_string& lhs,
+                 basic_string& rhs);
+V   template
+     basic_istream&
+      operator>>(basic_istream& is,
+                 basic_string& str);
+T   template
+     basic_ostream&
+      operator<<(basic_ostream& os,
+                 const basic_string& str);
+V   template
+     basic_istream&
+       getline(basic_istream& is,
+               basic_string& str,
+               charT delim);
+V   template
+     basic_istream&
+       getline(basic_istream& is,
+               basic_string& str);
+V   typedef basic_string string;
+T   typedef basic_string wstring;
+   }
+
+   21.3  Template class basic_string                   [lib.basic.string]
+
+V  namespace std {
+    template,
+             class Allocator = allocator >
+    class basic_string {
+    public:
+      // types:
+      typedef          traits                     traits_type;
+      typedef typename traits::char_type          value_type;
+      typedef          Allocator                  allocator_type;
+      typedef typename Allocator::size_type       size_type;
+      typedef typename Allocator::difference_type difference_type;
+      typedef typename Allocator::reference       reference;
+      typedef typename Allocator::const_reference const_reference;
+      typedef typename Allocator::pointer         pointer;
+      typedef typename Allocator::const_pointer   const_pointer;
+      typedef implementation defined             iterator;
+      typedef implementation defined             const_iterator;
+      typedef std::reverse_iterator reverse_iterator;
+      typedef std::reverse_iterator const_reverse_iterator;
+      static const size_type npos = -1;
+
+      // _lib.string.cons_ construct/copy/destroy:
+V     explicit basic_string(const Allocator& a = Allocator());
+V     basic_string(const basic_string& str, size_type pos = 0,
+                   size_type n = npos, const Allocator& a = Allocator());
+V     basic_string(const charT* s,
+                   size_type n, const Allocator& a = Allocator());
+V     basic_string(const charT* s, const Allocator& a = Allocator());
+V     basic_string(size_type n, charT c, const Allocator& a = Allocator());
+V     template
+        basic_string(InputIterator begin, InputIterator end,
+                     const Allocator& a = Allocator());
+V    ~basic_string();
+V     basic_string& operator=(const basic_string& str);
+V     basic_string& operator=(const charT* s);
+V     basic_string& operator=(charT c);
+      // _lib.string.iterators_ iterators:
+V     iterator       begin();
+V     const_iterator begin() const;
+V     iterator       end();
+V     const_iterator end() const;
+
+V     reverse_iterator       rbegin();
+V     const_reverse_iterator rbegin() const;
+V     reverse_iterator       rend();
+V     const_reverse_iterator rend() const;
+      // _lib.string.capacity_ capacity:
+V     size_type size() const;
+V     size_type length() const;
+V     size_type max_size() const;
+V     void resize(size_type n, charT c);
+V     void resize(size_type n);
+V     size_type capacity() const;
+V     void reserve(size_type res_arg = 0);
+V     void clear();
+V     bool empty() const;
+      // _lib.string.access_ element access:
+V     const_reference operator[](size_type pos) const;
+V     reference       operator[](size_type pos);
+V     const_reference at(size_type n) const;
+V     reference       at(size_type n);
+      // _lib.string.modifiers_ modifiers:
+V     basic_string& operator+=(const basic_string& str);
+V     basic_string& operator+=(const charT* s);
+V     basic_string& operator+=(charT c);
+V     basic_string& append(const basic_string& str);
+V     basic_string& append(const basic_string& str, size_type pos,
+                           size_type n);
+V     basic_string& append(const charT* s, size_type n);
+V     basic_string& append(const charT* s);
+V     basic_string& append(size_type n, charT c);
+V     template
+        basic_string& append(InputIterator first, InputIterator last);
+V     void push_back(const charT);
+
+V     basic_string& assign(const basic_string&);
+V     basic_string& assign(const basic_string& str, size_type pos,
+                           size_type n);
+V     basic_string& assign(const charT* s, size_type n);
+V     basic_string& assign(const charT* s);
+V     basic_string& assign(size_type n, charT c);
+V     template
+        basic_string& assign(InputIterator first, InputIterator last);
+V     basic_string& insert(size_type pos1, const basic_string& str);
+V     basic_string& insert(size_type pos1, const basic_string& str,
+                           size_type pos2, size_type n);
+V     basic_string& insert(size_type pos, const charT* s, size_type n);
+V     basic_string& insert(size_type pos, const charT* s);
+V     basic_string& insert(size_type pos, size_type n, charT c);
+V     iterator insert(iterator p, charT c);
+V     void     insert(iterator p, size_type n, charT c);
+V     template
+        void insert(iterator p, InputIterator first, InputIterator last);
+V     basic_string& erase(size_type pos = 0, size_type n = npos);
+V     iterator erase(iterator position);
+V     iterator erase(iterator first, iterator last);
+V     basic_string& replace(size_type pos1, size_type n1,
+                            const basic_string& str);
+V     basic_string& replace(size_type pos1, size_type n1,
+                            const basic_string& str,
+                            size_type pos2, size_type n2);
+V     basic_string& replace(size_type pos, size_type n1, const charT* s,
+                            size_type n2);
+V     basic_string& replace(size_type pos, size_type n1, const charT* s);
+V     basic_string& replace(size_type pos, size_type n1, size_type n2,
+                            charT c);
+V     basic_string& replace(iterator i1, iterator i2, const basic_string& str);
+V     basic_string& replace(iterator i1, iterator i2, const charT* s,
+                            size_type n);
+V     basic_string& replace(iterator i1, iterator i2, const charT* s);
+V     basic_string& replace(iterator i1, iterator i2,
+                            size_type n, charT c);
+V     template
+        basic_string& replace(iterator i1, iterator i2,
+                              InputIterator j1, InputIterator j2);
+V     size_type copy(charT* s, size_type n, size_type pos = 0) const;
+V     void swap(basic_string&);
+      // _lib.string.ops_ string operations:
+V     const charT* c_str() const;         // explicit
+V     const charT* data() const;
+V     allocator_type get_allocator() const;
+V     size_type find (const basic_string& str, size_type pos = 0) const;
+V     size_type find (const charT* s, size_type pos, size_type n) const;
+V     size_type find (const charT* s, size_type pos = 0) const;
+V     size_type find (charT c, size_type pos = 0) const;
+V     size_type rfind(const basic_string& str, size_type pos = npos) const;
+V     size_type rfind(const charT* s, size_type pos, size_type n) const;
+V     size_type rfind(const charT* s, size_type pos = npos) const;
+V     size_type rfind(charT c, size_type pos = npos) const;
+
+V     size_type find_first_of(const basic_string& str,
+                              size_type pos = 0) const;
+V     size_type find_first_of(const charT* s,
+                              size_type pos, size_type n) const;
+V     size_type find_first_of(const charT* s, size_type pos = 0) const;
+V     size_type find_first_of(charT c, size_type pos = 0) const;
+V     size_type find_last_of (const basic_string& str,
+                              size_type pos = npos) const;
+V     size_type find_last_of (const charT* s,
+                              size_type pos, size_type n) const;
+V     size_type find_last_of (const charT* s, size_type pos = npos) const;
+V     size_type find_last_of (charT c, size_type pos = npos) const;
+V     size_type find_first_not_of(const basic_string& str,
+                                  size_type pos = 0) const;
+V     size_type find_first_not_of(const charT* s, size_type pos,
+                                  size_type n) const;
+V     size_type find_first_not_of(const charT* s, size_type pos = 0) const;
+V     size_type find_first_not_of(charT c, size_type pos = 0) const;
+V     size_type find_last_not_of (const basic_string& str,
+                                  size_type pos = npos) const;
+V     size_type find_last_not_of (const charT* s, size_type pos,
+                                  size_type n) const;
+V     size_type find_last_not_of (const charT* s,
+                                  size_type pos = npos) const;
+V     size_type find_last_not_of (charT c, size_type pos = npos) const;
+V     basic_string substr(size_type pos = 0, size_type n = npos) const;
+V     int compare(const basic_string& str) const;
+V     int compare(size_type pos1, size_type n1,
+                  const basic_string& str) const;
+V     int compare(size_type pos1, size_type n1,
+                  const basic_string& str,
+                  size_type pos2, size_type n2) const;
+V     int compare(const charT* s) const;
+V     int compare(size_type pos1, size_type n1,
+                  const charT* s, size_type n2 = npos) const;
+    };
+   }
+
+   21.4  Null-terminated sequence utilities               [lib.c.strings]
+
+                    Table 10--Header  synopsis
+
+            isalnum   isdigit   isprint   isupper    tolower
+X           isalpha   isgraph   ispunct   isxdigit   toupper
+            iscntrl   islower   isspace
+
+                   Table 11--Header  synopsis
+
+X  Macro:     WEOF 
+X  Types:     wctrans_t   wctype_t   wint_t 
+   Functions:
+X  iswalnum   iswctype    iswlower   iswspace    towctrans   wctrans
+X  iswalpha   iswdigit    iswprint   iswupper    towlower    wctype
+X  iswcntrl   iswgraph    iswpunct   iswxdigit   towupper
+
+                   Table 12--Header  synopsis
+
+X           Macro:    NULL 
+X           Type:     size_t 
+            Functions:
+X           memchr    strcat    strcspn    strncpy   strtok
+X           memcmp    strchr    strerror   strpbrk   strxfrm
+X           memcpy    strcmp    strlen     strrchr
+X           memmove   strcoll   strncat    strspn
+X           memset    strcpy    strncmp    strstr
+
+                    Table 13--Header  synopsis
+   Macros:    NULL    WCHAR_MAX         WCHAR_MIN   WEOF 
+   Types:     mbstate_t       wint_t    size_t
+   Functions:
+X  btowc      getwchar        ungetwc           wcscpy      wcsrtombs   wmemchr
+X  fgetwc     mbrlen          vfwprintf         wcscspn     wcsspn      wmemcmp
+X  fgetws     mbrtowc         vswprintf         wcsftime    wcsstr      wmemcpy
+X  fputwc     mbsinit         vwprintf          wcslen      wcstod      wmemmove
+X  fputws     mbsrtowcs       wcrtomb           wcsncat     wcstok      wmemset
+X  fwide      putwc           wcscat            wcsncmp     wcstol      wprintf
+X  fwprintf   putwchar        wcschr            wcsncpy     wcstoul     wscanf
+X  fwscanf    swprintf        wcscmp            wcspbrk     wcsxfrm
+X  getwc      swscanf         wcscoll           wcsrchr     wctob
+
+                   Table 14--Header  synopsis
+
+               Macros:   MB_CUR_MAX
+               Functions:
+X              atol      mblen        strtod    wctomb
+X              atof      mbstowcs     strtol    wcstombs
+X              atoi      mbtowc       strtoul
+
+X  const char* strchr(const char* s, int c);
+X       char* strchr(      char* s, int c);
+
+X  const char* strpbrk(const char* s1, const char* s2);
+X       char* strpbrk(      char* s1, const char* s2);
+
+X  const char* strrchr(const char* s, int c);
+X       char* strrchr(      char* s, int c);
+
+X  const char* strstr(const char* s1, const char* s2);
+X       char* strstr(      char* s1, const char* s2);
+
+X  const void* memchr(const void* s, int c, size_t n);
+X       void* memchr(      void* s, int c, size_t n);
+
+X  const wchar_t* wcschr(const wchar_t* s, wchar_t c);
+X       wchar_t* wcschr(      wchar_t* s, wchar_t c);
+
+X  const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
+X       wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);
+
+X  const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
+X       wchar_t* wcsrchr(      wchar_t* s, wchar_t c);
+
+X  const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
+X       wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);
+
+X  const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
+X       wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);
+
+   [for initial efforts on the above, see shadow/string.h]
+
+   22.1  Locales                                            [lib.locales]
+
+   Header  synopsis
+
+    // _lib.locale_, locale:
+T   class locale;
+T   template  const Facet& use_facet(const locale&);
+T   template  bool         has_facet(const locale&) throw();
+
+    // _lib.locale.convenience_, convenience interfaces:
+T   template  bool isspace (charT c, const locale& loc);
+T   template  bool isprint (charT c, const locale& loc);
+T   template  bool iscntrl (charT c, const locale& loc);
+T   template  bool isupper (charT c, const locale& loc);
+T   template  bool islower (charT c, const locale& loc);
+T   template  bool isalpha (charT c, const locale& loc);
+T   template  bool isdigit (charT c, const locale& loc);
+T   template  bool ispunct (charT c, const locale& loc);
+T   template  bool isxdigit(charT c, const locale& loc);
+T   template  bool isalnum (charT c, const locale& loc);
+T   template  bool isgraph (charT c, const locale& loc);
+T   template  charT toupper(charT c, const locale& loc);
+T   template  charT tolower(charT c, const locale& loc);
+    // _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
+    class ctype_base;
+T   template  class ctype;
+T   template <>            class ctype;             // specialization
+S   template  class ctype_byname;
+S   template <>            class ctype_byname;      // specialization
+T   class codecvt_base;
+X   template  class codecvt;
+S   template  class codecvt_byname;
+    // _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
+X   template   class num_get;
+X   template  class num_put;
+T   template  class numpunct;
+S   template  class numpunct_byname;
+    // _lib.category.collate_, collation:
+T   template  class collate;
+S   template  class collate_byname;
+    // _lib.category.time_, date and time:
+T   class time_base;
+S   template   class time_get;
+S   template   class time_get_byname;
+S   template  class time_put;
+S   template  class time_put_byname;
+    // _lib.category.monetary_, money:
+T   class money_base;
+S   template   class money_get;
+S   template  class money_put;
+S   template  class moneypunct;
+S   template  class moneypunct_byname;
+    // _lib.category.messages_, message retrieval:
+T   class messages_base;
+S   template  class messages;
+S   template  class messages_byname;
+
+
+   22.1.1  Class locale                                      [lib.locale]
+
+X   class locale {
+    public:
+      // types:
+T     class facet;
+T     class id;
+T     typedef int category;
+T     static const category   // values assigned here are for exposition only
+T       none     = 0,
+T       collate  = 0x010, ctype    = 0x020,
+T       monetary = 0x040, numeric  = 0x080,
+T       time     = 0x100, messages = 0x200,
+T       all = collate | ctype | monetary | numeric | time  | messages;
+      // construct/copy/destroy:
+T     locale() throw()
+T     locale(const locale& other) throw()
+X     explicit locale(const char* std_name);
+X     locale(const locale& other, const char* std_name, category);
+T     template  locale(const locale& other, Facet* f);
+T     locale(const locale& other, const locale& one, category);
+T    ~locale() throw();           // non-virtual
+T     const locale& operator=(const locale& other) throw();
+T     template  locale combine(const locale& other) const;
+      // locale operations:
+X     basic_string                  name() const;
+T     bool operator==(const locale& other) const;
+T     bool operator!=(const locale& other) const;
+T     template 
+        bool operator()(const basic_string& s1,
+                        const basic_string& s2) const;
+      // global locale objects:
+T     static       locale  global(const locale&);
+T     static const locale& classic();
+    };
+
+   22.1.1.1  locale types                              [lib.locale.types]
+
+   22.1.1.1.1  Type locale::category                [lib.locale.category]
+
+T  typedef int category;
+
+T   none, collate, ctype, monetary, numeric, time, and messages
+
+      [required locale members]
+T     collate, collate
+T     ctype, ctype
+T     codecvt,
+S     codecvt
+T     moneypunct, moneypunct
+T     moneypunct, moneypunct,
+S     money_get, money_get, money_put
+T     numpunct, numpunct,
+X     num_get, num_get
+X     num_put, num_put
+S     time_get, time_get,
+S     time_put, time_put
+S     messages, messages
+
+      [required instantiations]
+S    collate_byname, collate_byname
+S    ctype_byname, ctype_byname
+S    codecvt_byname,
+S    codecvt_byname
+S    moneypunct_byname,
+S    moneypunct_byname,
+S    money_get,
+S    money_put
+S    numpunct_byname, numpunct_byname
+X    num_get, num_put
+S    time_get,
+S    time_get_byname,
+S    time_get,
+S    time_get_byname,
+S    time_put,
+S    time_put_byname,
+S    time_put
+S    time_put_byname
+S    messages_byname, messages_byname
+
+
+   22.1.1.1.2  Class locale::facet                     [lib.locale.facet]
+
+T   class locale::facet {
+    protected:
+T     explicit facet(size_t refs = 0);
+T     virtual ~facet();
+    private:
+T     facet(const facet&);                // not defined
+T     void operator=(const facet&);       // not defined
+    };
+   }
+
+
+   22.1.1.1.3  Class locale::id                           [lib.locale.id]
+
+T   class locale::id {
+    public:
+T     id();
+    private:
+T     void operator=(const id&);  // not defined
+T     id(const id&);              // not defined
+    };
+   }
+
+
+   22.2.1  The ctype category                        [lib.category.ctype]
+
+T   class ctype_base {
+    public:
+T     enum mask {         // numeric values are for exposition only.
+T       space=, print=, cntrl=, upper=, lower=,
+T       alpha=, digit=, punct=, xdigit=,
+T       alnum=, graph=
+      };
+    };
+
+
+   22.2.1.1  Template class ctype                      [lib.locale.ctype]
+
+T   template 
+    class ctype : public locale::facet, public ctype_base {
+    public:
+T     typedef charT char_type;
+T     explicit ctype(size_t refs = 0);
+T     bool         is(mask m, charT c) const;
+T     const charT* is(const charT* low, const charT* high, mask* vec) const;
+T     const charT* scan_is(mask m,
+                           const charT* low, const charT* high) const;
+T     const charT* scan_not(mask m,
+                            const charT* low, const charT* high) const;
+T     charT        toupper(charT c) const;
+T     const charT* toupper(charT* low, const charT* high) const;
+T     charT        tolower(charT c) const;
+T     const charT* tolower(charT* low, const charT* high) const;
+T     charT        widen(char c) const;
+T     const char*  widen(const char* low, const char* high, charT* to) const;
+T     char         narrow(charT c, char dfault) const;
+T     const charT* narrow(const charT* low, const charT*, char dfault,
+                          char* to) const;
+T     static locale::id id;
+
+    protected:
+T    ~ctype();                    // virtual
+T     virtual bool         do_is(mask m, charT c) const;
+T     virtual const charT* do_is(const charT* low, const charT* high,
+                                 mask* vec) const;
+T     virtual const charT* do_scan_is(mask m,
+                              const charT* low, const charT* high) const;
+T     virtual const charT* do_scan_not(mask m,
+                              const charT* low, const charT* high) const;
+T     virtual charT        do_toupper(charT) const;
+T     virtual const charT* do_toupper(charT* low, const charT* high) const;
+T     virtual charT        do_tolower(charT) const;
+T     virtual const charT* do_tolower(charT* low, const charT* high) const;
+T     virtual charT        do_widen(char) const;
+T     virtual const char*  do_widen(const char* low, const char* high,
+                                    charT* dest) const;
+T     virtual char         do_narrow(charT, char dfault) const;
+T     virtual const charT* do_narrow(const charT* low, const charT* high,
+                                     char dfault, char* dest) const;
+    };
+
+
+   22.2.1.2  Template class ctype_byname        [lib.locale.ctype.byname]
+
+X   template 
+    class ctype_byname : public ctype {
+    public:
+T     typedef ctype::mask mask;
+S     explicit ctype_byname(const char*, size_t refs = 0);
+    protected:
+S    ~ctype_byname();             // virtual
+S     virtual bool         do_is(mask m, charT c) const;
+S     virtual const charT* do_is(const charT* low, const charT* high,
+                                 mask* vec) const;
+S     virtual const char*  do_scan_is(mask m,
+                               const charT* low, const charT* high) const;
+S     virtual const char*  do_scan_not(mask m,
+                               const charT* low, const charT* high) const;
+S     virtual charT        do_toupper(charT) const;
+S     virtual const charT* do_toupper(charT* low, const charT* high) const;
+S     virtual charT        do_tolower(charT) const;
+S     virtual const charT* do_tolower(charT* low, const charT* high) const;
+S     virtual charT        do_widen(char) const;
+S     virtual const char*  do_widen(const char* low, const char* high,
+                                    charT* dest) const;
+S     virtual char         do_narrow(charT, char dfault) const;
+S     virtual const charT* do_narrow(const charT* low, const charT* high,
+                                     char dfault, char* dest) const;
+    };
+
+   22.2.1.3  ctype specializations              [lib.facet.ctype.special]
+
+T   template <> class ctype
+      : public locale::facet, public ctype_base {
+    public:
+T     typedef char char_type;
+T     explicit ctype(const mask* tab = 0, bool del = false,
+                     size_t refs = 0);
+T     bool is(mask m, char c) const;
+T     const char* is(const char* low, const char* high, mask* vec) const;
+T     const char* scan_is (mask m,
+                           const char* low, const char* high) const;
+T     const char* scan_not(mask m,
+                           const char* low, const char* high) const;
+T     char        toupper(char c) const;
+T     const char* toupper(char* low, const char* high) const;
+T     char        tolower(char c) const;
+T     const char* tolower(char* low, const char* high) const;
+T     char  widen(char c) const;
+T     const char* widen(const char* low, const char* high, char* to) const;
+T     char  narrow(char c, char dfault) const;
+T     const char* narrow(const char* low, const char* high, char dfault,
+                         char* to) const;
+T     static locale::id id;
+T     static const size_t table_size = IMPLEMENTATION_DEFINED;
+
+    protected:
+T     const mask* table() const throw();
+T     static const mask* classic_table() throw();
+T    ~ctype();                    // virtual
+T     virtual char        do_toupper(char c) const;
+T     virtual const char* do_toupper(char* low, const char* high) const;
+T     virtual char        do_tolower(char c) const;
+T     virtual const char* do_tolower(char* low, const char* high) const;
+
+T     virtual char        do_widen(char c) const;
+T     virtual const char* do_widen(const char* low,
+                                   const char* high,
+                                   char* to) const;
+T     virtual char        do_narrow(char c, char dfault) const;
+T     virtual const char* do_narrow(const char* low,
+                                    const char* high,
+                                    char dfault, char* to) const;
+    };
+
+
+   22.2.1.4  Class                      [lib.locale.ctype.byname.special]
+       ctype_byname
+
+X   template <> class ctype_byname : public ctype {
+    public:
+S     explicit ctype_byname(const char*, size_t refs = 0);
+    protected:
+S    ~ctype_byname();             // virtual
+S     virtual char        do_toupper(char c) const;
+S     virtual const char* do_toupper(char* low, const char* high) const;
+S     virtual char        do_tolower(char c) const;
+S     virtual const char* do_tolower(char* low, const char* high) const;
+
+S     virtual char        do_widen(char c) const;
+S     virtual const char* do_widen(char* low,
+                                   const char* high,
+                                   char* to) const;
+S     virtual char        do_widen(char c) const;
+S     virtual const char* do_widen(char* low, const char* high) const;
+
+    };
+
+
+
+   22.2.1.5  Template class codecvt                  [lib.locale.codecvt]
+
+T  class codecvt_base {
+   public:
+T   enum result { ok, partial, error, noconv };
+   };
+
+T  template 
+   class codecvt : public locale::facet, public codecvt_base {
+   public:
+T   typedef internT  intern_type;
+T   typedef externT  extern_type;
+T   typedef stateT state_type;
+T   explicit codecvt(size_t refs = 0)
+T   result out(stateT& state,
+     const internT* from, const internT* from_end, const internT*& from_next,
+           externT*   to,       externT* to_limit, externT*& to_next) const;
+T   result unshift(stateT& state,
+           externT*   to,        externT* to_limit, externT*& to_next) const;
+T   result in(stateT& state,
+     const externT* from, const externT* from_end, const externT*& from_next,
+           internT*   to,       internT* to_limit, internT*& to_next) const;
+T   int encoding() const throw();
+T   bool always_noconv() const throw();
+T   int length(const stateT&, const externT* from, const externT* end,
+               size_t max) const;
+T   int max_length() const throw();
+T   static locale::id id;
+
+   protected:
+T   ~codecvt();                   // virtual
+T   virtual result do_out(stateT& state,
+     const internT* from, const internT* from_end, const internT*& from_next,
+           externT* to,         externT* to_limit, externT*& to_next) const;
+T   virtual result do_in(stateT& state,
+T    const externT* from, const externT* from_end, const externT*& from_next,
+           internT* to,         internT* to_limit, internT*& to_next) const;
+T   virtual result do_unshift(stateT& state,
+           externT* to,         externT* to_limit, externT*& to_next) const;
+T   virtual int do_encoding() const throw();
+T   virtual bool do_always_noconv() const throw();
+T   virtual int do_length(const stateT&, const externT* from,
+                          const externT* end, size_t max) const;
+T   virtual int do_max_length() const throw();
+   };
+   }
+
+
+   22.2.1.6  Template class                   [lib.locale.codecvt.byname]
+       codecvt_byname
+
+X  template 
+   class codecvt_byname : public codecvt {
+   public:
+S   explicit codecvt_byname(const char*, size_t refs = 0);
+   protected:
+S  ~codecvt_byname();             // virtual
+S   virtual result do_out(stateT& state,
+      const internT* from, const internT* from_end, const internT*& from_next,
+            externT* to,         externT* to_limit, externT*& to_next) const;
+S   virtual result do_in(stateT& state,
+      const externT* from, const externT* from_end, const externT*& from_next,
+            internT* to,         internT* to_limit, internT*& to_next) const;
+S   virtual result do_unshift(stateT& state,
+            externT* to,         externT* to_limit, externT*& to_next) const;
+S   virtual int do_encoding() const throw();
+S   virtual bool do_always_noconv() const throw();
+S   virtual int do_length(const stateT&, const externT* from,
+                          const externT* end, size_t max) const;
+S   virtual result do_unshift(stateT& state,
+           externT* to, externT* to_limit, externT*& to_next) const;
+S   virtual int do_max_length() const throw();
+    };
+
+
+   22.2.2.1  Template class num_get                  [lib.locale.num.get]
+
+X   template  >
+    class num_get : public locale::facet {
+    public:
+T     typedef charT            char_type;
+T     typedef InputIterator    iter_type;
+T     explicit num_get(size_t refs = 0);
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, bool& v)           const;
+T     iter_type get(iter_type in, iter_type end, ios_base& ,
+                    ios_base::iostate& err, long& v)           const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, unsigned short& v) const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, unsigned int& v)   const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, unsigned long& v)  const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, float& v)          const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, double& v)         const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, long double& v)    const;
+T     iter_type get(iter_type in, iter_type end, ios_base&,
+                    ios_base::iostate& err, void*& v)          const;
+T     static locale::id id;
+
+    protected:
+T    ~num_get();                  // virtual
+T     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, bool& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, long& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, unsigned short& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, unsigned int& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, unsigned long& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, float& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, double& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, long double& v) const;
+S     virtual iter_type do_get(iter_type, iter_type, ios_base&,
+          ios_base::iostate& err, void*& v) const;
+    };
+
+
+
+   22.2.2.2  Template class num_put                   [lib.locale.nm.put]
+
+X   template  >
+    class num_put : public locale::facet {
+    public:
+T     typedef charT            char_type;
+T     typedef OutputIterator   iter_type;
+T     explicit num_put(size_t refs = 0);
+T     iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const;
+T     iter_type put(iter_type s, ios_base& f, char_type fill, long v) const;
+T     iter_type put(iter_type s, ios_base& f, char_type fill,
+                    unsigned long v) const;
+T     iter_type put(iter_type s, ios_base& f, char_type fill,
+                    double v) const;
+T     iter_type put(iter_type s, ios_base& f, char_type fill,
+                    long double v) const;
+T     iter_type put(iter_type s, ios_base& f, char_type fill,
+                    const void* v) const;
+T     static locale::id id;
+    protected:
+T    ~num_put();                  // virtual
+T     virtual iter_type do_put(iter_type, ios_base&, char_type fill,
+                               bool v) const;
+T     virtual iter_type do_put(iter_type, ios_base&, char_type fill,
+                               long v) const;
+T     virtual iter_type do_put(iter_type, ios_base&, char_type fill,
+                               unsigned long) const;
+S     virtual iter_type do_put(iter_type, ios_base&, char_type fill,
+                               double v) const;
+S     virtual iter_type do_put(iter_type, ios_base&, char_type fill,
+                               long double v) const;
+T     virtual iter_type do_put(iter_type, ios_base&, char_type fill,
+                               const void* v) const;
+    };
+   }
+
+   22.2.3.1  Template class numpunct                [lib.locale.numpunct]
+
+T   template 
+    class numpunct : public locale::facet {
+    public:
+T     typedef charT               char_type;
+T     typedef basic_string string_type;
+T     explicit numpunct(size_t refs = 0);
+T     char_type    decimal_point()   const;
+T     char_type    thousands_sep()   const;
+T     string       grouping()        const;
+T     string_type  truename()        const;
+T     string_type  falsename()       const;
+T     static locale::id id;
+    protected:
+T    ~numpunct();                 // virtual
+T     virtual char_type    do_decimal_point() const;
+T     virtual char_type    do_thousands_sep() const;
+T     virtual string       do_grouping()      const;
+T     virtual string_type  do_truename()      const;      // for bool
+T     virtual string_type  do_falsename()     const;      // for bool
+    };
+   }
+
+
+
+   22.2.3.2  Template class                  [lib.locale.numpunct.byname]
+       numpunct_byname
+
+X   template 
+    class numpunct_byname : public numpunct {
+   // this class is specialized for char and wchar_t.
+    public:
+T     typedef charT                char_type;
+T     typedef basic_string  string_type;
+S     explicit numpunct_byname(const char*, size_t refs = 0);
+    protected:
+S    ~numpunct_byname();          // virtual
+S     virtual char_type    do_decimal_point() const;
+S     virtual char_type    do_thousands_sep() const;
+S     virtual string       do_grouping()      const;
+S     virtual string_type  do_truename()      const;      // for bool
+S     virtual string_type  do_falsename()     const;      // for bool
+    };
+
+
+   22.2.4.1  Template class collate                  [lib.locale.collate]
+
+T   template 
+    class collate : public locale::facet {
+    public:
+T     typedef charT               char_type;
+T     typedef basic_string string_type;
+T     explicit collate(size_t refs = 0);
+T     int compare(const charT* low1, const charT* high1,
+                  const charT* low2, const charT* high2) const;
+T     string_type transform(const charT* low, const charT* high) const;
+T     long hash(const charT* low, const charT* high) const;
+T     static locale::id id;
+    protected:
+T    ~collate();                  // virtual
+T     virtual int    do_compare(const charT* low1, const charT* high1,
+                                const charT* low2, const charT* high2) const;
+T     virtual string_type do_transform
+                               (const charT* low, const charT* high) const;
+T     virtual long   do_hash   (const charT* low, const charT* high) const;
+    };
+
+
+   22.2.4.2  Template class                   [lib.locale.collate.byname]
+       collate_byname
+
+X   template 
+    class collate_byname : public collate {
+    public:
+T     typedef basic_string string_type;
+T     explicit collate_byname(const char*, size_t refs = 0);
+    protected:
+S    ~collate_byname();           // virtual
+S     virtual int    do_compare(const charT* low1, const charT* high1,
+                                const charT* low2, const charT* high2) const;
+S     virtual string_type do_transform
+                               (const charT* low, const charT* high) const;
+S     virtual long   do_hash   (const charT* low, const charT* high) const;
+    };
+
+
+   22.2.5.1  Template class time_get                [lib.locale.time.get]
+
+T   class time_base {
+    public:
+T     enum dateorder { no_order, dmy, mdy, ymd, ydm };
+    };
+
+    [Note: semantics of time_get members are implementation-defined.
+     To complete implementation requires documenting behavior.]
+
+X   template  >
+    class time_get : public locale::facet, public time_base {
+    public:
+T     typedef charT            char_type;
+T     typedef InputIterator    iter_type;
+T     explicit time_get(size_t refs = 0);
+
+T     dateorder date_order()  const { return do_date_order(); }
+T     iter_type get_time(iter_type s, iter_type end, ios_base& f,
+                         ios_base::iostate& err, tm* t)  const;
+T     iter_type get_date(iter_type s, iter_type end, ios_base& f,
+                         ios_base::iostate& err, tm* t)  const;
+T     iter_type get_weekday(iter_type s, iter_type end, ios_base& f,
+                            ios_base::iostate& err, tm* t) const;
+T     iter_type get_monthname(iter_type s, iter_type end, ios_base& f,
+                              ios_base::iostate& err, tm* t) const;
+T     iter_type get_year(iter_type s, iter_type end, ios_base& f,
+                         ios_base::iostate& err, tm* t) const;
+T     static locale::id id;
+    protected:
+     ~time_get();                 // virtual
+X     virtual dateorder do_date_order()  const;
+S     virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
+                                    ios_base::iostate& err, tm* t) const;
+S     virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
+                                    ios_base::iostate& err, tm* t) const;
+S     virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
+                                       ios_base::iostate& err, tm* t) const;
+S     virtual iter_type do_get_monthname(iter_type s, ios_base&,
+                                         ios_base::iostate& err, tm* t) const;
+S     virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
+                                    ios_base::iostate& err, tm* t) const;
+    };
+
+
+
+   22.2.5.2  Template class                  [lib.locale.time.get.byname]
+       time_get_byname
+
+X   template  >
+    class time_get_byname : public time_get {
+    public:
+T     typedef time_base::dateorder dateorder;
+T     typedef InputIterator        iter_type
+
+S     explicit time_get_byname(const char*, size_t refs = 0);
+    protected:
+S    ~time_get_byname();          // virtual
+S     virtual dateorder do_date_order()  const;
+S     virtual iter_type do_get_time(iter_type s, iter_type end, ios_base&,
+                                    ios_base::iostate& err, tm* t) const;
+S     virtual iter_type do_get_date(iter_type s, iter_type end, ios_base&,
+                                    ios_base::iostate& err, tm* t) const;
+T     virtual iter_type do_get_weekday(iter_type s, iter_type end, ios_base&,
+                                       ios_base::iostate& err, tm* t) const;
+T     virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&,
+                                         ios_base::iostate& err, tm* t) const;
+S     virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&,
+                                    ios_base::iostate& err, tm* t) const;
+    };
+   }
+
+   22.2.5.3  Template class time_put                [lib.locale.time.put]
+
+X   template  >
+    class time_put : public locale::facet {
+    public:
+T     typedef charT            char_type;
+T     typedef OutputIterator   iter_type;
+T     explicit time_put(size_t refs = 0);
+      // the following is implemented in terms of other member functions.
+S     iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
+                    const charT* pattern, const charT* pat_end) const;
+T     iter_type put(iter_type s, ios_base& f, char_type fill,
+                    const tm* tmb, char format, char modifier = 0) const;
+T     static locale::id id;
+    protected:
+T    ~time_put();                 // virtual
+S     virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
+                               char format, char modifier) const;
+    };
+
+
+
+   22.2.5.4  Template class                  [lib.locale.time.put.byname]
+       time_put_byname
+
+T   template  >
+    class time_put_byname : public time_put
+    {
+    public:
+T     typedef charT          char_type;
+T     typedef OutputIterator iter_type;
+
+T     explicit time_put_byname(const char*, size_t refs = 0);
+    protected:
+T    ~time_put_byname();          // virtual
+S     virtual iter_type do_put(iter_type s, ios_base&, char_type, const tm* t,
+                               char format, char modifier) const;
+    };
+
+
+   22.2.6.1  Template class money_get              [lib.locale.money.get]
+
+X   template  >
+    class money_get : public locale::facet {
+    public:
+T     typedef charT               char_type;
+T     typedef InputIterator       iter_type;
+T     typedef basic_string string_type;
+T     explicit money_get(size_t refs = 0);
+T     iter_type get(iter_type s, iter_type end, bool intl,
+                    ios_base& f, ios_base::iostate& err,
+                    long double& units) const;
+T     iter_type get(iter_type s, iter_type end, bool intl,
+                    ios_base& f, ios_base::iostate& err,
+                    string_type& digits) const;
+T     static locale::id id;
+    protected:
+T    ~money_get();                // virtual
+S     virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
+                       ios_base::iostate& err, long double& units) const;
+S     virtual iter_type do_get(iter_type, iter_type, bool, ios_base&,
+                       ios_base::iostate& err, string_type& digits) const;
+    };
+
+   22.2.6.2  Template class money_put              [lib.locale.money.put]
+
+X   template  >
+    class money_put : public locale::facet {
+    public:
+T     typedef charT               char_type;
+T     typedef OutputIterator      iter_type;
+T     typedef basic_string string_type;
+T     explicit money_put(size_t refs = 0);
+T     iter_type put(iter_type s, bool intl, ios_base& f,
+                    char_type fill, long double units) const;
+T     iter_type put(iter_type s, bool intl, ios_base& f,
+                    char_type fill, const string_type& digits) const;
+T     static locale::id id;
+
+    protected:
+T    ~money_put();                // virtual
+S     virtual iter_type
+        do_put(iter_type, bool, ios_base&, char_type fill,
+               long double units) const;
+S     virtual iter_type
+        do_put(iter_type, bool, ios_base&, char_type fill,
+               const string_type& digits) const;
+    };
+
+
+   22.2.6.3  Template class moneypunct            [lib.locale.moneypunct]
+
+T   class money_base {
+    public:
+T     enum part { none, space, symbol, sign, value };
+T     struct pattern { char field[4]; };
+    };
+
+X   template 
+    class moneypunct : public locale::facet, public money_base {
+    public:
+T     typedef charT char_type;
+T     typedef basic_string string_type;
+T     explicit moneypunct(size_t refs = 0);
+T     charT        decimal_point() const;
+T     charT        thousands_sep() const;
+T     string       grouping()      const;
+T     string_type  curr_symbol()   const;
+T     string_type  positive_sign() const;
+T     string_type  negative_sign() const;
+T     int          frac_digits()   const;
+T     pattern      pos_format()    const;
+T     pattern      neg_format()    const;
+T     static locale::id id;
+T     static const bool intl = International;
+    protected:
+T    ~moneypunct();               // virtual
+S     virtual charT        do_decimal_point() const;
+S     virtual charT        do_thousands_sep() const;
+S     virtual string       do_grouping()      const;
+S     virtual string_type  do_curr_symbol()   const;
+S     virtual string_type  do_positive_sign() const;
+S     virtual string_type  do_negative_sign() const;
+S     virtual int          do_frac_digits()   const;
+T     virtual pattern      do_pos_format()    const;
+T     virtual pattern      do_neg_format()    const;
+    };
+   }
+
+   22.2.6.4  Template class                [lib.locale.moneypunct.byname]
+       moneypunct_byname
+
+X   template 
+    class moneypunct_byname : public moneypunct {
+    public:
+T     typedef money_base::pattern pattern;
+T     typedef basic_string string_type;
+
+T     explicit moneypunct_byname(const char*, size_t refs = 0);
+    protected:
+T    ~moneypunct_byname();        // virtual
+S     virtual charT        do_decimal_point() const;
+S     virtual charT        do_thousands_sep() const;
+S     virtual string       do_grouping()      const;
+S     virtual string_type  do_curr_symbol()   const;
+S     virtual string_type  do_positive_sign() const;
+S     virtual string_type  do_negative_sign() const;
+S     virtual int          do_frac_digits()   const;
+S     virtual pattern      do_pos_format()    const;
+S     virtual pattern      do_neg_format()    const;
+    };
+
+   22.2.7.1  Template class messages                [lib.locale.messages]
+
+T   class messages_base {
+    public:
+T     typedef int catalog;
+    };
+
+X   template 
+    class messages : public locale::facet, public messages_base {
+    public:
+T     typedef charT char_type;
+T     typedef basic_string string_type;
+T     explicit messages(size_t refs = 0);
+T     catalog open(const basic_string& fn, const locale&) const;
+T     string_type  get(catalog c, int set, int msgid,
+                       const string_type& dfault) const;
+T     void    close(catalog c) const;
+T     static locale::id id;
+    protected:
+T    ~messages();                 // virtual
+S     virtual catalog do_open(const basic_string&, const locale&) const;
+S     virtual string_type  do_get(catalog, int set, int msgid,
+                             const string_type& dfault) const;
+S     virtual void    do_close(catalog) const;
+    };
+
+   22.2.7.2  Template class                  [lib.locale.messages.byname]
+       messages_byname
+
+
+X   template 
+    class messages_byname : public messages {
+    public:
+T     typedef messages_base::catalog catalog;
+T     typedef basic_string    string_type;
+
+T     explicit messages_byname(const char*, size_t refs = 0);
+    protected:
+T    ~messages_byname();          // virtual
+S     virtual catalog do_open(const basic_string&, const locale&) const;
+S     virtual string_type  do_get(catalog, int set, int msgid,
+                             const string_type& dfault) const;
+S     virtual void    do_close(catalog) const;
+    };
+
+
+   22.3  C Library Locales                                [lib.c.locales]
+
+
+                   Table 13--Header  synopsis
+            Macros:
+X                        LC_ALL        LC_COLLATE   LC_CTYPE
+X                        LC_MONETARY   LC_NUMERIC   LC_TIME
+X                        NULL
+X           Struct:      lconv
+X           Functions:   localeconv    setlocale
+
+
+   23.2  Sequences                                        [lib.sequences]
+
+   , , , , and .
+
+   Header  synopsis
+
+T   template  > class deque;
+T   template 
+      bool operator==(const deque& x, const deque& y);
+T   template 
+      bool operator< (const deque& x, const deque& y);
+T   template 
+      bool operator!=(const deque& x, const deque& y);
+T   template 
+      bool operator> (const deque& x, const deque& y);
+T   template 
+      bool operator>=(const deque& x, const deque& y);
+T   template 
+      bool operator<=(const deque& x, const deque& y);
+T   template 
+      void swap(deque& x, deque& y);
+   }
+
+   Header  synopsis
+
+T   template  > class list;
+T   template 
+      bool operator==(const list& x, const list& y);
+T   template 
+      bool operator< (const list& x, const list& y);
+T   template 
+      bool operator!=(const list& x, const list& y);
+T   template 
+      bool operator> (const list& x, const list& y);
+T   template 
+      bool operator>=(const list& x, const list& y);
+T   template 
+      bool operator<=(const list& x, const list& y);
+T   template 
+      void swap(list& x, list& y);
+   }
+
+   Header  synopsis
+
+   namespace std {
+T   template  > class queue;
+T   template 
+      bool operator==(const queue& x,
+                      const queue& y);
+T   template 
+      bool operator< (const queue& x,
+                      const queue& y);
+T   template 
+      bool operator!=(const queue& x,
+                      const queue& y);
+T   template 
+      bool operator> (const queue& x,
+                      const queue& y);
+T   template 
+      bool operator>=(const queue& x,
+                      const queue& y);
+T   template 
+      bool operator<=(const queue& x,
+                      const queue& y);
+T   template ,
+              class Compare = less >
+T   class priority_queue;
+   }
+
+   Header  synopsis
+
+   namespace std {
+T   template  > class stack;
+T   template 
+      bool operator==(const stack& x,
+                      const stack& y);
+T   template 
+      bool operator< (const stack& x,
+                      const stack& y);
+T   template 
+      bool operator!=(const stack& x,
+                      const stack& y);
+T   template 
+      bool operator> (const stack& x,
+                      const stack& y);
+T   template 
+      bool operator>=(const stack& x,
+                      const stack& y);
+T   template 
+      bool operator<=(const stack& x,
+                      const stack& y);
+   }
+
+   Header  synopsis
+
+T   template  > class vector;
+
+T   template 
+      bool operator==(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator< (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator!=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator> (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator>=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator<=(const vector& x,
+                      const vector& y);
+T   template 
+      void swap(vector& x, vector& y);
+
+T   template  class vector;
+T   template 
+      bool operator==(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator< (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator!=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator> (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator>=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator<=(const vector& x,
+                      const vector& y);
+T   template 
+      void swap(vector& x, vector& y);
+   }
+
+   23.2.1  Template class deque                               [lib.deque]
+
+    template  >
+T   class deque {
+    public:
+      // types:
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type;
+T     typedef T                                     value_type;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer;
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+      // _lib.deque.cons_ construct/copy/destroy:
+T     explicit deque(const Allocator& = Allocator());
+T     explicit deque(size_type n, const T& value = T(),
+          const Allocator& = Allocator());
+T     template 
+        deque(InputIterator first, InputIterator last,
+              const Allocator& = Allocator());
+T     deque(const deque& x);
+T    ~deque();
+T     deque& operator=(const deque& x);
+T     template 
+        void assign(InputIterator first, InputIterator last);
+T     void assign(size_type n, const T& t);
+T     allocator_type get_allocator() const;
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // _lib.deque.capacity_ capacity:
+T     size_type size() const;
+T     size_type max_size() const;
+T     void      resize(size_type sz, T c = T());
+T     bool      empty() const;
+
+      // element access:
+T     reference       operator[](size_type n);
+T     const_reference operator[](size_type n) const;
+T     reference       at(size_type n);
+T     const_reference at(size_type n) const;
+T     reference       front();
+T     const_reference front() const;
+T     reference       back();
+T     const_reference back() const;
+      // _lib.deque.modifiers_ modifiers:
+T     void push_front(const T& x);
+T     void push_back(const T& x);
+T     iterator insert(iterator position, const T& x);
+T     void     insert(iterator position, size_type n, const T& x);
+T     template 
+        void insert (iterator position,
+                     InputIterator first, InputIterator last);
+T     void pop_front();
+T     void pop_back();
+T     iterator erase(iterator position);
+T     iterator erase(iterator first, iterator last);
+T     void     swap(deque&);
+T     void     clear();
+    };
+T   template 
+      bool operator==(const deque& x,
+                      const deque& y);
+T   template 
+      bool operator< (const deque& x,
+                      const deque& y);
+T   template 
+      bool operator!=(const deque& x,
+                      const deque& y);
+T   template 
+      bool operator> (const deque& x,
+                      const deque& y);
+T   template 
+      bool operator>=(const deque& x,
+                      const deque& y);
+T   template 
+      bool operator<=(const deque& x,
+                      const deque& y);
+    // specialized algorithms:
+T   template 
+      void swap(deque& x, deque& y);
+
+
+   23.2.2  Template class list                                 [lib.list]
+
+T   template  >
+    class list {
+    public:
+      // types:
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type;
+T     typedef T                                     value_type;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer;
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+
+      // _lib.list.cons_ construct/copy/destroy:
+T     explicit list(const Allocator& = Allocator());
+T     explicit list(size_type n, const T& value = T(),
+                    const Allocator& = Allocator());
+T     template 
+        list(InputIterator first, InputIterator last,
+             const Allocator& = Allocator());
+T     list(const list& x);
+T    ~list();
+T     list& operator=(const list& x);
+T     template 
+        void assign(InputIterator first, InputIterator last);
+T     void assign(size_type n, const T& t);
+T     allocator_type get_allocator() const;
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // _lib.list.capacity_ capacity:
+T     bool      empty() const;
+T     size_type size() const;
+T     size_type max_size() const;
+T     void      resize(size_type sz, T c = T());
+      // element access:
+T     reference       front();
+T     const_reference front() const;
+T     reference       back();
+T     const_reference back() const;
+      // _lib.list.modifiers_ modifiers:
+T     void push_front(const T& x);
+T     void pop_front();
+T     void push_back(const T& x);
+T     void pop_back();
+T     iterator insert(iterator position, const T& x);
+T     void     insert(iterator position, size_type n, const T& x);
+T     template 
+        void insert(iterator position, InputIterator first,
+                    InputIterator last);
+T     iterator erase(iterator position);
+T     iterator erase(iterator position, iterator last);
+T     void     swap(list&);
+T     void     clear();
+      // _lib.list.ops_ list operations:
+T     void splice(iterator position, list& x);
+T     void splice(iterator position, list& x, iterator i);
+T     void splice(iterator position, list& x, iterator first,
+                  iterator last);
+T     void remove(const T& value);
+T     template  void remove_if(Predicate pred);
+
+T     void unique();
+T     template 
+        void unique(BinaryPredicate binary_pred);
+T     void merge(list& x);
+T     template  void merge(list& x, Compare comp);
+        void sort();
+T     template  void sort(Compare comp);
+        void reverse();
+    };
+T   template 
+      bool operator==(const list& x, const list& y);
+T   template 
+      bool operator< (const list& x, const list& y);
+T   template 
+      bool operator!=(const list& x, const list& y);
+T   template 
+      bool operator> (const list& x, const list& y);
+T   template 
+      bool operator>=(const list& x, const list& y);
+T   template 
+      bool operator<=(const list& x, const list& y);
+    // specialized algorithms:
+T   template 
+      void swap(list& x, list& y);
+
+
+   23.2.3.1  Template class queue                             [lib.queue]
+
+T   template  >
+    class queue {
+    public:
+T     typedef typename Container::value_type            value_type;
+T     typedef typename Container::size_type             size_type;
+T     typedef          Container                        container_type;
+    protected:
+T     Container c;
+    public:
+T     explicit queue(const Container& = Container());
+
+T     bool      empty() const             { return c.empty(); }
+T     size_type size()  const             { return c.size(); }
+T     value_type&       front()           { return c.front(); }
+T     const value_type& front() const     { return c.front(); }
+T     value_type&       back()            { return c.back(); }
+T     const value_type& back() const      { return c.back(); }
+T     void push(const value_type& x)      { c.push_back(x); }
+T     void pop()                          { c.pop_front(); }
+    };
+
+T   template 
+      bool operator==(const queue& x,
+                      const queue& y);
+T   template 
+      bool operator< (const queue& x,
+                      const queue& y);
+T   template 
+      bool operator!=(const queue& x,
+                      const queue& y);
+T   template 
+      bool operator> (const queue& x,
+                      const queue& y);
+T   template 
+      bool operator>=(const queue& x,
+                      const queue& y);
+T   template 
+      bool operator<=(const queue& x,
+                      const queue& y);
+
+   23.2.3.2  Template class priority_queue           [lib.priority.queue]
+
+T   template ,
+              class Compare = less >
+    class priority_queue {
+    public:
+T     typedef typename Container::value_type            value_type;
+T     typedef typename Container::size_type             size_type;
+T     typedef          Container                        container_type;
+    protected:
+T     Container c;
+T     Compare comp;
+    public:
+T     explicit priority_queue(const Compare& x = Compare(),
+                              const Container& = Container());
+T     template 
+        priority_queue(InputIterator first, InputIterator last,
+                       const Compare& x = Compare(),
+                       const Container& = Container());
+
+T     bool      empty() const       { return c.empty(); }
+T     size_type size()  const       { return c.size(); }
+T     const value_type& top() const { return c.front(); }
+T     void push(const value_type& x);
+T     void pop();
+    };
+
+   23.2.3.3  Template class stack                             [lib.stack]
+
+T   template  >
+    class stack {
+    public:
+T     typedef typename Container::value_type            value_type;
+T     typedef typename Container::size_type             size_type;
+T     typedef          Container                        container_type;
+    protected:
+T     Container c;
+    public:
+T     explicit stack(const Container& = Container());
+
+T     bool      empty() const             { return c.empty(); }
+T     size_type size()  const             { return c.size(); }
+T     value_type&       top()             { return c.back(); }
+T     const value_type& top() const       { return c.back(); }
+T     void push(const value_type& x)      { c.push_back(x); }
+T     void pop()                          { c.pop_back(); }
+    };
+T   template 
+      bool operator==(const stack& x,
+                      const stack& y);
+T   template 
+      bool operator< (const stack& x,
+                      const stack& y);
+T   template 
+      bool operator!=(const stack& x,
+                      const stack& y);
+T   template 
+      bool operator> (const stack& x,
+                      const stack& y);
+T   template 
+      bool operator>=(const stack& x,
+                      const stack& y);
+T   template 
+      bool operator<=(const stack& x,
+                      const stack& y);
+
+   23.2.4  Template class vector                             [lib.vector]
+
+    template  >
+T   class vector {
+    public:
+      // types:
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type;
+T     typedef T                                     value_type;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+      // _lib.vector.cons_ construct/copy/destroy:
+T     explicit vector(const Allocator& = Allocator());
+T     explicit vector(size_type n, const T& value = T(),
+          const Allocator& = Allocator());
+T     template 
+        vector(InputIterator first, InputIterator last,
+          const Allocator& = Allocator());
+T     vector(const vector& x);
+T    ~vector();
+T     vector& operator=(const vector& x);
+T     template 
+        void assign(InputIterator first, InputIterator last);
+T     void assign(size_type n, const T& u);
+T     allocator_type get_allocator() const;
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // _lib.vector.capacity_ capacity:
+T     size_type size() const;
+T     size_type max_size() const;
+T     void      resize(size_type sz, T c = T());
+T     size_type capacity() const;
+T     bool      empty() const;
+T     void      reserve(size_type n);
+
+      // element access:
+T     reference       operator[](size_type n);
+T     const_reference operator[](size_type n) const;
+T     const_reference at(size_type n) const;
+T     reference       at(size_type n);
+T     reference       front();
+T     const_reference front() const;
+T     reference       back();
+T     const_reference back() const;
+      // _lib.vector.modifiers_ modifiers:
+T     void push_back(const T& x);
+T     void pop_back();
+T     iterator insert(iterator position, const T& x);
+T     void     insert(iterator position, size_type n, const T& x);
+T     template 
+          void insert(iterator position,
+                      InputIterator first, InputIterator last);
+T     iterator erase(iterator position);
+T     iterator erase(iterator first, iterator last);
+T     void     swap(vector&);
+T     void     clear();
+    };
+
+T   template 
+      bool operator==(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator< (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator!=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator> (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator>=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator<=(const vector& x,
+                      const vector& y);
+    // specialized algorithms:
+T   template 
+      void swap(vector& x, vector& y);
+
+
+   23.2.5  Class vector                           [lib.vector.bool]
+
+T   template  class vector {
+    public:
+      // types:
+T     typedef bool                                  const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type;
+T     typedef bool                                  value_type;
+T     typedef Allocator                             allocator_type;
+T     typedef implementation defined                pointer;
+T     typedef implementation defined                const_pointer
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+      // bit reference:
+T     class reference {
+       friend class vector;
+T      reference();
+      public:
+T      ~reference();
+T       operator bool() const;
+T       reference& operator=(const bool x);
+T       reference& operator=(const reference& x);
+T       void flip();              // flips the bit
+      };
+
+      // construct/copy/destroy:
+T     explicit vector(const Allocator& = Allocator());
+T     explicit vector(size_type n, const bool& value = bool(),
+                      const Allocator& = Allocator());
+T     template 
+        vector(InputIterator first, InputIterator last,
+          const Allocator& = Allocator());
+T     vector(const vector& x);
+T    ~vector();
+T     vector& operator=(const vector& x);
+T     template 
+        void assign(InputIterator first, InputIterator last);
+T     void assign(size_type n, const T& t);
+T     allocator_type get_allocator() const;
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // capacity:
+T     size_type size() const;
+T     size_type max_size() const;
+T     void      resize(size_type sz, bool c = false);
+T     size_type capacity() const;
+T     bool      empty() const;
+T     void      reserve(size_type n);
+      // element access:
+T     reference       operator[](size_type n);
+T     const_reference operator[](size_type n) const;
+T     const_reference at(size_type n) const;
+T     reference       at(size_type n);
+T     reference       front();
+T     const_reference front() const;
+T     reference       back();
+T     const_reference back() const;
+      // modifiers:
+T     void push_back(const bool& x);
+T     void pop_back();
+T     iterator insert(iterator position, const bool& x);
+T     void     insert (iterator position, size_type n, const bool& x);
+T     template 
+          void insert(iterator position,
+                      InputIterator first, InputIterator last);
+T     iterator erase(iterator position);
+T     iterator erase(iterator first, iterator last);
+T     void swap(vector&);
+T     static void swap(reference x, reference y);
+T     void flip();                // flips all bits
+T     void clear();
+    };
+
+T   template 
+      bool operator==(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator< (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator!=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator> (const vector& x,
+                      const vector& y);
+T   template 
+      bool operator>=(const vector& x,
+                      const vector& y);
+T   template 
+      bool operator<=(const vector& x,
+                      const vector& y);
+    // specialized algorithms:
+T   template 
+      void swap(vector& x, vector& y);
+
+   23.3  Associative containers                         [lib.associative]
+
+  and :
+
+   Header  synopsis
+
+    template ,
+              class Allocator = allocator > >
+T     class map;
+
+T   template 
+      bool operator==(const map& x,
+                      const map& y);
+T   template 
+      bool operator< (const map& x,
+                      const map& y);
+T   template 
+      bool operator!=(const map& x,
+                      const map& y);
+T   template 
+      bool operator> (const map& x,
+                      const map& y);
+T   template 
+      bool operator>=(const map& x,
+                      const map& y);
+T   template 
+      bool operator<=(const map& x,
+                      const map& y);
+T   template 
+      void swap(map& x,
+                map& y);
+T   template ,
+              class Allocator = allocator > >
+      class multimap;
+T   template 
+      bool operator==(const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator< (const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator!=(const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator> (const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator>=(const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator<=(const multimap& x,
+                      const multimap& y);
+T   template 
+      void swap(multimap& x,
+                multimap& y);
+   }
+
+   Header  synopsis
+
+    template ,
+              class Allocator = allocator >
+T     class set;
+
+T   template 
+      bool operator==(const set& x,
+                      const set& y);
+T   template 
+      bool operator< (const set& x,
+                      const set& y);
+T   template 
+      bool operator!=(const set& x,
+                      const set& y);
+T   template 
+      bool operator> (const set& x,
+                      const set& y);
+T   template 
+      bool operator>=(const set& x,
+                      const set& y);
+T   template 
+      bool operator<=(const set& x,
+                      const set& y);
+T   template 
+      void swap(set& x,
+                set& y);
+T   template ,
+              class Allocator = allocator >
+      class multiset;
+T   template 
+      bool operator==(const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator< (const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator!=(const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator> (const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator>=(const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator<=(const multiset& x,
+                      const multiset& y);
+T   template 
+      void swap(multiset& x,
+                multiset& y);
+   }
+
+   23.3.1  Template class map                                   [lib.map]
+
+    template ,
+              class Allocator = allocator > >
+T     class map {
+    public:
+      // types:
+T     typedef Key                                   key_type;
+T     typedef T                                     mapped_type;
+T     typedef pair                    value_type;
+T     typedef Compare                               key_compare;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type;
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer;
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+T     class value_compare
+        : public binary_function {
+      friend class map;
+      protected:
+T       Compare comp;
+T       value_compare(Compare c) : comp(c) {}
+      public:
+T       bool operator()(const value_type& x, const value_type& y) const {
+          return comp(x.first, y.first);
+        }
+      };
+
+      // _lib.map.cons_ construct/copy/destroy:
+T     explicit map(const Compare& comp = Compare(),
+                   const Allocator& = Allocator());
+T     template 
+        map(InputIterator first, InputIterator last,
+            const Compare& comp = Compare(), const Allocator& = Allocator());
+T     map(const map& x);
+T    ~map();
+T     map&
+        operator=(const map& x);
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // capacity:
+T     bool      empty() const;
+T     size_type size() const;
+T     size_type max_size() const;
+      // _lib.map.access_ element access:
+T     T& operator[](const key_type& x);
+      // modifiers:
+T     pair insert(const value_type& x);
+T     iterator             insert(iterator position, const value_type& x);
+T     template 
+        void insert(InputIterator first, InputIterator last);
+T     void      erase(iterator position);
+T     size_type erase(const key_type& x);
+T     void      erase(iterator first, iterator last);
+T     void swap(map&);
+T     void clear();
+      // observers:
+T     key_compare   key_comp() const;
+T     value_compare value_comp() const;
+      // _lib.map.ops_ map operations:
+T     iterator       find(const key_type& x);
+T     const_iterator find(const key_type& x) const;
+T     size_type      count(const key_type& x) const;
+T     iterator       lower_bound(const key_type& x);
+T     const_iterator lower_bound(const key_type& x) const;
+T     iterator       upper_bound(const key_type& x);
+T     const_iterator upper_bound(const key_type& x) const;
+T     pair
+          equal_range(const key_type& x);
+T     pair
+          equal_range(const key_type& x) const;
+    };
+
+T   template 
+      bool operator==(const map& x,
+                      const map& y);
+T   template 
+      bool operator< (const map& x,
+                      const map& y);
+T   template 
+      bool operator!=(const map& x,
+                      const map& y);
+T   template 
+      bool operator> (const map& x,
+                      const map& y);
+T   template 
+      bool operator>=(const map& x,
+                      const map& y);
+T   template 
+      bool operator<=(const map& x,
+                      const map& y);
+    // specialized algorithms:
+T   template 
+      void swap(map& x,
+                map& y);
+
+   23.3.2  Template class multimap                         [lib.multimap]
+
+    template ,
+              class Allocator = allocator > >
+T   class multimap {
+    public:
+      // types:
+T     typedef Key                                   key_type;
+T     typedef T                                     mapped_type;
+T     typedef pair                     value_type;
+T     typedef Compare                               key_compare;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer;
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+T     class value_compare
+        : public binary_function {
+      friend class multimap;
+      protected:
+T       Compare comp;
+T       value_compare(Compare c) : comp(c) {}
+      public:
+T       bool operator()(const value_type& x, const value_type& y) const {
+          return comp(x.first, y.first);
+        }
+      };
+      // construct/copy/destroy:
+T     explicit multimap(const Compare& comp = Compare(),
+                        const Allocator& = Allocator());
+T     template 
+        multimap(InputIterator first, InputIterator last,
+                 const Compare& comp = Compare(),
+                 const Allocator& = Allocator());
+T     multimap(const multimap& x);
+T    ~multimap();
+T     multimap&
+        operator=(const multimap& x);
+T     allocator_type get_allocator() const;
+
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // capacity:
+T     bool           empty() const;
+T     size_type      size() const;
+T     size_type      max_size() const;
+      // modifiers:
+T     iterator insert(const value_type& x);
+T     iterator insert(iterator position, const value_type& x);
+T     template 
+        void insert(InputIterator first, InputIterator last);
+T     void      erase(iterator position);
+T     size_type erase(const key_type& x);
+T     void      erase(iterator first, iterator last);
+T     void swap(multimap&);
+T     void clear();
+      // observers:
+T     key_compare    key_comp() const;
+T     value_compare  value_comp() const;
+      // map operations:
+T     iterator       find(const key_type& x);
+T     const_iterator find(const key_type& x) const;
+T     size_type      count(const key_type& x) const;
+T     iterator       lower_bound(const key_type& x);
+T     const_iterator lower_bound(const key_type& x) const;
+T     iterator       upper_bound(const key_type& x);
+T     const_iterator upper_bound(const key_type& x) const;
+T     pair             equal_range(const key_type& x);
+T     pair equal_range(const key_type& x) const;
+    };
+
+T   template 
+      bool operator==(const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator< (const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator!=(const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator> (const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator>=(const multimap& x,
+                      const multimap& y);
+T   template 
+      bool operator<=(const multimap& x,
+                      const multimap& y);
+    // specialized algorithms:
+T   template 
+      void swap(multimap& x,
+                multimap& y);
+
+
+   23.3.3  Template class set                                   [lib.set]
+
+    template ,
+              class Allocator = allocator >
+T   class set {
+    public:
+      // types:
+T     typedef Key                                   key_type;
+T     typedef Key                                   value_type;
+T     typedef Compare                               key_compare;
+T     typedef Compare                               value_compare;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type;
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer;
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+      // _lib.set.cons_ construct/copy/destroy:
+T     explicit set(const Compare& comp = Compare(),
+                   const Allocator& = Allocator());
+T     template 
+        set(InputIterator first, InputIterator last,
+            const Compare& comp = Compare(), const Allocator& = Allocator());
+T     set(const set& x);
+T    ~set();
+T     set&
+        operator=(const set& x);
+T     allocator_type get_allocator() const;
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // capacity:
+T     bool          empty() const;
+T     size_type     size() const;
+T     size_type     max_size() const;
+      // modifiers:
+T     pair insert(const value_type& x);
+T     iterator            insert(iterator position, const value_type& x);
+T     template 
+T         void insert(InputIterator first, InputIterator last);
+T     void      erase(iterator position);
+T     size_type erase(const key_type& x);
+T     void      erase(iterator first, iterator last);
+T     void swap(set&);
+T     void clear();
+
+      // observers:
+T     key_compare   key_comp() const;
+T     value_compare value_comp() const;
+      // set operations:
+T     iterator  find(const key_type& x) const;
+T     size_type count(const key_type& x) const;
+T     iterator  lower_bound(const key_type& x) const;
+T     iterator  upper_bound(const key_type& x) const;
+T     pair equal_range(const key_type& x) const;
+    };
+T   template 
+      bool operator==(const set& x,
+                      const set& y);
+T   template 
+      bool operator< (const set& x,
+                      const set& y);
+T   template 
+      bool operator!=(const set& x,
+                      const set& y);
+T   template 
+      bool operator> (const set& x,
+                      const set& y);
+T   template 
+      bool operator>=(const set& x,
+                      const set& y);
+T   template 
+      bool operator<=(const set& x,
+                      const set& y);
+    // specialized algorithms:
+T   template 
+      void swap(set& x,
+                set& y);
+
+   23.3.4  Template class multiset                         [lib.multiset]
+
+    template ,
+              class Allocator = allocator >
+T   class multiset {
+    public:
+      // types:
+T     typedef Key                                   key_type;
+T     typedef Key                                   value_type;
+T     typedef Compare                               key_compare;
+T     typedef Compare                               value_compare;
+T     typedef Allocator                             allocator_type;
+T     typedef typename Allocator::reference         reference;
+T     typedef typename Allocator::const_reference   const_reference;
+T     typedef implementation defined                iterator;
+T     typedef implementation defined                const_iterator;
+T     typedef implementation defined                size_type;
+T     typedef implementation defined                difference_type
+T     typedef typename Allocator::pointer           pointer;
+T     typedef typename Allocator::const_pointer     const_pointer;
+T     typedef std::reverse_iterator       reverse_iterator;
+T     typedef std::reverse_iterator const_reverse_iterator;
+
+      // construct/copy/destroy:
+T     explicit multiset(const Compare& comp = Compare(),
+                        const Allocator& = Allocator());
+T     template 
+        multiset(InputIterator first, InputIterator last,
+                 const Compare& comp = Compare(),
+                 const Allocator& = Allocator());
+T     multiset(const multiset& x);
+T    ~multiset();
+T     multiset&
+          operator=(const multiset& x);
+T     allocator_type get_allocator() const;
+      // iterators:
+T     iterator               begin();
+T     const_iterator         begin() const;
+T     iterator               end();
+T     const_iterator         end() const;
+T     reverse_iterator       rbegin();
+T     const_reverse_iterator rbegin() const;
+T     reverse_iterator       rend();
+T     const_reverse_iterator rend() const;
+      // capacity:
+T     bool          empty() const;
+T     size_type     size() const;
+T     size_type     max_size() const;
+      // modifiers:
+T     iterator insert(const value_type& x);
+T     iterator insert(iterator position, const value_type& x);
+T     template 
+        void insert(InputIterator first, InputIterator last);
+T     void      erase(iterator position);
+T     size_type erase(const key_type& x);
+T     void      erase(iterator first, iterator last);
+T     void swap(multiset&);
+T     void clear();
+      // observers:
+T     key_compare   key_comp() const;
+T     value_compare value_comp() const;
+      // set operations:
+T     iterator  find(const key_type& x) const;
+T     size_type count(const key_type& x) const;
+T     iterator  lower_bound(const key_type& x) const;
+T     iterator  upper_bound(const key_type& x) const;
+T     pair equal_range(const key_type& x) const;
+    };
+
+T   template 
+      bool operator==(const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator< (const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator!=(const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator> (const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator>=(const multiset& x,
+                      const multiset& y);
+T   template 
+      bool operator<=(const multiset& x,
+                      const multiset& y);
+    // specialized algorithms:
+T   template 
+      void swap(multiset& x,
+                multiset& y);
+
+   23.3.5  Template class bitset                    [lib.template.bitset]
+
+   Header  synopsis
+
+T   template  class bitset;
+    // _lib.bitset.operators_ bitset operations:
+T   template 
+      bitset operator&(const bitset&, const bitset&);
+T   template 
+      bitset operator|(const bitset&, const bitset&);
+T   template 
+      bitset operator^(const bitset&, const bitset&);
+T   template 
+      basic_istream&
+      operator>>(basic_istream& is, bitset& x);
+T   template 
+      basic_ostream&
+      operator<<(basic_ostream& os, const bitset& x);
+
+T   template class bitset {
+    public:
+      // bit reference:
+T     class reference {
+        friend class bitset;
+T       reference();
+      public:
+T      ~reference();
+T       reference& operator=(bool x);             // for b[i] = x;
+T       reference& operator=(const reference&);   // for b[i] = b[j];
+T       bool operator~() const;                   // flips the bit
+T       operator bool() const;                    // for x = b[i];
+T       reference& flip();                        // for b[i].flip();
+      };
+
+      // _lib.bitset.cons_ constructors:
+T     bitset();
+T     bitset(unsigned long val);
+T     template
+        explicit bitset(
+          const basic_string& str,
+          typename basic_string::size_type pos = 0,
+          typename basic_string::size_type n =
+            basic_string::npos);
+      // _lib.bitset.members_ bitset operations:
+T     bitset& operator&=(const bitset& rhs);
+T     bitset& operator|=(const bitset& rhs);
+T     bitset& operator^=(const bitset& rhs);
+T     bitset& operator<<=(size_t pos);
+T     bitset& operator>>=(size_t pos);
+T     bitset& set();
+T     bitset& set(size_t pos, int val = true);
+T     bitset& reset();
+T     bitset& reset(size_t pos);
+T     bitset  operator~() const;
+T     bitset& flip();
+T     bitset& flip(size_t pos);
+      // element access:
+T     reference operator[](size_t pos);         // for b[i];
+T     unsigned long  to_ulong() const;
+T     template 
+        basic_string to_string() const;
+T     size_t count() const;
+T     size_t size()  const;
+T     bool operator==(const bitset& rhs) const;
+T     bool operator!=(const bitset& rhs) const;
+T     bool test(size_t pos) const;
+T     bool any() const;
+T     bool none() const;
+T     bitset operator<<(size_t pos) const;
+T     bitset operator>>(size_t pos) const;
+    };
+
+
+
+
+   24.2  Header  synopsis               [lib.iterator.synopsis]
+
+    // _lib.iterator.primitives_, primitives:
+T   template struct iterator_traits;
+T   template struct iterator_traits;
+
+X   template struct iterator;
+T   struct input_iterator_tag {};
+T   struct output_iterator_tag {};
+T   struct forward_iterator_tag: public input_iterator_tag {};
+T   struct bidirectional_iterator_tag: public forward_iterator_tag {};
+T   struct random_access_iterator_tag: public bidirectional_iterator_tag {};
+    // _lib.iterator.operations_, iterator operations:
+T   template 
+      void advance(InputIterator& i, Distance n);
+T   template 
+      typename iterator_traits::difference_type
+      distance(InputIterator first, InputIterator last);
+    // _lib.predef.iterators_, predefined iterators:
+X   template  class reverse_iterator;
+T   template 
+      bool operator==(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator<(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator!=(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator>(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator>=(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator<=(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      typename reverse_iterator::difference_type operator-(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      reverse_iterator
+        operator+(
+          typename reverse_iterator::difference_type n,
+          const reverse_iterator& x);
+
+X   template  class back_insert_iterator;
+T   template 
+      back_insert_iterator back_inserter(Container& x);
+X   template  class front_insert_iterator;
+T   template 
+      front_insert_iterator front_inserter(Container& x);
+X   template  class insert_iterator;
+T   template 
+      insert_iterator inserter(Container& x, Iterator i);
+    // _lib.stream.iterators_, stream iterators:
+X   template ,
+              class Distance = ptrdiff_t>
+      class istream_iterator;
+    template 
+X     bool operator==(const istream_iterator& x,
+                      const istream_iterator& y);
+    template 
+X     bool operator!=(const istream_iterator& x,
+                      const istream_iterator& y);
+X   template  >
+        class ostream_iterator;
+X   template >
+      class istreambuf_iterator;
+X   template 
+      bool operator==(const istreambuf_iterator& a,
+                      const istreambuf_iterator& b);
+X   template 
+      bool operator!=(const istreambuf_iterator& a,
+                      const istreambuf_iterator& b);
+T   template  >
+      class ostreambuf_iterator;
+
+   24.3  Iterator primitives                    [lib.iterator.primitives]
+
+T   template struct iterator_traits {
+T     typedef typename Iterator::difference_type difference_type;
+T     typedef typename Iterator::value_type value_type;
+T     typedef typename Iterator::pointer pointer;
+T     typedef typename Iterator::reference reference;
+T     typedef typename Iterator::iterator_category iterator_category;
+    };
+
+T   template struct iterator_traits {
+T     typedef ptrdiff_t difference_type;
+T     typedef T value_type;
+T     typedef T* pointer;
+T     typedef T& reference;
+T     typedef random_access_iterator_tag iterator_category;
+    };
+
+T   template struct iterator_traits {
+T     typedef ptrdiff_t difference_type;
+T     typedef T value_type;
+T     typedef const T* pointer;
+T     typedef const T& reference;
+T     typedef random_access_iterator_tag iterator_category;
+    };
+
+   24.3.2  Basic iterator                            [lib.iterator.basic]
+
+    template
+X     struct iterator {
+T         typedef T         value_type;
+T         typedef Distance  difference_type;
+T         typedef Pointer   pointer;
+T         typedef Reference reference;
+T         typedef Category  iterator_category;
+    };
+
+   24.3.3  Standard iterator tags                 [lib.std.iterator.tags]
+
+T   struct input_iterator_tag {};
+T   struct output_iterator_tag {};
+T   struct forward_iterator_tag: public input_iterator_tag {};
+T   struct bidirectional_iterator_tag: public forward_iterator_tag {};
+T   struct random_access_iterator_tag: public bidirectional_iterator_tag {};
+
+
+   24.4.1  Reverse iterators                      [lib.reverse.iterators]
+
+    template 
+X   class reverse_iterator : public
+          iterator::iterator_category,
+                   typename iterator_traits::value_type,
+                   typename iterator_traits::difference_type,
+                   typename iterator_traits::pointer,
+                   typename iterator_traits::reference> {
+    protected:
+T     Iterator current;
+    public:
+T     typedef Iterator
+          iterator_type;
+T     typedef typename iterator_traits::difference_type
+          difference_type;
+T     typedef typename iterator_traits::reference
+          reference;
+T     typedef typename iterator_traits::pointer
+          pointer;
+
+T     reverse_iterator();
+T     explicit reverse_iterator(Iterator x);
+T     template  reverse_iterator(const reverse_iterator& u);
+T     Iterator base() const;      // explicit
+T     reference operator*() const;
+T     pointer   operator->() const;
+T     reverse_iterator& operator++();
+T     reverse_iterator  operator++(int);
+T     reverse_iterator& operator--();
+T     reverse_iterator  operator--(int);
+
+T     reverse_iterator  operator+ (difference_type n) const;
+T     reverse_iterator& operator+=(difference_type n);
+T     reverse_iterator  operator- (difference_type n) const;
+T     reverse_iterator& operator-=(difference_type n);
+T     reference operator[](difference_type n) const;
+    };
+T   template 
+      bool operator==(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator<(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator!=(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator>(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator>=(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      bool operator<=(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      typename reverse_iterator::difference_type operator-(
+        const reverse_iterator& x,
+        const reverse_iterator& y);
+T   template 
+      reverse_iterator operator+(
+        typename reverse_iterator::difference_type n,
+        const reverse_iterator& x);
+
+
+   24.4.2.1  Template class                    [lib.back.insert.iterator]
+       back_insert_iterator
+
+    template 
+X   class back_insert_iterator :
+          public iterator {
+    protected:
+T     Container* container;
+    public:
+T     typedef Container container_type;
+T     explicit back_insert_iterator(Container& x);
+T     back_insert_iterator&
+        operator=(typename Container::const_reference value);
+
+T     back_insert_iterator& operator*();
+T     back_insert_iterator& operator++();
+T     back_insert_iterator  operator++(int);
+    };
+T   template 
+      back_insert_iterator back_inserter(Container& x);
+
+
+
+   24.4.2.3  Template class                   [lib.front.insert.iterator]
+       front_insert_iterator
+
+    template 
+X   class front_insert_iterator :
+          public iterator {
+    protected:
+T     Container* container;
+    public:
+T     typedef Container container_type;
+T     explicit front_insert_iterator(Container& x);
+T     front_insert_iterator&
+        operator=(typename Container::const_reference value);
+T     front_insert_iterator& operator*();
+T     front_insert_iterator& operator++();
+T     front_insert_iterator  operator++(int);
+    };
+T   template 
+      front_insert_iterator front_inserter(Container& x);
+
+
+   24.4.2.5  Template class insert_iterator         [lib.insert.iterator]
+
+    template 
+X   class insert_iterator :
+          public iterator {
+    protected:
+T     Container* container;
+T     typename Container::iterator iter;
+    public:
+T     typedef Container container_type;
+T     insert_iterator(Container& x, typename Container::iterator i);
+T     insert_iterator&
+        operator=(typename Container::const_reference value);
+T     insert_iterator& operator*();
+T     insert_iterator& operator++();
+T     insert_iterator& operator++(int);
+    };
+T   template 
+      insert_iterator inserter(Container& x, Iterator i);
+
+   24.5.1  Template class istream_iterator         [lib.istream.iterator]
+
+    template ,
+        class Distance = ptrdiff_t>
+X   class istream_iterator:
+      public iterator {
+    public:
+T     typedef charT char_type
+T     typedef traits traits_type;
+T     typedef basic_istream istream_type;
+T     istream_iterator();
+T     istream_iterator(istream_type& s);
+T     istream_iterator(const istream_iterator& x);
+T    ~istream_iterator();
+
+T     const T& operator*() const;
+T     const T* operator->() const;
+T     istream_iterator& operator++();
+T     istream_iterator  operator++(int);
+    };
+
+T   template 
+      bool operator==(const istream_iterator& x,
+                      const istream_iterator& y);
+T   template 
+      bool operator!=(const istream_iterator& x,
+                      const istream_iterator& y);
+
+
+   24.5.2  Template class ostream_iterator         [lib.ostream.iterator]
+
+    template  >
+X   class ostream_iterator:
+      public iterator {
+    public:
+T     typedef charT char_type;
+T     typedef traits traits_type;
+T     typedef basic_ostream ostream_type;
+T     ostream_iterator(ostream_type& s);
+T     ostream_iterator(ostream_type& s, const charT* delimiter);
+T     ostream_iterator(const ostream_iterator& x);
+T    ~ostream_iterator();
+T     ostream_iterator& operator=(const T& value);
+
+T     ostream_iterator& operator*();
+T     ostream_iterator& operator++();
+T     ostream_iterator& operator++(int);
+    };
+
+
+   24.5.3  Template class                       [lib.istreambuf.iterator]
+       istreambuf_iterator
+
+    template >
+X   class istreambuf_iterator
+       : public iterator {
+    public:
+T     typedef charT                         char_type;
+T     typedef traits                        traits_type;
+T     typedef typename traits::int_type     int_type;
+T     typedef basic_streambuf streambuf_type;
+T     typedef basic_istream   istream_type;
+T     class proxy;                        // exposition only
+T     istreambuf_iterator() throw();
+T     istreambuf_iterator(istream_type& s) throw();
+T     istreambuf_iterator(streambuf_type* s) throw();
+T     istreambuf_iterator(const proxy& p) throw();
+T     charT operator*() const;
+T     istreambuf_iterator& operator++();
+T     proxy operator++(int);
+X     bool equal(istreambuf_iterator& b);
+    };
+
+T   template 
+      bool operator==(const istreambuf_iterator& a,
+                      const istreambuf_iterator& b);
+
+T   template 
+      bool operator!=(const istreambuf_iterator& a,
+                      const istreambuf_iterator& b);
+
+   24.5.3.1  Template class              [lib.istreambuf.iterator::proxy]
+       istreambuf_iterator::proxy
+
+    template  >
+T     class istreambuf_iterator::proxy
+    {
+T     charT keep_;
+T     basic_streambuf* sbuf_;
+T     proxy(charT c,
+            basic_streambuf* sbuf);
+        : keep_(c), sbuf_(sbuf) {}
+    public:
+T     charT operator*() { return keep_; }
+    };
+
+
+
+   24.5.4  Template class                       [lib.ostreambuf.iterator]
+       ostreambuf_iterator
+
+    template  >
+T   class ostreambuf_iterator:
+      public iterator {
+    public:
+T     typedef charT                         char_type;
+T     typedef traits                        traits_type;
+T     typedef basic_streambuf streambuf_type;
+T     typedef basic_ostream   ostream_type;
+    public:
+T     ostreambuf_iterator(ostream_type& s) throw();
+T     ostreambuf_iterator(streambuf_type* s) throw();
+T     ostreambuf_iterator& operator=(charT c);
+T     ostreambuf_iterator& operator*();
+T     ostreambuf_iterator& operator++();
+T     ostreambuf_iterator& operator++(int);
+T     bool failed() const throw();
+    };
+
+
+   Header  synopsis
+
+
+    // _lib.alg.nonmodifying_, non-modifying sequence operations:
+T   template
+      Function for_each(InputIterator first, InputIterator last, Function f);
+T   template
+      InputIterator find(InputIterator first, InputIterator last,
+                         const T& value);
+T   template
+      InputIterator find_if(InputIterator first, InputIterator last,
+                            Predicate pred);
+T   template
+      ForwardIterator1
+        find_end(ForwardIterator1 first1, ForwardIterator1 last1,
+                 ForwardIterator2 first2, ForwardIterator2 last2);
+T   template
+      ForwardIterator1
+        find_end(ForwardIterator1 first1, ForwardIterator1 last1,
+                 ForwardIterator2 first2, ForwardIterator2 last2,
+                 BinaryPredicate pred);
+T   template
+      ForwardIterator1
+        find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
+                      ForwardIterator2 first2, ForwardIterator2 last2);
+T   template
+      ForwardIterator1
+        find_first_of(ForwardIterator1 first1, ForwardIterator1 last1,
+                 ForwardIterator2 first2, ForwardIterator2 last2,
+                 BinaryPredicate pred);
+T   template
+      ForwardIterator adjacent_find(ForwardIterator first,
+                                    ForwardIterator last);
+T   template
+      ForwardIterator adjacent_find(ForwardIterator first,
+          ForwardIterator last, BinaryPredicate pred);
+T   template
+      typename iterator_traits::difference_type
+        count(InputIterator first, InputIterator last, const T& value);
+T   template
+      typename iterator_traits::difference_type
+        count_if(InputIterator first, InputIterator last, Predicate pred);
+T   template
+      pair
+        mismatch(InputIterator1 first1, InputIterator1 last1,
+                 InputIterator2 first2);
+T   template
+      pair
+        mismatch(InputIterator1 first1, InputIterator1 last1,
+                 InputIterator2 first2, BinaryPredicate pred);
+
+T   template
+      bool equal(InputIterator1 first1, InputIterator1 last1,
+                 InputIterator2 first2);
+T   template
+      bool equal(InputIterator1 first1, InputIterator1 last1,
+                 InputIterator2 first2, BinaryPredicate pred);
+T   template
+      ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
+                              ForwardIterator2 first2, ForwardIterator2 last2);
+T   template
+      ForwardIterator1 search(ForwardIterator1 first1, ForwardIterator1 last1,
+                              ForwardIterator2 first2, ForwardIterator2 last2,
+                              BinaryPredicate pred);
+T   template
+      ForwardIterator  search_n(ForwardIterator first, ForwardIterator last,
+                              Size count, const T& value);
+T   template
+      ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
+                              Size count, const T& value,
+                              BinaryPredicate pred);
+    // _lib.alg.modifying.operations_, modifying sequence operations:
+    // _lib.alg.copy_, copy:
+T   template
+      OutputIterator copy(InputIterator first, InputIterator last,
+                          OutputIterator result);
+T   template
+      BidirectionalIterator2
+        copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,
+                      BidirectionalIterator2 result);
+    // _lib.alg.swap_, swap:
+T   template void swap(T& a, T& b);
+T   template
+      ForwardIterator2 swap_ranges(ForwardIterator1 first1,
+          ForwardIterator1 last1, ForwardIterator2 first2);
+T   template
+      void iter_swap(ForwardIterator1 a, ForwardIterator2 b);
+T   template
+      OutputIterator transform(InputIterator first, InputIterator last,
+                               OutputIterator result, UnaryOperation op);
+T   template
+      OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
+                               InputIterator2 first2, OutputIterator result,
+                               BinaryOperation binary_op);
+
+T   template
+      void replace(ForwardIterator first, ForwardIterator last,
+                   const T& old_value, const T& new_value);
+T   template
+      void replace_if(ForwardIterator first, ForwardIterator last,
+                      Predicate pred, const T& new_value);
+T   template
+      OutputIterator replace_copy(InputIterator first, InputIterator last,
+                                  OutputIterator result,
+                                  const T& old_value, const T& new_value);
+T   template
+      OutputIterator replace_copy_if(Iterator first, Iterator last,
+                                     OutputIterator result,
+                                     Predicate pred, const T& new_value);
+T   template
+      void fill(ForwardIterator first, ForwardIterator last, const T& value);
+T   template
+      void fill_n(OutputIterator first, Size n, const T& value);
+T   template
+      void generate(ForwardIterator first, ForwardIterator last, Generator gen);
+T   template
+      void generate_n(OutputIterator first, Size n, Generator gen);
+T   template
+      ForwardIterator remove(ForwardIterator first, ForwardIterator last,
+                             const T& value);
+T   template
+      ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
+                                Predicate pred);
+T   template
+      OutputIterator remove_copy(InputIterator first, InputIterator last,
+                                 OutputIterator result, const T& value);
+T   template
+      OutputIterator remove_copy_if(InputIterator first, InputIterator last,
+                                    OutputIterator result, Predicate pred);
+T   template
+      ForwardIterator unique(ForwardIterator first, ForwardIterator last);
+T   template
+      ForwardIterator unique(ForwardIterator first, ForwardIterator last,
+                             BinaryPredicate pred);
+T   template
+      OutputIterator unique_copy(InputIterator first, InputIterator last,
+                                 OutputIterator result);
+T   template
+      OutputIterator unique_copy(InputIterator first, InputIterator last,
+                                 OutputIterator result, BinaryPredicate pred);
+T   template
+      void reverse(BidirectionalIterator first, BidirectionalIterator last);
+T   template
+      OutputIterator reverse_copy(BidirectionalIterator first,
+                                  BidirectionalIterator last,
+                                  OutputIterator result);
+
+T   template
+      void rotate(ForwardIterator first, ForwardIterator middle,
+                  ForwardIterator last);
+T   template
+      OutputIterator rotate_copy(ForwardIterator first, ForwardIterator middle,
+                                 ForwardIterator last, OutputIterator result);
+T   template
+      void random_shuffle(RandomAccessIterator first,
+                          RandomAccessIterator last);
+T   template
+      void random_shuffle(RandomAccessIterator first,
+                          RandomAccessIterator last,
+                          RandomNumberGenerator& rand);
+    // _lib.alg.partitions_, partitions:
+T   template
+      BidirectionalIterator partition(BidirectionalIterator first,
+                                      BidirectionalIterator last,
+                                      Predicate pred);
+T   template
+      BidirectionalIterator stable_partition(BidirectionalIterator first,
+                                             BidirectionalIterator last,
+                                             Predicate pred);
+    // _lib.alg.sorting_, sorting and related operations:
+    // _lib.alg.sort_, sorting:
+T   template
+      void sort(RandomAccessIterator first, RandomAccessIterator last);
+T   template
+      void sort(RandomAccessIterator first, RandomAccessIterator last,
+                Compare comp);
+T   template
+      void stable_sort(RandomAccessIterator first, RandomAccessIterator last);
+T   template
+      void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
+                       Compare comp);
+T   template
+      void partial_sort(RandomAccessIterator first,
+                        RandomAccessIterator middle,
+                        RandomAccessIterator last);
+T   template
+      void partial_sort(RandomAccessIterator first,
+                        RandomAccessIterator middle,
+                        RandomAccessIterator last, Compare comp);
+T   template
+      RandomAccessIterator
+        partial_sort_copy(InputIterator first, InputIterator last,
+                          RandomAccessIterator result_first,
+                          RandomAccessIterator result_last);
+T   template
+      RandomAccessIterator
+        partial_sort_copy(InputIterator first, InputIterator last,
+                          RandomAccessIterator result_first,
+                          RandomAccessIterator result_last,
+                          Compare comp);
+
+T   template
+      void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
+                       RandomAccessIterator last);
+T   template
+      void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
+                       RandomAccessIterator last, Compare comp);
+    // _lib.alg.binary.search_, binary search:
+T   template
+      ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
+                                  const T& value);
+T   template
+      ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
+                                  const T& value, Compare comp);
+T   template
+      ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
+                                  const T& value);
+T   template
+      ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
+                                  const T& value, Compare comp);
+T   template
+      pair
+        equal_range(ForwardIterator first, ForwardIterator last,
+                    const T& value);
+T   template
+      pair
+        equal_range(ForwardIterator first, ForwardIterator last,
+                    const T& value, Compare comp);
+T   template
+      bool binary_search(ForwardIterator first, ForwardIterator last,
+                         const T& value);
+T   template
+      bool binary_search(ForwardIterator first, ForwardIterator last,
+                         const T& value, Compare comp);
+    // _lib.alg.merge_, merge:
+T   template
+      OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
+                           InputIterator2 first2, InputIterator2 last2,
+                           OutputIterator result);
+T   template
+      OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
+                           InputIterator2 first2, InputIterator2 last2,
+                           OutputIterator result, Compare comp);
+T   template
+      void inplace_merge(BidirectionalIterator first,
+                         BidirectionalIterator middle,
+                         BidirectionalIterator last);
+T   template
+      void inplace_merge(BidirectionalIterator first,
+                         BidirectionalIterator middle,
+                         BidirectionalIterator last, Compare comp);
+
+    // _lib.alg.set.operations_, set operations:
+T   template
+      bool includes(InputIterator1 first1, InputIterator1 last1,
+                    InputIterator2 first2, InputIterator2 last2);
+T   template
+      bool includes(InputIterator1 first1, InputIterator1 last1,
+                    InputIterator2 first2, InputIterator2 last2, Compare comp);
+T   template
+      OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
+                               InputIterator2 first2, InputIterator2 last2,
+                               OutputIterator result);
+T   template
+      OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
+                               InputIterator2 first2, InputIterator2 last2,
+                               OutputIterator result, Compare comp);
+T   template
+      OutputIterator set_intersection
+          (InputIterator1 first1, InputIterator1 last1,
+           InputIterator2 first2, InputIterator2 last2,
+           OutputIterator result);
+T   template
+      OutputIterator set_intersection
+          (InputIterator1 first1, InputIterator1 last1,
+           InputIterator2 first2, InputIterator2 last2,
+           OutputIterator result, Compare comp);
+T   template
+      OutputIterator set_difference
+          (InputIterator1 first1, InputIterator1 last1,
+           InputIterator2 first2, InputIterator2 last2,
+           OutputIterator result);
+T   template
+      OutputIterator set_difference(InputIterator1 first1, InputIterator1 last1,
+                                    InputIterator2 first2, InputIterator2 last2,
+                                    OutputIterator result, Compare comp);
+T   template
+      OutputIterator
+        set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
+                                 InputIterator2 first2, InputIterator2 last2,
+                                 OutputIterator result);
+T   template
+      OutputIterator
+        set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
+                                 InputIterator2 first2, InputIterator2 last2,
+                                 OutputIterator result, Compare comp);
+    // _lib.alg.heap.operations_, heap operations:
+T   template
+      void push_heap(RandomAccessIterator first, RandomAccessIterator last);
+T   template
+      void push_heap(RandomAccessIterator first, RandomAccessIterator last,
+                     Compare comp);
+
+T   template
+      void pop_heap(RandomAccessIterator first, RandomAccessIterator last);
+T   template
+      void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
+                    Compare comp);
+T   template
+      void make_heap(RandomAccessIterator first, RandomAccessIterator last);
+T   template
+      void make_heap(RandomAccessIterator first, RandomAccessIterator last,
+                     Compare comp);
+T   template
+      void sort_heap(RandomAccessIterator first, RandomAccessIterator last);
+T   template
+      void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
+                     Compare comp);
+    // _lib.alg.min.max_, minimum and maximum:
+T   template const T& min(const T& a, const T& b);
+T   template
+      const T& min(const T& a, const T& b, Compare comp);
+T   template const T& max(const T& a, const T& b);
+T   template
+      const T& max(const T& a, const T& b, Compare comp);
+T   template
+      ForwardIterator min_element(ForwardIterator first, ForwardIterator last);
+T   template
+      ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
+                                Compare comp);
+T   template
+      ForwardIterator max_element(ForwardIterator first, ForwardIterator last);
+T   template
+      ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
+                                Compare comp);
+T   template
+      bool lexicographical_compare
+          (InputIterator1 first1, InputIterator1 last1,
+           InputIterator2 first2, InputIterator2 last2);
+T   template
+      bool lexicographical_compare
+          (InputIterator1 first1, InputIterator1 last1,
+           InputIterator2 first2, InputIterator2 last2,
+           Compare comp);
+
+    // _lib.alg.permutation.generators_, permutations
+T   template
+      bool next_permutation(BidirectionalIterator first,
+                            BidirectionalIterator last);
+T   template
+      bool next_permutation(BidirectionalIterator first,
+                            BidirectionalIterator last, Compare comp);
+T   template
+      bool prev_permutation(BidirectionalIterator first,
+                            BidirectionalIterator last);
+T   template
+      bool prev_permutation(BidirectionalIterator first,
+                            BidirectionalIterator last, Compare comp);
+
+
+   25.4  C library algorithms                         [lib.alg.c.library]
+
+   1 Header  (partial, Table 2):
+
+                    Table 2--Header  synopsis
+
+                      Functions:   bsearch   qsort
+
+
+X  extern "C" void *bsearch(const void *key, const void *base,
+                          size_t nmemb, size_t size,
+                          int (*compar)(const void *, const void *));
+X  extern "C++" void *bsearch(const void *key, const void *base,
+                          size_t nmemb, size_t size,
+                          int (*compar)(const void *, const void *));
+
+X  extern "C" void qsort(void* base, size_t nmemb, size_t size,
+                  int (*compar)(const void*, const void*));
+X  extern "C++" void qsort(void* base, size_t nmemb, size_t size,
+                  int (*compar)(const void*, const void*));
+
+
+
+   26.2  Complex numbers                            [lib.complex.numbers]
+
+
+   26.2.1  Header  synopsis               [lib.complex.synopsis]
+
+T   template class complex;
+T   template<> class complex;
+T   template<> class complex;
+T   template<> class complex;
+    // _lib.complex.ops_ operators:
+T   template
+      complex operator+(const complex&, const complex&);
+T   template complex operator+(const complex&, const T&);
+T   template complex operator+(const T&, const complex&);
+T   template complex operator-
+      (const complex&, const complex&);
+T   template complex operator-(const complex&, const T&);
+T   template complex operator-(const T&, const complex&);
+T   template complex operator*
+      (const complex&, const complex&);
+T   template complex operator*(const complex&, const T&);
+T   template complex operator*(const T&, const complex&);
+T   template complex operator/
+      (const complex&, const complex&);
+T   template complex operator/(const complex&, const T&);
+T   template complex operator/(const T&, const complex&);
+T   template complex operator+(const complex&);
+T   template complex operator-(const complex&);
+T   template bool operator==
+      (const complex&, const complex&);
+T   template bool operator==(const complex&, const T&);
+T   template bool operator==(const T&, const complex&);
+T   template bool operator!=(const complex&, const complex&);
+T   template bool operator!=(const complex&, const T&);
+T   template bool operator!=(const T&, const complex&);
+T   template
+      basic_istream&
+      operator>>(basic_istream&, complex&);
+
+T   template
+      basic_ostream&
+      operator<<(basic_ostream&, const complex&);
+    // _lib.complex.value.ops_ values:
+T   template T real(const complex&);
+T   template T imag(const complex&);
+
+T   template T abs(const complex&);
+T   template T arg(const complex&);
+T   template T norm(const complex&);
+T   template complex conj(const complex&);
+T   template complex polar(const T&, const T&);
+    // _lib.complex.transcendentals_ transcendentals:
+T   template complex cos  (const complex&);
+T   template complex cosh (const complex&);
+T   template complex exp  (const complex&);
+T   template complex log  (const complex&);
+T   template complex log10(const complex&);
+T   template complex pow(const complex&, int);
+T   template complex pow(const complex&, const T&);
+T   template complex pow(const complex&, const complex&);
+T   template complex pow(const T&, const complex&);
+T   template complex sin  (const complex&);
+T   template complex sinh (const complex&);
+T   template complex sqrt (const complex&);
+T   template complex tan  (const complex&);
+T   template complex tanh (const complex&);
+   }
+
+   26.2.2  Template class complex                           [lib.complex]
+
+    template
+T   class complex {
+    public:
+T     typedef T value_type;
+
+T     complex(const T& re = T(), const T& im = T());
+T     complex(const complex&);
+T     template complex(const complex&);
+
+T     T real() const;
+T     T imag() const;
+
+T     complex& operator= (const T&);
+T     complex& operator+=(const T&);
+T     complex& operator-=(const T&);
+T     complex& operator*=(const T&);
+T     complex& operator/=(const T&);
+
+T     complex& operator=(const complex&);
+T     template complex& operator= (const complex&);
+T     template complex& operator+=(const complex&);
+T     template complex& operator-=(const complex&);
+T     template complex& operator*=(const complex&);
+T     template complex& operator/=(const complex&);
+    };
+
+T   template complex operator+
+      (const complex&, const complex&);
+T   template complex operator+(const complex&, const T&);
+T   template complex operator+(const T&, const complex&);
+
+T   template complex operator-
+      (const complex&, const complex&);
+T   template complex operator-(const complex&, const T&);
+T   template complex operator-(const T&, const complex&);
+
+T   template complex operator*
+      (const complex&, const complex&);
+T   template complex operator*(const complex&, const T&);
+T   template complex operator*(const T&, const complex&);
+
+T   template complex operator/
+      (const complex&, const complex&);
+T   template complex operator/(const complex&, const T&);
+T   template complex operator/(const T&, const complex&);
+
+T   template complex operator+(const complex&);
+T   template complex operator-(const complex&);
+
+T   template bool operator==(const complex&, const complex&);
+T   template bool operator==(const complex&, const T&);
+T   template bool operator==(const T&, const complex&);
+
+T   template bool operator!=(const complex&, const complex&);
+T   template bool operator!=(const complex&, const T&);
+T   template bool operator!=(const T&, const complex&);
+
+T   template
+      basic_istream&
+      operator>>(basic_istream&, complex&);
+
+T   template
+      basic_ostream&
+      operator<<(basic_ostream&, const complex&);
+
+
+   26.2.3  complex specializations                  [lib.complex.special]
+
+T   template<> class complex {
+    public:
+T     typedef float value_type;
+
+T     complex(float re = 0.0f, float im = 0.0f);
+T     explicit complex(const complex&);
+T     explicit complex(const complex&);
+T     float real() const;
+T     float imag() const;
+
+T     complex& operator= (float);
+T     complex& operator+=(float);
+T     complex& operator-=(float);
+T     complex& operator*=(float);
+T     complex& operator/=(float);
+
+T     complex& operator=(const complex&);
+T     template complex& operator= (const complex&);
+T     template complex& operator+=(const complex&);
+T     template complex& operator-=(const complex&);
+T     template complex& operator*=(const complex&);
+T     template complex& operator/=(const complex&);
+    };
+T   template<> class complex {
+    public:
+T     typedef double value_type;
+
+T     complex(double re = 0.0, double im = 0.0);
+T     complex(const complex&);
+T     explicit complex(const complex&);
+T     double real() const;
+T     double imag() const;
+
+T     complex& operator= (double);
+T     complex& operator+=(double);
+T     complex& operator-=(double);
+T     complex& operator*=(double);
+T     complex& operator/=(double);
+
+T     complex& operator=(const complex&);
+T     template complex& operator= (const complex&);
+T     template complex& operator+=(const complex&);
+T     template complex& operator-=(const complex&);
+T     template complex& operator*=(const complex&);
+T     template complex& operator/=(const complex&);
+    };
+
+T   template<> class complex {
+    public:
+T     typedef long double value_type;
+
+T     complex(long double re = 0.0L, long double im = 0.0L);
+T     complex(const complex&);
+T     complex(const complex&);
+T     long double real() const;
+T     long double imag() const;
+
+T     complex& operator=(const complex&);
+T     complex& operator= (long double);
+T     complex& operator+=(long double);
+T     complex& operator-=(long double);
+T     complex& operator*=(long double);
+T     complex& operator/=(long double);
+
+T     template complex& operator= (const complex&);
+T     template complex& operator+=(const complex&);
+T     template complex& operator-=(const complex&);
+T     template complex& operator*=(const complex&);
+T     template complex& operator/=(const complex&);
+    };
+
+   26.3  Numeric arrays                                    [lib.numarray]
+
+   26.3.1  Header  synopsis             [lib.valarray.synopsis]
+
+T   template class valarray;         // An array of type T
+T   class slice;
+T   template class slice_array;
+T   class gslice;
+T   template class gslice_array;
+T   template class mask_array;       // a masked array
+T   template class indirect_array;   // an indirected array
+
+T   template valarray operator*
+      (const valarray&, const valarray&);
+T   template valarray operator* (const valarray&, const T&);
+T   template valarray operator* (const T&, const valarray&);
+T   template valarray operator/
+      (const valarray&, const valarray&);
+T   template valarray operator/ (const valarray&, const T&);
+T   template valarray operator/ (const T&, const valarray&);
+T   template valarray operator%
+      (const valarray&, const valarray&);
+T   template valarray operator% (const valarray&, const T&);
+T   template valarray operator% (const T&, const valarray&);
+T   template valarray operator+
+      (const valarray&, const valarray&);
+T   template valarray operator+ (const valarray&, const T&);
+T   template valarray operator+ (const T&, const valarray&);
+T   template valarray operator-
+      (const valarray&, const valarray&);
+T   template valarray operator- (const valarray&, const T&);
+T   template valarray operator- (const T&, const valarray&);
+T   template valarray operator^
+      (const valarray&, const valarray&);
+T   template valarray operator^ (const valarray&, const T&);
+T   template valarray operator^ (const T&, const valarray&);
+T   template valarray operator&
+      (const valarray&, const valarray&);
+T   template valarray operator& (const valarray&, const T&);
+T   template valarray operator& (const T&, const valarray&);
+T   template valarray operator|
+      (const valarray&, const valarray&);
+T   template valarray operator| (const valarray&, const T&);
+T   template valarray operator| (const T&, const valarray&);
+T   template valarray operator<<
+      (const valarray&, const valarray&);
+T   template valarray operator<<(const valarray&, const T&);
+T   template valarray operator<<(const T&, const valarray&);
+T   template valarray operator>>
+      (const valarray&, const valarray&);
+T   template valarray operator>>(const valarray&, const T&);
+T   template valarray operator>>(const T&, const valarray&);
+T   template valarray operator&&
+      (const valarray&, const valarray&);
+T   template valarray operator&&(const valarray&, const T&);
+T   template valarray operator&&(const T&, const valarray&);
+T   template valarray operator||
+      (const valarray&, const valarray&);
+T   template valarray operator||(const valarray&, const T&);
+T   template valarray operator||(const T&, const valarray&);
+
+T   template
+      valarray operator==(const valarray&, const valarray&);
+T   template valarray operator==(const valarray&, const T&);
+T   template valarray operator==(const T&, const valarray&);
+T   template
+      valarray operator!=(const valarray&, const valarray&);
+T   template valarray operator!=(const valarray&, const T&);
+T   template valarray operator!=(const T&, const valarray&);
+T   template
+      valarray operator< (const valarray&, const valarray&);
+T   template valarray operator< (const valarray&, const T&);
+T   template valarray operator< (const T&, const valarray&);
+T   template
+      valarray operator> (const valarray&, const valarray&);
+T   template valarray operator> (const valarray&, const T&);
+T   template valarray operator> (const T&, const valarray&);
+T   template
+      valarray operator<=(const valarray&, const valarray&);
+T   template valarray operator<=(const valarray&, const T&);
+T   template valarray operator<=(const T&, const valarray&);
+T   template
+      valarray operator>=(const valarray&, const valarray&);
+T   template valarray operator>=(const valarray&, const T&);
+T   template valarray operator>=(const T&, const valarray&);
+T   template valarray abs  (const valarray&);
+T   template valarray acos (const valarray&);
+T   template valarray asin (const valarray&);
+T   template valarray atan (const valarray&);
+T   template valarray atan2
+      (const valarray&, const valarray&);
+T   template valarray atan2(const valarray&, const T&);
+T   template valarray atan2(const T&, const valarray&);
+T   template valarray cos  (const valarray&);
+T   template valarray cosh (const valarray&);
+T   template valarray exp  (const valarray&);
+T   template valarray log  (const valarray&);
+T   template valarray log10(const valarray&);
+T   template valarray pow(const valarray&, const valarray&);
+T   template valarray pow(const valarray&, const T&);
+T   template valarray pow(const T&, const valarray&);
+T   template valarray sin  (const valarray&);
+T   template valarray sinh (const valarray&);
+T   template valarray sqrt (const valarray&);
+T   template valarray tan  (const valarray&);
+T   template valarray tanh (const valarray&);
+   }
+
+
+   26.3.2  Template class valarray                [lib.template.valarray]
+
+T   template class valarray {
+    public:
+T     typedef T value_type;
+
+      // _lib.valarray.cons_ construct/destroy:
+T     valarray();
+T     explicit valarray(size_t);
+T     valarray(const T&, size_t);
+T     valarray(const T*, size_t);
+T     valarray(const valarray&);
+T     valarray(const slice_array&);
+T     valarray(const gslice_array&);
+T     valarray(const mask_array&);
+T     valarray(const indirect_array&);
+T    ~valarray();
+
+      // _lib.valarray.assign_ assignment:
+T     valarray& operator=(const valarray&);
+T     valarray& operator=(const T&);
+T     valarray& operator=(const slice_array&);
+T     valarray& operator=(const gslice_array&);
+T     valarray& operator=(const mask_array&);
+T     valarray& operator=(const indirect_array&);
+      // _lib.valarray.access_ element access:
+T     T                 operator[](size_t) const;
+T     T&                operator[](size_t);
+      // _lib.valarray.sub_ subset operations:
+T     valarray       operator[](slice) const;
+T     slice_array    operator[](slice);
+T     valarray       operator[](const gslice&) const;
+T     gslice_array   operator[](const gslice&);
+T     valarray       operator[](const valarray&) const;
+T     mask_array     operator[](const valarray&);
+T     valarray       operator[](const valarray&) const;
+T     indirect_array operator[](const valarray&);
+      // _lib.valarray.unary_ unary operators:
+T     valarray operator+() const;
+T     valarray operator-() const;
+T     valarray operator~() const;
+T     valarray operator!() const;
+      // _lib.valarray.cassign_ computed assignment:
+T     valarray& operator*= (const T&);
+T     valarray& operator/= (const T&);
+T     valarray& operator%= (const T&);
+T     valarray& operator+= (const T&);
+T     valarray& operator-= (const T&);
+T     valarray& operator^= (const T&);
+T     valarray& operator&= (const T&);
+T     valarray& operator|= (const T&);
+T     valarray& operator<<=(const T&);
+T     valarray& operator>>=(const T&);
+T     valarray& operator*= (const valarray&);
+T     valarray& operator/= (const valarray&);
+T     valarray& operator%= (const valarray&);
+T     valarray& operator+= (const valarray&);
+T     valarray& operator-= (const valarray&);
+T     valarray& operator^= (const valarray&);
+T     valarray& operator|= (const valarray&);
+T     valarray& operator&= (const valarray&);
+T     valarray& operator<<=(const valarray&);
+T     valarray& operator>>=(const valarray&);
+      // _lib.valarray.members_ member functions:
+T     size_t size() const;
+T     T    sum() const;
+T     T    min() const;
+T     T    max() const;
+
+T     valarray shift (int) const;
+T     valarray cshift(int) const;
+T     valarray apply(T func(T)) const;
+T     valarray apply(T func(const T&)) const;
+T     void resize(size_t sz, T c = T());
+    };
+   }
+
+
+
+   26.3.4  Class slice                                  [lib.class.slice]
+
+T   class slice {
+    public:
+T     slice();
+T     slice(size_t, size_t, size_t);
+
+T     size_t start() const;
+T     size_t size() const;
+T     size_t stride() const;
+    };
+   }
+
+
+
+   26.3.5  Template class slice_array          [lib.template.slice.array]
+
+T   template  class slice_array {
+    public:
+T     typedef T value_type;
+
+T     void operator=  (const valarray&) const;
+T     void operator*= (const valarray&) const;
+T     void operator/= (const valarray&) const;
+T     void operator%= (const valarray&) const;
+T     void operator+= (const valarray&) const;
+T     void operator-= (const valarray&) const;
+T     void operator^= (const valarray&) const;
+T     void operator&= (const valarray&) const;
+T     void operator|= (const valarray&) const;
+T     void operator<<=(const valarray&) const;
+T     void operator>>=(const valarray&) const;
+T     void operator=(const T&);
+T    ~slice_array();
+    private:
+T     slice_array();
+T     slice_array(const slice_array&);
+T     slice_array& operator=(const slice_array&);
+    };
+   }
+
+
+
+   26.3.6  The gslice class                            [lib.class.gslice]
+
+T   class gslice {
+    public:
+T     gslice();
+T     gslice(size_t s, const valarray& l, const valarray& d);
+
+T     size_t           start() const;
+T     valarray size() const;
+T     valarray stride() const;
+    };
+
+
+   26.3.7  Template class gslice_array        [lib.template.gslice.array]
+
+T   template  class gslice_array {
+    public:
+T     typedef T value_type;
+
+T     void operator=  (const valarray&) const;
+T     void operator*= (const valarray&) const;
+T     void operator/= (const valarray&) const;
+T     void operator%= (const valarray&) const;
+T     void operator+= (const valarray&) const;
+T     void operator-= (const valarray&) const;
+T     void operator^= (const valarray&) const;
+T     void operator&= (const valarray&) const;
+T     void operator|= (const valarray&) const;
+T     void operator<<=(const valarray&) const;
+T     void operator>>=(const valarray&) const;
+T     void operator=(const T&);
+T    ~gslice_array();
+    private:
+T     gslice_array();
+T     gslice_array(const gslice_array&);
+T     gslice_array& operator=(const gslice_array&);
+    };
+
+
+   26.3.8  Template class mask_array            [lib.template.mask.array]
+
+T   template  class mask_array {
+    public:
+T     typedef T value_type;
+
+T     void operator=  (const valarray&) const;
+T     void operator*= (const valarray&) const;
+T     void operator/= (const valarray&) const;
+T     void operator%= (const valarray&) const;
+T     void operator+= (const valarray&) const;
+T     void operator-= (const valarray&) const;
+T     void operator^= (const valarray&) const;
+T     void operator&= (const valarray&) const;
+T     void operator|= (const valarray&) const;
+T     void operator<<=(const valarray&) const;
+T     void operator>>=(const valarray&) const;
+T     void operator=(const T&);
+T    ~mask_array();
+    private:
+T     mask_array();
+T     mask_array(const mask_array&);
+T     mask_array& operator=(const mask_array&);
+      //  remainder implementation defined
+    };
+
+
+   26.3.9  Template class                   [lib.template.indirect.array]
+       indirect_array
+
+T   template  class indirect_array {
+    public:
+T     typedef T value_type;
+
+T     void operator=  (const valarray&) const;
+T     void operator*= (const valarray&) const;
+T     void operator/= (const valarray&) const;
+T     void operator%= (const valarray&) const;
+T     void operator+= (const valarray&) const;
+T     void operator-= (const valarray&) const;
+T     void operator^= (const valarray&) const;
+T     void operator&= (const valarray&) const;
+T     void operator|= (const valarray&) const;
+T     void operator<<=(const valarray&) const;
+T     void operator>>=(const valarray&) const;
+T     void operator=(const T&);
+T    ~indirect_array();
+    private:
+T     indirect_array();
+T     indirect_array(const indirect_array&);
+T     indirect_array& operator=(const indirect_array&);
+      //  remainder implementation defined
+    };
+
+   26.4  Generalized numeric operations                 [lib.numeric.ops]
+
+   Header  synopsis
+
+T   template 
+      T accumulate(InputIterator first, InputIterator last, T init);
+
+T   template 
+      T accumulate(InputIterator first, InputIterator last, T init,
+                   BinaryOperation binary_op);
+
+T   template 
+      T inner_product(InputIterator1 first1, InputIterator1 last1,
+                      InputIterator2 first2, T init);
+
+T   template 
+      T inner_product(InputIterator1 first1, InputIterator1 last1,
+                      InputIterator2 first2, T init,
+                      BinaryOperation1 binary_op1,
+                      BinaryOperation2 binary_op2);
+
+T   template 
+      OutputIterator partial_sum(InputIterator first,
+                                 InputIterator last,
+                                 OutputIterator result);
+
+T   template 
+      OutputIterator partial_sum(InputIterator first,
+                                 InputIterator last,
+                                 OutputIterator result,
+                                 BinaryOperation binary_op);
+
+T   template 
+      OutputIterator adjacent_difference(InputIterator first,
+                                         InputIterator last,
+                                         OutputIterator result);
+
+T   template 
+      OutputIterator adjacent_difference(InputIterator first,
+                                         InputIterator last,
+                                         OutputIterator result,
+                                         BinaryOperation binary_op);
+
+
+   26.5  C Library                                           [lib.c.math]
+
+                     Table 2--Header  synopsis
+X               Macro:   HUGE_VAL
+                Functions:
+X               acos     cos        fmod    modf   tan
+X               asin     cosh       frexp   pow    tanh
+X               atan     exp        ldexp   sin
+X               atan2    fabs       log     sinh
+X               ceil     floor      log10   sqrt
+
+                    Table 3--Header  synopsis
+X                     Macros:   RAND_MAX
+X                     Types:    div_t      ldiv_t
+                      Functions:
+X                     abs       labs       srand
+X                     div       ldiv       rand
+
+X  long   abs(long);               // labs()
+X  ldiv_t div(long, long);         // ldiv()
+
+X  float abs  (float);
+X  float acos (float);
+X  float asin (float);
+X  float atan (float);
+X  float atan2(float, float);
+X  float ceil (float);
+X  float cos  (float);
+X  float cosh (float);
+X  float exp  (float);
+X  float fabs (float);
+X  float floor(float);
+X  float fmod (float, float);
+X  float frexp(float, int*);
+X  float ldexp(float, int);
+X  float log  (float);
+X  float log10(float);
+X  float modf (float, float*);
+X  float pow  (float, float);
+X  float pow  (float, int);
+X  float sin  (float);
+X  float sinh (float);
+X  float sqrt (float);
+X  float tan  (float);
+X  float tanh (float);
+
+X  double abs(double);            // fabs()
+X  double pow(double, int);
+
+X  long double abs  (long double);
+X  long double acos (long double);
+X  long double asin (long double);
+X  long double atan (long double);
+X  long double atan2(long double, long double);
+X  long double ceil (long double);
+X  long double cos  (long double);
+X  long double cosh (long double);
+X  long double exp  (long double);
+X  long double fabs (long double);
+X  long double floor(long double);
+X  long double fmod (long double, long double);
+X  long double frexp(long double, int*);
+X  long double ldexp(long double, int);
+X  long double log  (long double);
+X  long double log10(long double);
+X  long double modf (long double, long double*);
+X  long double pow  (long double, long double);
+X  long double pow  (long double, int);
+X  long double sin  (long double);
+X  long double sinh (long double);
+X  long double sqrt (long double);
+X  long double tan  (long double);
+X  long double tanh (long double);
+
+   Header  synopsis
+
+X   template class char_traits;
+X   template<> class char_traits;
+X   template<> class char_traits;
+X   template class allocator;
+X   template  >
+      class basic_ios;
+
+X   template  >
+      class basic_streambuf;
+
+X   template  >
+      class basic_istream;
+
+X   template  >
+      class basic_ostream;
+
+X   template  >
+      class basic_iostream;
+
+X   template ,
+              class Allocator = allocator >
+      class basic_stringbuf;
+
+X   template ,
+              class Allocator = allocator >
+      class basic_istringstream;
+
+X   template ,
+              class Allocator = allocator >
+      class basic_ostringstream;
+
+X   template ,
+              class Allocator = allocator >
+      class basic_stringstream;
+
+X   template  >
+      class basic_filebuf;
+
+X   template  >
+      class basic_ifstream;
+
+X   template  >
+      class basic_ofstream;
+
+X   template  >
+      class basic_fstream;
+X   template  >
+      class istreambuf_iterator;
+
+X   template  >
+      class ostreambuf_iterator;
+X   typedef basic_ios       ios;
+X   typedef basic_ios    wios;
+X   typedef basic_streambuf streambuf;
+X   typedef basic_istream   istream;
+X   typedef basic_ostream   ostream;
+X   typedef basic_iostream  iostream;
+X   typedef basic_stringbuf     stringbuf;
+X   typedef basic_istringstream istringstream;
+X   typedef basic_ostringstream ostringstream;
+X   typedef basic_stringstream  stringstream;
+X   typedef basic_filebuf  filebuf;
+X   typedef basic_ifstream ifstream;
+X   typedef basic_ofstream ofstream;
+X   typedef basic_fstream  fstream;
+X   typedef basic_streambuf wstreambuf;
+X   typedef basic_istream   wistream;
+X   typedef basic_ostream   wostream;
+X   typedef basic_iostream  wiostream;
+X   typedef basic_stringbuf     wstringbuf;
+X   typedef basic_istringstream wistringstream;
+X   typedef basic_ostringstream wostringstream;
+X   typedef basic_stringstream  wstringstream;
+
+X   typedef basic_filebuf  wfilebuf;
+X   typedef basic_ifstream wifstream;
+X   typedef basic_ofstream wofstream;
+X   typedef basic_fstream  wfstream;
+X   template  class fpos;
+X   typedef fpos::state_type>    streampos;
+X   typedef fpos::state_type> wstreampos;
+
+   27.3  Standard iostream objects                 [lib.iostream.objects]
+
+   Header  synopsis
+
+T  [must also include  and ]
+T   extern istream cin;
+T   extern ostream cout;
+T   extern ostream cerr;
+T   extern ostream clog;
+
+T   extern wistream wcin;
+T   extern wostream wcout;
+T   extern wostream wcerr;
+T   extern wostream wclog;
+
+   27.4  Iostreams base classes                      [lib.iostreams.base]
+
+   Header  synopsis
+
+   #include 
+
+T   typedef OFF_T  streamoff;
+T   typedef SZ_T streamsize;
+T   template  class fpos;
+
+    class ios_base;
+    template  >
+      class basic_ios;
+   // _lib.std.ios.manip_, manipulators:
+T   ios_base& boolalpha  (ios_base& str);
+T   ios_base& noboolalpha(ios_base& str);
+T   ios_base& showbase   (ios_base& str);
+T   ios_base& noshowbase (ios_base& str);
+T   ios_base& showpoint  (ios_base& str);
+T   ios_base& noshowpoint(ios_base& str);
+T   ios_base& showpos    (ios_base& str);
+T   ios_base& noshowpos  (ios_base& str);
+T   ios_base& skipws     (ios_base& str);
+T   ios_base& noskipws   (ios_base& str);
+T   ios_base& nouppercase(ios_base& str);
+T   ios_base& uppercase  (ios_base& str);
+M   ios_base& unitbuf    (ios_base& str);
+M   ios_base& nounitbuf  (ios_base& str);
+   // _lib.adjustfield.manip_ adjustfield:
+T   ios_base& internal   (ios_base& str);
+T   ios_base& left       (ios_base& str);
+T   ios_base& right      (ios_base& str);
+   // _lib.basefield.manip_ basefield:
+T   ios_base& dec        (ios_base& str);
+T   ios_base& hex        (ios_base& str);
+T   ios_base& oct        (ios_base& str);
+
+   // _lib.floatfield.manip_ floatfield:
+T   ios_base& fixed      (ios_base& str);
+T   ios_base& scientific (ios_base& str);
+
+
+   27.4.2  Class ios_base                                  [lib.ios.base]
+
+T   class ios_base {
+    public:
+      class failure;
+T     typedef T1 fmtflags;
+T     static const fmtflags boolalpha;
+T     static const fmtflags dec;
+T     static const fmtflags fixed;
+T     static const fmtflags hex;
+T     static const fmtflags internal;
+T     static const fmtflags left;
+T     static const fmtflags oct;
+T     static const fmtflags right;
+T     static const fmtflags scientific;
+T     static const fmtflags showbase;
+T     static const fmtflags showpoint;
+T     static const fmtflags showpos;
+T     static const fmtflags skipws;
+X     static const fmtflags unitbuf;
+T     static const fmtflags uppercase;
+T     static const fmtflags adjustfield;
+T     static const fmtflags basefield;
+T     static const fmtflags floatfield;
+
+      typedef T2 iostate;
+T     static const iostate badbit;
+T     static const iostate eofbit;
+T     static const iostate failbit;
+T     static const iostate goodbit;
+T     typedef T3 openmode;
+T     static const openmode app;
+T     static const openmode ate;
+T     static const openmode binary;
+T     static const openmode in;
+T     static const openmode out;
+T     static const openmode trunc;
+T     typedef T4 seekdir;
+T     static const seekdir beg;
+T     static const seekdir cur;
+T     static const seekdir end;
+T     class Init;
+      // _lib.fmtflags.state_ fmtflags state:
+T     fmtflags flags() const;
+T     fmtflags flags(fmtflags fmtfl);
+T     fmtflags setf(fmtflags fmtfl);
+T     fmtflags setf(fmtflags fmtfl, fmtflags mask);
+T     void unsetf(fmtflags mask);
+T     streamsize precision() const;
+T     streamsize precision(streamsize prec);
+T     streamsize width() const;
+T     streamsize width(streamsize wide);
+      // _lib.ios.base.locales_ locales:
+T     locale imbue(const locale& loc);
+T     locale getloc() const;
+      // _lib.ios.base.storage_ storage:
+T     static int xalloc();
+T     long&  iword(int index);
+T     void*& pword(int index);
+      // destructor
+T     virtual ~ios_base();
+      // _lib.ios.base.callback_ callbacks;
+T     enum event { erase_event, imbue_event, copyfmt_event };
+T     typedef void (*event_callback)(event, ios_base&, int index);
+T     void register_callback(event_call_back fn, int index);
+T     static bool sync_with_stdio(bool sync = true);
+    protected:
+T     ios_base();
+    };
+
+   27.4.2.1.1  Class ios_base::failure                 [lib.ios::failure]
+
+T   class ios_base::failure : public exception {
+    public:
+T     explicit failure(const string& msg);
+T     virtual ~failure();
+T     virtual const char* what() const throw();
+    };
+
+
+   27.4.2.1.6  Class ios_base::Init                       [lib.ios::Init]
+
+T   class ios_base::Init {
+    public:
+T     Init();
+T    ~Init();
+    };
+
+
+   27.4.3  Template class fpos                                 [lib.fpos]
+
+X   template  class fpos {
+    public:
+      // _lib.fpos.members_ Members
+T     stateT state() const;
+T     void state(stateT);
+    private;
+T     stateT st; // exposition only
+    };
+
+
+   27.4.5  Template class basic_ios                             [lib.ios]
+
+    template  >
+X   class basic_ios : public ios_base {
+    public:
+
+      // Types:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+T     operator void*() const
+T     bool operator!() const
+T     iostate rdstate() const;
+T     void clear(iostate state = goodbit);
+T     void setstate(iostate state);
+T     bool good() const;
+T     bool eof()  const;
+T     bool fail() const;
+T     bool bad()  const;
+T     iostate exceptions() const;
+T     void exceptions(iostate except);
+      // _lib.basic.ios.cons_ Constructor/destructor:
+T     explicit basic_ios(basic_streambuf* sb);
+T     virtual ~basic_ios();
+      // _lib.basic.ios.members_ Members:
+T     basic_ostream* tie() const;
+T     basic_ostream* tie(basic_ostream* tiestr);
+T     basic_streambuf* rdbuf() const;
+T     basic_streambuf* rdbuf(basic_streambuf* sb);
+X     basic_ios& copyfmt(const basic_ios& rhs);
+T     char_type fill() const;
+T     char_type fill(char_type ch);
+      // _lib.ios.base.locales_ locales:
+T     locale imbue(const locale& loc);
+X     char     narrow(char_type c, char dfault) const;
+X     char_type widen(char c) const;
+    protected:
+      basic_ios();
+T     void init(basic_streambuf* sb);
+   private:
+T     basic_ios(const basic_ios& );       // not defined
+T     basic_ios& operator=(const basic_ios&);     // not defined
+    };
+
+
+   27.5  Stream buffers                              [lib.stream.buffers]
+
+   Header  synopsis
+
+X   template  >
+      class basic_streambuf;
+T   typedef basic_streambuf     streambuf;
+T   typedef basic_streambuf wstreambuf;
+
+   27.5.2  Template class                                 [lib.streambuf]
+       basic_streambuf
+
+    template  >
+X   class basic_streambuf {
+    public:
+
+      // Types:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+T     virtual ~basic_streambuf();
+      // _lib.streambuf.locales_ locales:
+T     locale   pubimbue(const locale &loc);
+T     locale   getloc() const;
+      // _lib.streambuf.buffer_ buffer and positioning:
+T     basic_streambuf*
+               pubsetbuf(char_type* s, streamsize n);
+T     pos_type pubseekoff(off_type off, ios_base::seekdir way,
+                          ios_base::openmode which =
+                              ios_base::in | ios_base::out);
+T     pos_type pubseekpos(pos_type sp,
+                          ios_base::openmode which =
+                              ios_base::in | ios_base::out);
+T     int      pubsync();
+
+      // Get and put areas:
+      // _lib.streambuf.pub.get_ Get area:
+T     streamsize in_avail();
+T     int_type snextc();
+T     int_type sbumpc();
+T     int_type sgetc();
+T     streamsize sgetn(char_type* s, streamsize n);
+      // _lib.streambuf.pub.pback_ Putback:
+X     int_type sputbackc(char_type c);
+X     int_type sungetc();
+      // _lib.streambuf.pub.put_ Put area:
+T     int_type   sputc(char_type c);
+X     streamsize sputn(const char_type* s, streamsize n);
+    protected:
+T     basic_streambuf();
+      // _lib.streambuf.get.area_ Get area:
+T     char_type* eback() const;
+T     char_type* gptr()  const;
+T     char_type* egptr() const;
+T     void       gbump(int n);
+T     void       setg(char_type* gbeg, char_type* gnext, char_type* gend);
+      // _lib.streambuf.put.area_ Put area:
+T     char_type* pbase() const;
+T     char_type* pptr() const;
+T     char_type* epptr() const;
+T     void       pbump(int n);
+T     void       setp(char_type* pbeg, char_type* pend);
+      // _lib.streambuf.virtuals_ virtual functions:
+      // _lib.streambuf.virt.locales_ Locales:
+T     virtual void imbue(const locale &loc);
+      // _lib.streambuf.virt.buffer_ Buffer management and positioning:
+T     virtual basic_streambuf*
+                       setbuf(char_type* s, streamsize n);
+T     virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+                ios_base::openmode which = ios_base::in | ios_base::out);
+T     virtual pos_type seekpos(pos_type sp,
+                ios_base::openmode which = ios_base::in | ios_base::out);
+T     virtual int      sync();
+      // _lib.streambuf.virt.get_ Get area:
+T     virtual int        showmanyc();
+T     virtual streamsize xsgetn(char_type* s, streamsize n);
+T     virtual int_type   underflow();
+T     virtual int_type   uflow();
+      // _lib.streambuf.virt.pback_ Putback:
+T     virtual int_type   pbackfail(int_type c = traits::eof());
+      // _lib.streambuf.virt.put_ Put area:
+X     virtual streamsize xsputn(const char_type* s, streamsize n);
+T     virtual int_type   overflow (int_type c = traits::eof());
+    };
+
+   27.6  Formatting and manipulators                [lib.iostream.format]
+
+   Header  synopsis
+
+T   template  >
+      class basic_istream;
+T   typedef basic_istream     istream;
+T   typedef basic_istream wistream;
+
+T   template  >
+      class basic_iostream;
+T   typedef basic_iostream    iostream;
+T   typedef basic_iostream wiostream;
+
+X   template 
+      basic_istream& ws(basic_istream& is);
+
+   Header  synopsis
+
+X   template  >
+      class basic_ostream;
+T   typedef basic_ostream     ostream;
+T   typedef basic_ostream wostream;
+
+T   template 
+      basic_ostream& endl(basic_ostream& os);
+T   template 
+      basic_ostream& ends(basic_ostream& os);
+T   template 
+      basic_ostream& flush(basic_ostream& os);
+
+   Header  synopsis
+
+      // Types T1, T2, ... are unspecified implementation types
+T     T1 resetiosflags(ios_base::fmtflags mask);
+T     T2 setiosflags  (ios_base::fmtflags mask);
+T     T3 setbase(int base);
+T     template T4 setfill(charT c);
+T     T5 setprecision(int n);
+T     T6 setw(int n);
+
+
+   27.6.1.1  Template class basic_istream                   [lib.istream]
+
+    template  >
+T   class basic_istream : virtual public basic_ios {
+    public:
+    // Types (inherited from basic_ios (_lib.ios_)):
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.istream.cons_ Constructor/destructor:
+T     explicit basic_istream(basic_streambuf* sb);
+T     virtual ~basic_istream();
+      // _lib.istream::sentry_ Prefix/suffix:
+T     class sentry;
+
+      // _lib.istream.formatted_ Formatted input:
+T     basic_istream& operator>>
+          (basic_istream& (*pf)(basic_istream&))
+T     basic_istream& operator>>
+          (basic_ios& (*pf)(basic_ios&))
+T     basic_istream& operator>>
+          (ios_base& (*pf)(ios_base&))
+S     basic_istream& operator>>(bool& n);
+S     basic_istream& operator>>(short& n);
+S     basic_istream& operator>>(unsigned short& n);
+S     basic_istream& operator>>(int& n);
+S     basic_istream& operator>>(unsigned int& n);
+S     basic_istream& operator>>(long& n);
+S     basic_istream& operator>>(unsigned long& n);
+S     basic_istream& operator>>(float& f);
+S     basic_istream& operator>>(double& f);
+S     basic_istream& operator>>(long double& f);
+S     basic_istream& operator>>(void*& p);
+S     basic_istream& operator>>
+          (basic_streambuf* sb);
+      // _lib.istream.unformatted_ Unformatted input:
+T     streamsize gcount() const;
+S     int_type get();
+S     basic_istream& get(char_type& c);
+S     basic_istream& get(char_type* s, streamsize n);
+S     basic_istream& get(char_type* s, streamsize n,
+                        char_type delim);
+S     basic_istream& get(basic_streambuf& sb);
+S     basic_istream& get(basic_streambuf& sb,
+                        char_type delim);
+S     basic_istream& getline(char_type* s, streamsize n);
+S     basic_istream& getline(char_type* s, streamsize n,
+                        char_type delim);
+S     basic_istream& ignore
+          (streamsize n = 1, int_type delim = traits::eof());
+S     int_type                     peek();
+S     basic_istream& read    (char_type* s, streamsize n);
+S     streamsize                   readsome(char_type* s, streamsize n);
+S     basic_istream& putback(char_type c);
+S     basic_istream& unget();
+S     int sync();
+
+S     pos_type tellg();
+S     basic_istream& seekg(pos_type);
+S     basic_istream& seekg(off_type, ios_base::seekdir);
+    };
+
+    // _lib.istream::extractors_ character extraction templates:
+S   template
+      basic_istream& operator>>(basic_istream&,
+                                              charT&);
+S   template
+      basic_istream& operator>>(basic_istream&,
+                                             unsigned char&);
+S   template
+      basic_istream& operator>>(basic_istream&,
+                                             signed char&);
+
+S   template
+      basic_istream& operator>>(basic_istream&,
+                                              charT*);
+S   template
+      basic_istream& operator>>(basic_istream&,
+                                             unsigned char*);
+S   template
+      basic_istream& operator>>(basic_istream&,
+                                             signed char*);
+
+   27.6.1.1.2  Class basic_istream::sentry          [lib.istream::sentry]
+
+
+    template  >
+S   class basic_istream::sentry {
+      typedef traits traits_type;
+S     bool ok_; // exposition only
+     public:
+S     explicit sentry(basic_istream& is, bool noskipws = false);
+S     ~sentry();
+S     operator bool() const { return ok_; }
+     private:
+T     sentry(const sentry&); //   not defined
+T     sentry& operator=(const sentry&); //   not defined
+    };
+
+
+   27.6.1.5  Template class basic_iostream            [lib.iostreamclass]
+
+    template  >
+T   class basic_iostream :
+      public basic_istream,
+      public basic_ostream {
+    public:
+      // constructor/destructor
+T     explicit basic_iostream(basic_streambuf* sb);
+T     virtual ~basic_iostream();
+    };
+
+
+   27.6.2.1  Template class basic_ostream                   [lib.ostream]
+
+    template  >
+X   class basic_ostream : virtual public basic_ios {
+    public:
+    // Types (inherited from basic_ios (_lib.ios_)):
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.ostream.cons_ Constructor/destructor:
+T     explicit basic_ostream(basic_streambuf* sb);
+T     virtual ~basic_ostream();
+      // _lib.ostream::sentry_ Prefix/suffix:
+T     class sentry;
+      // _lib.ostream.formatted_ Formatted output:
+T     basic_ostream& operator<<
+          (basic_ostream& (*pf)(basic_ostream&));
+T     basic_ostream& operator<<
+          (basic_ios& (*pf)(basic_ios&));
+T     basic_ostream& operator<<
+          (ios_base& (*pf)(ios_base&));
+T     basic_ostream& operator<<(bool n);
+T     basic_ostream& operator<<(short n);
+T     basic_ostream& operator<<(unsigned short n);
+T     basic_ostream& operator<<(int n);
+T     basic_ostream& operator<<(unsigned int n);
+T     basic_ostream& operator<<(long n);
+T     basic_ostream& operator<<(unsigned long n);
+S     basic_ostream& operator<<(float f);
+S     basic_ostream& operator<<(double f);
+S     basic_ostream& operator<<(long double f);
+T     basic_ostream& operator<<(const void* p);
+X     basic_ostream& operator<<
+          (basic_streambuf* sb);
+      // _lib.ostream.unformatted_ Unformatted output:
+T     basic_ostream& put(char_type c);
+T     basic_ostream& write(const char_type* s, streamsize n);
+X     basic_ostream& flush();
+
+      // _lib.ostream.seeks_ seeks:
+S     pos_type tellp();
+S     basic_ostream& seekp(pos_type);
+S     basic_ostream& seekp(off_type, ios_base::seekdir);
+    };
+    // _lib.ostream.inserters.character_ character inserters
+X   template
+    basic_ostream& operator<<(basic_ostream&,
+                                            charT);
+X   template
+    basic_ostream& operator<<(basic_ostream&,
+                                            char);
+    // specialization
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                             char);
+    // signed and unsigned
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                             signed char);
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                             unsigned char)
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                              const charT*);
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                              const char*);
+    // partial specializationss
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                             const char*);
+    //  signed and unsigned
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                             const signed char*);
+X   template
+      basic_ostream& operator<<(basic_ostream&,
+                                             const unsigned char*);
+
+
+   27.6.2.3  Class basic_ostream::sentry            [lib.ostream::sentry]
+
+    template  >
+X   class basic_ostream::sentry {
+      bool ok_; // exposition only
+     public:
+X     explicit sentry(basic_ostream& os);
+X     ~sentry();
+X     operator bool() const { return ok_; }
+     private
+X     sentry(const sentry&); //   not defined
+X     sentry& operator=(const sentry&); //   not defined
+    };
+
+   27.7  String-based streams                        [lib.string.streams]
+
+   Header  synopsis
+
+X   template ,
+                      class Allocator = allocator >
+      class basic_stringbuf;
+
+T   typedef basic_stringbuf     stringbuf;
+T   typedef basic_stringbuf wstringbuf;
+
+    template ,
+                      class Allocator = allocator >
+X     class basic_istringstream;
+
+T   typedef basic_istringstream     istringstream;
+T   typedef basic_istringstream wistringstream;
+
+    template ,
+                      class Allocator = allocator >
+X     class basic_ostringstream;
+T   typedef basic_ostringstream     ostringstream;
+T   typedef basic_ostringstream wostringstream;
+
+    template ,
+                      class Allocator = allocator >
+X     class basic_stringstream;
+T   typedef basic_stringstream     stringstream;
+T   typedef basic_stringstream wstringstream;
+
+   27.7.1  Template class basic_stringbuf                 [lib.stringbuf]
+
+    template ,
+              class Allocator = allocator >
+X   class basic_stringbuf : public basic_streambuf {
+    public:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.stringbuf.cons_ Constructors:
+S     explicit basic_stringbuf(ios_base::openmode which
+                                = ios_base::in | ios_base::out);
+S     explicit basic_stringbuf
+          (const basic_string& str,
+           ios_base::openmode which = ios_base::in | ios_base::out);
+      // _lib.stringbuf.members_ Get and set:
+S     basic_string str() const;
+S     void               str(const basic_string& s);
+
+    protected:
+      // _lib.stringbuf.virtuals_ Overridden virtual functions:
+S     virtual int_type   underflow();
+S     virtual int_type   pbackfail(int_type c = traits::eof());
+S     virtual int_type   overflow (int_type c = traits::eof());
+S     virtual  basic_streambuf* setbuf(charT*, streamsize);
+
+S     virtual pos_type   seekoff(off_type off, ios_base::seekdir way,
+                                 ios_base::openmode which
+                                  = ios_base::in | ios_base::out);
+S     virtual pos_type   seekpos(pos_type sp,
+                                 ios_base::openmode which
+                                  = ios_base::in | ios_base::out);
+    };
+
+
+   27.7.2  Template class basic_istringstream         [lib.istringstream]
+
+    template ,
+              class Allocator = allocator >
+X   class basic_istringstream : public basic_istream {
+    public:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.istringstream.cons_ Constructors:
+S     explicit basic_istringstream(ios_base::openmode which = ios_base::in);
+S     explicit basic_istringstream(
+                         const basic_string& str,
+                         ios_base::openmode which = ios_base::in);
+
+      // _lib.istringstream.members_ Members:
+S     basic_stringbuf* rdbuf() const;
+S     basic_string str() const;
+S     void str(const basic_string& s);
+   private:
+   //  basic_stringbuf sb;   exposition only
+    };
+
+   27.7.3  Class basic_ostringstream                  [lib.ostringstream]
+
+    template ,
+              class Allocator = allocator >
+X   class basic_ostringstream : public basic_ostream {
+    public:
+
+      // Types:
+T     typedef charT            char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+      // _lib.ostringstream.cons_ Constructors/destructor:
+S     explicit basic_ostringstream(ios_base::openmode which = ios_base::out);
+S     explicit basic_ostringstream(
+                           const basic_string& str,
+                           ios_base::openmode which = ios_base::out);
+      // _lib.ostringstream.members_ Members:
+S     basic_stringbuf* rdbuf() const;
+S     basic_string str() const;
+S     void    str(const basic_string& s);
+    };
+
+
+   27.7.4  Template class basic_stringstream           [lib.stringstream]
+
+    template ,
+              class Allocator = allocator >
+X   class basic_stringstream
+      : public basic_iostream {
+    public:
+      // Types
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+      // constructors/destructors
+S     explicit basic_stringstream(
+          ios_base::openmode which = ios_base::out|ios_base::in);
+S     explicit basic_stringstream(
+          const basic_string& str,
+          ios_base::openmode which = ios_base::out|ios_base::in);
+      // Members:
+S     basic_stringbuf* rdbuf() const;
+S     basic_string str() const;
+S     void str(const basic_string& str);
+    };
+
+
+
+   27.8.1  File streams                                    [lib.fstreams]
+
+
+   Header  synopsis
+
+X   template  >
+      class basic_filebuf;
+T   typedef basic_filebuf    filebuf;
+T   typedef basic_filebuf wfilebuf;
+
+X   template  >
+      class basic_ifstream;
+T   typedef basic_ifstream    ifstream;
+T   typedef basic_ifstream wifstream;
+
+X   template  >
+      class basic_ofstream;
+T   typedef basic_ofstream    ofstream;
+T   typedef basic_ofstream wofstream;
+
+X   template  >
+      class basic_fstream;
+T   typedef basic_fstream     fstream;
+T   typedef basic_fstream wfstream;
+
+   27.8.1.1  Template class basic_filebuf                   [lib.filebuf]
+
+    template  >
+X   class basic_filebuf : public basic_streambuf {
+    public:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.filebuf.cons_ Constructors/destructor:
+X     basic_filebuf();
+X     virtual ~basic_filebuf();
+       // _lib.filebuf.members_ Members:
+T     bool is_open() const;
+X     basic_filebuf* open
+          (const char* s, ios_base::openmode mode);
+X     basic_filebuf* close();
+    protected:
+      // _lib.filebuf.virtuals_ Overridden virtual functions:
+X     virtual streamsize showmanyc();
+X     virtual int_type underflow();
+X     virtual int_type uflow();
+X     virtual int_type pbackfail(int_type c = traits::eof());
+X     virtual int_type overflow (int_type c = traits::eof());
+S     virtual basic_streambuf*
+                       setbuf(char_type* s, streamsize n);
+S     virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+                               ios_base::openmode which
+                                 = ios_base::in | ios_base::out);
+S     virtual pos_type seekpos(pos_type sp, ios_base::openmode which
+                                 = ios_base::in | ios_base::out);
+S     virtual int      sync();
+S     virtual void     imbue(const locale& loc);
+    };
+
+
+
+   27.8.1.5  Template class basic_ifstream                 [lib.ifstream]
+
+    template  >
+X   class basic_ifstream : public basic_istream {
+    public:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.ifstream.cons_ Constructors:
+S     basic_ifstream();
+S     explicit basic_ifstream(const char* s,
+                              ios_base::openmode mode = ios_base::in);
+      // _lib.ifstream.members_ Members:
+S     basic_filebuf* rdbuf() const;
+S     bool is_open();
+S     void open(const char* s, ios_base::openmode mode = ios_base::in);
+S     void close();
+    };
+
+
+   27.8.1.8  Template class basic_ofstream                 [lib.ofstream]
+
+    template  >
+X   class basic_ofstream : public basic_ostream {
+    public:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // _lib.ofstream.cons_ Constructors:
+X     basic_ofstream();
+X     explicit basic_ofstream(const char* s,
+                              ios_base::openmode mode
+                                = ios_base::out);
+      // _lib.ofstream.members_ Members:
+X     basic_filebuf* rdbuf() const;
+T     bool is_open();
+X     void open(const char* s, ios_base::openmode mode = ios_base::out);
+X     void close();
+    };
+
+
+   27.8.1.11  Template class basic_fstream                  [lib.fstream]
+
+    template  >
+X   class basic_fstream
+      : public basic_iostream {
+    public:
+T     typedef charT                     char_type;
+T     typedef typename traits::int_type int_type;
+T     typedef typename traits::pos_type pos_type;
+T     typedef typename traits::off_type off_type;
+T     typedef traits                    traits_type;
+      // constructors/destructor
+S     basic_fstream();
+S     explicit basic_fstream(
+          const char* s,
+          ios_base::openmode mode = ios_base::in|ios_base::out);
+
+      // Members:
+S     basic_filebuf* rdbuf() const;
+S     bool is_open();
+S     void open(
+          const char* s,
+          ios_base::openmode mode = ios_base::in|ios_base::out);
+S     void close();
+    };
+
+
+
+   27.8.2  C Library files                                  [lib.c.files]
+
+
+                    Table 13--Header  synopsis
+    Macros:
+X   BUFSIZ         L_tmpnam        SEEK_SET   TMP_MAX
+X   EOF            NULL    stderr     _IOFBF
+X   FILENAME_MAX   SEEK_CUR        stdin      _IOLBF
+X   FOPEN_MAX      SEEK_END        stdout     _IONBF
+
+X   Types:         FILE            fpos_t     size_t 
+    Functions:
+X   clearerr       fgets           fscanf     gets     rewind
+X   fclose         fopen           fseek      perror   scanf     tmpnam
+X   feof           fprintf         fsetpos    printf   setbuf    ungetc
+X   ferror         fputc           ftell      putc     setvbuf   vprintf
+X   fflush         fputs           fwrite     puts     sprintf   vfprintf
+X   fgetc          fread           getc       remove   sscanf    vsprintf
+X   fgetpos        freopen         getchar    putchar  rename    tmpfile
+
+
+
+
+   1.5  Standard C library headers                       [depr.c.headers]
+
+X                  
+                   
+                
+                  
+
+   1.6  Old iostreams members                          [depr.ios.members]
+
+   [Note: these should be #ifdef'd to permit diagnostics if used.]
+   namespace std {
+    class ios_base {
+    public:
+T     typedef T1  io_state;
+T     typedef T2 open_mode;
+T     typedef T3  seek_dir;
+T     typedef OFF_T  streamoff;
+T     typedef OFF_T  streampos;
+      // remainder unchanged
+    };
+   }
+
+   [Note: these should be #ifdef'd to permit diagnostics if used.]
+   namespace std {
+    template >
+    class basic_streambuf {
+    public:
+T     void stossc();
+      // remainder unchanged
+    };
+   }
+
+   8 An implementation may provide  the  following  member  functions  that
+   overload signatures specified in clause _lib.iostreams_:
+
+   [Note: the following overloads should be #ifdef'd to permit
+    diagnostics to be emitted, by default, if used.]
+
+    template class basic_ios {
+    public:
+M     void clear(io_state state);
+M     void setstate(io_state state);
+      // remainder unchanged
+    };
+    class ios_base {
+    public:
+M     void exceptions(io_state);
+      // remainder unchanged
+    };
+    template >
+    class basic_streambuf {
+    public:
+M     pos_type pubseekoff(off_type off, ios_base::seek_dir way,
+                ios_base::open_mode which = ios_base::in | ios_base::out);
+M     pos_type pubseekpos(pos_type sp,
+                ios_base::open_mode which = ios_base::in | ios_base::out);
+      // remainder unchanged
+    };
+    template  >
+    class basic_filebuf : public basic_streambuf {
+    public:
+M     basic_filebuf* open
+          (const char* s, ios_base::open_mode mode);
+      // remainder unchanged
+    };
+    template  >
+    class basic_ifstream : public basic_istream {
+    public:
+M     void open(const char* s, ios_base::open_mode mode = in);
+      // remainder unchanged
+    };
+    template  >
+    class basic_ofstream : public basic_ostream {
+    public:
+M     void open(const char* s, ios_base::open_mode mode = out | trunc);
+      // remainder unchanged
+    };
+   }
+
+
+
+   1.7.1  Class strstreambuf                          [depr.strstreambuf]
+
+   [Note: It should be possible to adopt these components with only
+    minor changes from the 2.8 version of the library.]
+
+M   class strstreambuf : public basic_streambuf {
+    public:
+M     explicit strstreambuf(streamsize alsize_arg = 0);
+M     strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
+M     strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0);
+M     strstreambuf(const char* gnext_arg, streamsize n);
+M     strstreambuf(signed char* gnext_arg, streamsize n,
+                   signed char* pbeg_arg = 0);
+M     strstreambuf(const signed char* gnext_arg, streamsize n);
+M     strstreambuf(unsigned char* gnext_arg, streamsize n,
+                   unsigned char* pbeg_arg = 0);
+M     strstreambuf(const unsigned char* gnext_arg, streamsize n);
+M     virtual ~strstreambuf();
+M     void  freeze(bool freezefl = true);
+M     char* str();
+M     int   pcount();
+    protected:
+M     virtual int_type overflow (int_type c = EOF);
+M     virtual int_type pbackfail(int_type c = EOF);
+M     virtual int_type underflow();
+M     virtual pos_type seekoff(off_type off, ios_base::seekdir way,
+                               ios_base::openmode which
+                                = ios_base::in | ios_base::out);
+M     virtual pos_type seekpos(pos_type sp, ios_base::openmode which
+                                = ios_base::in | ios_base::out);
+M     virtual streambuf* setbuf(char* s, streamsize n);
+   }
+
+   1.7.4  Class strstream                                [depr.strstream]
+
+M   class strstream
+      : public basic_iostream {
+    public:
+      // Types
+M     typedef char                                char_type;
+M     typedef typename char_traits::int_type int_type
+M     typedef typename char_traits::pos_type pos_type;
+M     typedef typename char_traits::off_type off_type;
+      // consturctors/destructor
+M     strstream();
+M     strstream(char* s, int n,
+                ios_base::openmode mode = ios_base::in|ios_base::out);
+M     virtual ~strstream();
+      // Members:
+M     strstreambuf* rdbuf() const;
+M     void freeze(bool freezefl = true);
+M     int pcount() const;
+M     char* str();
+    };
+
+
\ No newline at end of file diff --git a/libstdc++-v3/docs/html/17_intro/concept_check.diff b/libstdc++-v3/docs/html/17_intro/concept_check.diff deleted file mode 100644 index afb17f5e..0000000 --- a/libstdc++-v3/docs/html/17_intro/concept_check.diff +++ /dev/null @@ -1,382 +0,0 @@ - -Changes made while bringing boost/concept_check.hpp to v3's concept_check.h: - -1) File format changed from DOS to Unix. -2) Boost config.hpp and other workaround files dropped (unneeded in g++ v3). -3) Conditionally-compiled code depending on those "breakage" macros was - removed, or not, depending on the macro, so that the macros themselves - are gone. Since the same code would always be compiled, let's make it - easier on the reader and a few milliseconds faster for cpplib. -4) Tests for NDEBUG were removed; if NDEBUG is defined, none of the checking - code will even be included. -5) BOOST_CLASS_REQUIRES* changed to accept a namespace parameter. -6) SameTypeConcept added (simple wrapper around existing code). -7) An unused variable in OutputIteratorConcept was removed. - -At checkin, this was the exact diff, modulo the end-of-line character changes: - - ---- concept_check.hpp.orig Sun Apr 1 08:59:46 2001 -+++ boost_concept_check.h Mon Apr 2 18:56:41 2001 -@@ -5,20 +5,15 @@ - // "as is" without express or implied warranty, and with no claim as - // to its suitability for any purpose. - // -+ -+// GCC Note: based on version 1.12.0 of the Boost library. - #ifndef BOOST_CONCEPT_CHECKS_HPP - #define BOOST_CONCEPT_CHECKS_HPP - --#include --#include --#include --#include --#include -- --#if (__GNUC__) || defined(__KCC) || defined(__ghs) || defined(__MWERKS__) --#define BOOST_FPTR & --#else --#define BOOST_FPTR --#endif -+#pragma GCC system_header -+#include // for traits and tags -+#include // for pair<> -+ - - namespace boost { - -@@ -27,80 +22,64 @@ - template - void function_requires() - { --#if !defined(NDEBUG) -- void (Concept::*x)() = BOOST_FPTR Concept::constraints; -+ void (Concept::*x)() = &Concept::constraints; - ignore_unused_variable_warning(x); --#endif - } - --// The BOOST_CLASS_REQUIRES macros use function pointers as --// template parameters, which VC++ does not support. -- --#if defined(BOOST_NO_FUNCTION_PTR_TEMPLATE_PARAMETERS) -- --#define BOOST_CLASS_REQUIRES(type_var, concept) --#define BOOST_CLASS_REQUIRES2(type_var1, type_var2, concept) --#define BOOST_CLASS_REQUIRES3(type_var1, type_var2, type_var3, concept) --#define BOOST_CLASS_REQUIRES4(type_var1, type_var2, type_var3, type_var4, concept) - --#else -- --#define BOOST_CLASS_REQUIRES(type_var, concept) \ -- typedef void (concept ::* func##type_var##concept)(); \ -+#define BOOST_CLASS_REQUIRES(type_var, ns, concept) \ -+ typedef void (ns::concept ::* func##type_var##concept)(); \ - template \ - struct concept_checking_##type_var##concept { }; \ - typedef concept_checking_##type_var##concept< \ -- BOOST_FPTR concept ::constraints> \ -+ &ns::concept ::constraints> \ - concept_checking_typedef_##type_var##concept - --#define BOOST_CLASS_REQUIRES2(type_var1, type_var2, concept) \ -- typedef void (concept ::* func##type_var1##type_var2##concept)(); \ -+#define BOOST_CLASS_REQUIRES2(type_var1, type_var2, ns, concept) \ -+ typedef void (ns::concept ::* func##type_var1##type_var2##concept)(); \ - template \ - struct concept_checking_##type_var1##type_var2##concept { }; \ - typedef concept_checking_##type_var1##type_var2##concept< \ -- BOOST_FPTR concept ::constraints> \ -+ &ns::concept ::constraints> \ - concept_checking_typedef_##type_var1##type_var2##concept - --#define BOOST_CLASS_REQUIRES3(type_var1, type_var2, type_var3, concept) \ -- typedef void (concept ::* func##type_var1##type_var2##type_var3##concept)(); \ -+#define BOOST_CLASS_REQUIRES3(type_var1, type_var2, type_var3, ns, concept) \ -+ typedef void (ns::concept ::* func##type_var1##type_var2##type_var3##concept)(); \ - template \ - struct concept_checking_##type_var1##type_var2##type_var3##concept { }; \ - typedef concept_checking_##type_var1##type_var2##type_var3##concept< \ -- BOOST_FPTR concept ::constraints> \ -+ &ns::concept ::constraints> \ - concept_checking_typedef_##type_var1##type_var2##type_var3##concept - --#define BOOST_CLASS_REQUIRES4(type_var1, type_var2, type_var3, type_var4, concept) \ -- typedef void (concept ::* func##type_var1##type_var2##type_var3##type_var4##concept)(); \ -+#define BOOST_CLASS_REQUIRES4(type_var1, type_var2, type_var3, type_var4, ns, concept) \ -+ typedef void (ns::concept ::* func##type_var1##type_var2##type_var3##type_var4##concept)(); \ - template \ - struct concept_checking_##type_var1##type_var2##type_var3##type_var4##concept { }; \ - typedef concept_checking_##type_var1##type_var2##type_var3##type_var4##concept< \ -- BOOST_FPTR concept ::constraints> \ -+ &ns::concept ::constraints> \ - concept_checking_typedef_##type_var1##type_var2##type_var3##type_var4##concept - - --#endif -- --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct require_same { }; - - template - struct require_same { typedef T type; }; --#else --// This version does not perform checking, but will not do any harm. --template --struct require_same { typedef T type; }; --#endif -+ -+ template -+ struct SameTypeConcept -+ { -+ void constraints() { -+ typedef typename require_same::type req; -+ } -+ }; - - template - struct IntegerConcept { - void constraints() { --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - errortype_must_be_an_integer_type(); --#endif - } - }; --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template <> struct IntegerConcept { void constraints() {} }; - template <> struct IntegerConcept { void constraints() {} }; - template <> struct IntegerConcept { void constraints() {} }; -@@ -108,32 +87,24 @@ - template <> struct IntegerConcept { void constraints() {} }; - template <> struct IntegerConcept { void constraints() {} }; - // etc. --#endif - - template - struct SignedIntegerConcept { - void constraints() { --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - errortype_must_be_a_signed_integer_type(); --#endif - } - }; --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template <> struct SignedIntegerConcept { void constraints() {} }; - template <> struct SignedIntegerConcept { void constraints() {} }; - template <> struct SignedIntegerConcept { void constraints() {} }; - // etc. --#endif - - template - struct UnsignedIntegerConcept { - void constraints() { --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - errortype_must_be_an_unsigned_integer_type(); --#endif - } - }; --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template <> struct UnsignedIntegerConcept - { void constraints() {} }; - template <> struct UnsignedIntegerConcept -@@ -141,7 +112,6 @@ - template <> struct UnsignedIntegerConcept - { void constraints() {} }; - // etc. --#endif - - //=========================================================================== - // Basic Concepts -@@ -159,15 +129,11 @@ - struct AssignableConcept - { - void constraints() { --#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = a; // require assignment operator --#endif - const_constraints(a); - } - void const_constraints(const TT& b) { --#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // const required for argument to assignment --#endif - } - TT a; - }; -@@ -196,17 +162,13 @@ - { - void constraints() { - TT b(a); --#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = a; // require assignment operator --#endif - const_constraints(a); - ignore_unused_variable_warning(b); - } - void const_constraints(const TT& b) { - TT c(b); --#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // const required for argument to assignment --#endif - ignore_unused_variable_warning(c); - } - TT a; -@@ -304,6 +266,9 @@ - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOpConcept); - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOpConcept); - -+#undef BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT -+#undef BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT -+ - //=========================================================================== - // Function Object Concepts - -@@ -318,7 +283,6 @@ - }; - - --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct GeneratorConcept - { -@@ -327,7 +291,6 @@ - } - Func f; - }; --#endif - - template - struct UnaryFunctionConcept -@@ -340,7 +303,6 @@ - Return r; - }; - --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct UnaryFunctionConcept { - void constraints() { -@@ -348,7 +310,6 @@ - } - Func f; - }; --#endif - - template - struct BinaryFunctionConcept -@@ -362,7 +323,6 @@ - Return r; - }; - --#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct BinaryFunctionConcept - { -@@ -373,7 +333,6 @@ - First first; - Second second; - }; --#endif - - template - struct UnaryPredicateConcept -@@ -422,9 +381,7 @@ - function_requires< AssignableConcept >(); - function_requires< DefaultConstructibleConcept >(); - function_requires< EqualityComparableConcept >(); --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - typedef typename std::iterator_traits::value_type V; --#endif - (void)*i; // require dereference operator - } - TT i; -@@ -446,7 +403,6 @@ - void constraints() { - function_requires< TrivialIteratorConcept >(); - // require iterator_traits typedef's --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - typedef typename std::iterator_traits::difference_type D; - function_requires< SignedIntegerConcept >(); - typedef typename std::iterator_traits::reference R; -@@ -455,7 +411,6 @@ - function_requires< ConvertibleConcept< - typename std::iterator_traits::iterator_category, - std::input_iterator_tag> >(); --#endif - ++i; // require preincrement operator - i++; // require postincrement operator - } -@@ -471,7 +426,7 @@ - i++; // require postincrement operator - *i++ = t; // require postincrement and assignment - } -- TT i, j; -+ TT i; - ValueT t; - }; - -@@ -480,14 +435,12 @@ - { - void constraints() { - function_requires< InputIteratorConcept >(); --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - function_requires< ConvertibleConcept< - typename std::iterator_traits::iterator_category, - std::forward_iterator_tag> >(); - typedef typename std::iterator_traits::reference reference; - reference r = *i; - ignore_unused_variable_warning(r); --#endif - } - TT i; - }; -@@ -507,11 +460,9 @@ - { - void constraints() { - function_requires< ForwardIteratorConcept >(); --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - function_requires< ConvertibleConcept< - typename std::iterator_traits::iterator_category, - std::bidirectional_iterator_tag> >(); --#endif - --i; // require predecrement operator - i--; // require postdecrement operator - } -@@ -536,12 +487,10 @@ - void constraints() { - function_requires< BidirectionalIteratorConcept >(); - function_requires< ComparableConcept >(); --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - function_requires< ConvertibleConcept< - typename std::iterator_traits::iterator_category, - std::random_access_iterator_tag> >(); - typedef typename std::iterator_traits::reference R; --#endif - - i += n; // require assignment addition operator - i = i + n; i = n + i; // require addition with difference type -@@ -552,11 +501,7 @@ - } - TT a, b; - TT i, j; --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - typename std::iterator_traits::difference_type n; --#else -- std::ptrdiff_t n; --#endif - }; - - template -@@ -568,11 +513,7 @@ - i[n] = *i; // require element access and assignment - } - TT i; --#ifndef BOOST_NO_STD_ITERATOR_TRAITS - typename std::iterator_traits::difference_type n; --#else -- std::ptrdiff_t n; --#endif - }; - - //=========================================================================== - diff --git a/libstdc++-v3/docs/html/17_intro/configury.html b/libstdc++-v3/docs/html/17_intro/configury.html index 4b676f0..1c9acf2 100644 --- a/libstdc++-v3/docs/html/17_intro/configury.html +++ b/libstdc++-v3/docs/html/17_intro/configury.html @@ -9,7 +9,7 @@ - libstdc++-v3 configury + libstdc++ configury @@ -26,7 +26,7 @@ Canadian cross build.


-

Notes on libstdc++-v3 configury

+

Notes on libstdc++ configury

No problem is insoluble in all conceivable circumstances.
-- The Cosmic AC, diff --git a/libstdc++-v3/docs/html/17_intro/headers_cc.txt b/libstdc++-v3/docs/html/17_intro/headers_cc.txt deleted file mode 100644 index a0d926d..0000000 --- a/libstdc++-v3/docs/html/17_intro/headers_cc.txt +++ /dev/null @@ -1,83 +0,0 @@ -// 1999-05-12 bkoz - -// Copyright (C) 1999 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -// USA. - -// 17.4.1.2 Headers - - -// "C++" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" headers -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// "C" headers that might not work if wchar_t support is disabled. -#include -#if _GLIBCXX_USE_WCHAR_T - #include - #include -#endif - -int main() { return 0; } diff --git a/libstdc++-v3/docs/html/17_intro/howto.html b/libstdc++-v3/docs/html/17_intro/howto.html index 631e58f..828959c 100644 --- a/libstdc++-v3/docs/html/17_intro/howto.html +++ b/libstdc++-v3/docs/html/17_intro/howto.html @@ -6,11 +6,11 @@ - + - libstdc++-v3 HOWTO: Chapter 17: Library Introduction + libstdc++ HOWTO: Chapter 17: Library Introduction @@ -34,33 +34,175 @@

Contents


-

The Standard C++ header files

-

The Standard C++ Library specifies 50 header files that must be +

Header Files

+

The C++ standard specifies 50 header files that must be available to all hosted implementations. Actually, the word "files" is a misnomer, since the contents of the headers don't necessarily have to be in any kind of external file. The - only rule is that when you #include a certain header, the + only rule is that when one #include's a certain header, the contents of that header, as defined by the Standard, become - available to you, no matter how. -

-

The names of the headers can be easily seen in - testsuite/17_intro/headers.cc, - which is a small testbed we use to make certain that the headers - all compile and run. + available, no matter how.

+

C++98/03 include files: +

+
+C++ Library Headers
+algorithm	ios      	new     	stack
+bitset		iosfwd   	numeric 	stdexcept
+complex     	iostream 	ostream 	streambuf
+    		istream  	queue      	string
+deque      	iterator 			
+exception  	limits   			typeinfo
+fstream    	list     	set
+functional 	locale   	map
+iomanip    	memory   	sstream 	
+
+C++ Headers for C Library Facilities
+cassert   	cfloat        	cmath         	cstddef     
+ccomplex  		     	csetjmp       	cstdio      	ctime
+cctype    	ciso646       	csignal			    	
+cerrno    	climits       	cstdarg       	cstdlib     	cwchar
+	    	clocale       		      	cstring     	cwctype
+
+ +

C++0x include files: +

+
+C++ Library Headers
+algorithm	ios      	new     	stack
+array      	iosfwd   	numeric 	stdexcept
+bitset     	iostream 	ostream 	streambuf
+complex    	istream  	queue      	string
+deque      	iterator 	random		system_error
+exception  	limits   	regex      	tuple
+fstream    	list     	set        	type_traits
+functional 	locale   	map        	typeinfo
+iomanip    	memory   	sstream 	
+
+C++ Headers for C Library Facilities
+cassert   	cfloat        	cmath         	cstddef     	ctgmath
+ccomplex  	cinttypes     	csetjmp       	cstdio      	ctime
+cctype    	ciso646       	csignal       	cstdint     	cuchar
+cerrno    	climits       	cstdarg       	cstdlib     	cwchar
+cfenv     	clocale       	cstdbool      	cstring     	cwctype
+
+ +

In addition, TR1 includes as: +

+
+C++ Library Headers
+tr1/array, tr1/complex, tr1/functional, tr1/memory, tr1/random,
+tr1/regex, tr1/tuple, tr1/type_traits, tr1/unordered_map,
+tr1/unordered_set, tr1/utility
+
+C++ Headers for C Library Facilities
+tr1/cmath, tr1/ccomplex, tr1/cfenv, tr1/cfloat, tr1/cinttypes,
+tr1/climits, tr1/cstdarg, tr1/cstdbool, tr1/cstdint, tr1/cstdio,
+tr1/cstdlib, tr1/ctgmath, tr1/ctime, tr1/cwchar, tr1/cwctype
+
+C++ Compatibility Headers for C Library Facilities
+tr1/complex.h, tr1/ctype.h, tr1/float.h, tr1/limits.h, tr1/math.h,
+tr1/stdarg.h, tr1/stdbool.h, tr1/stdint.h, tr1/stdio.h, tr1/stdlib.h,
+tr1/tgmath.h, tr1/wchar.h, tr1/wctype.h
+
+ +
+

Headers and namespace std::

+

+ You should not use the C-headers (except for system-level + headers) from C++ programs. Instead, you should use a set of + headers that are named by prepending 'c' and, as usual, + omitting the extension (.h). For example, instead of using + <math.h>, you + should use <cmath>. In some cases this has + the advantage that the C++-header is more standardized than + the C-header (i.e. <ctime> (almost) + corresponds to either <time.h> or <sys/time.h>). + + The standard specifies that if you include the C-style header + (<math.h> in + this case), the symbols will be available both in the global + namespace and in namespace std:: (but + libstdc++ does not yet have fully compliant headers) On the + other hand, if you include only the new header (i.e. <cmath>), the symbols + will only be defined in namespace std:: + (and macros will be converted to inline-functions). +

+ +

FIXME: this is no longer accurate.

+ +

+ For more information on this, and for information on how the + GNU C++ implementation might reuse ("shadow") the C + library-functions, have a look at + www.cantrip.org. +

+ +
+

Namespace std::

+ +

+ One standard requirement is that the library components are defined + in namespace std::. Thus, in order to use these types or + functions, one must do one of two things: +

+ +
  • put a kind of +using-declaration in your source +(either using namespace std; or i.e. using +std::string;) This approach works well for individual source files, but +should not be used in a global context, like header files. +

  • use a fully +qualified name for each library symbol +(i.e. std::string, std::cout) Always can be +used, and usually enhanced, by strategic use of typedefs. (In the +cases where the qualified verbage becomes unweidly.) +

  • +
+ +
+

Using namespace composition

+ +

+ Gtk-- defines + most of its classes in namespace Gtk::. Thus, it was possible to + adapt Gtk-- to namespace std:: by using a C++-feature called + namespace composition. This is what happens if + you put a using-declaration into a + namespace-definition: the imported symbol(s) gets imported into the + currently active namespace(s). For example: +

+	  namespace Gtk {
+	  using std::string;
+	  class Window { ... }
+	  }
+	
+ In this example, std::string gets imported into + namespace Gtk::. The result is that you don't have to use + std::string in this header, but still + std::string does not get imported into + the global namespace (::) unless the user does + using namespace Gtk; (which is not recommended + practice for Gtk--, so it is not a problem). Additionally, the + using-declarations are wrapped in macros that + are set based on autoconf-tests to either "" or i.e. using + std::string; (depending on whether the system has + libstdc++ in std:: or not). (ideas from + <llewelly@dbritsch.dsl.xmission.com>, Karl Nelson + <kenelson@ece.ucdavis.edu>) +

+

The Standard C++ library and multithreading

This section discusses issues surrounding the proper compilation @@ -119,7 +261,7 @@ href="../23_containers/howto.html#3">23 (containers), and 27 (I/O) for more information.

-

The libstdc++-v3 library (unlike libstdc++-v2, all of it, not +

The libstdc++ library (unlike libstdc++-v2, all of it, not just the STL) has been designed so that multithreaded applications using it may be written. The first problem is finding a fast method of implementation portable to all @@ -162,21 +304,7 @@


-

<foo> vs <foo.h>

-

The new-style headers are fully supported in libstdc++-v3. The compiler - itself fully supports namespaces, including std::. -

-

For those of you new to ISO C++98, no, that isn't a typo, the headers - really have new names. Marshall Cline's C++ FAQ Lite has a good - explanation in -item [27.4]. -

-

Return to top of page or - to the FAQ. -

- -
-

Behavior specific to libstdc++-v3

+

Behavior specific to libstdc++

The ISO standard defines the following phrase:

@@ -209,7 +337,7 @@ here.

[18.3]/8 Even though it's listed in the library - sections, libstdc++-v3 has zero control over what the cleanup code hands + sections, libstdc++ has zero control over what the cleanup code hands back to the runtime loader. Talk to the compiler people. :-)

[18.4.2.1]/5 (bad_alloc),
@@ -289,74 +417,100 @@


-

Preprocessor macros controlling the library

-

Some of the semantics of the libstdc++-v3 implementation are - controlled by preprocessor macros, both during build/installation and - during compilation of user code. Many of these choices are made when - the library is built and installed (actually, during - the configuration step, with the - various --enable/--disable choices being translated to #define/#undef). -

-

All library macros begin with _GLIBCPP_ in earlier - versions, and _GLIBCXX_ in later versions. The fact that - these symbols start with a leading underscore should give you a clue - that (by default) they aren't meant to be changed by the user. :-) -

-

These macros are all gathered in the file c++config.h, - which is generated during installation. You must assume that - these macros cannot be redefined by your own code, unless we - document otherwise here. Some of the choices control code which has - already been compiled (i.e., libstdc++.a/.so). If you explicitly - #define or #undef these macros, the headers may see different - code paths, but the libraries which you link against will not. - If you want to experiment with different values, you must change the - config headers before building/installing the library. -

-

Below are macros which, for 3.1 and later, you may change yourself, - in your own code with #define/#undef or with -D/-U compiler flags. - The default state of the symbol is listed. "Configurable" - (or "Not configurable") means that the symbol is initially - chosen (or not) based on --enable/--disable options at configure time. - For 3.1 through 3.3, the prefixes are _GLIBCPP_. +

Macros for libstdc++

+ +

All pre-processor switches and configurations are all gathered + in the file c++config.h, which is generated during + the libstdc++ configuration and build process, and included by + files part of the public libstdc++ API. Most of these macros + should not be used by consumers of libstdc++, and are reserved + for internal implementation use. These macros cannot be + redefined. However, a select handful of these macro + control libstdc++ extensions and extra features, or provide + versioning information for the API, and are able to be used.

+ +

All library macros begin with _GLIBCXX_ (except for + versions 3.1.x to 3.3.x, which use _GLIBCPP_). +

+ +

Below is the macro which users may check for library version + information.

+ +
+
__GLIBCXX__
The current version of + libstdc++ in compressed ISO date format, form of an unsigned + long. For details on the value of this particular macro for a + particular release, please consult this + document.
+ +

Below are the macros which users may change with #define/#undef or + with -D/-U compiler flags. The default state of the symbol is + listed.

+ +

"Configurable" (or "Not configurable") means + that the symbol is initially chosen (or not) based on + --enable/--disable options at library build and configure time + (documented here), with the + various --enable/--disable choices being translated to + #define/#undef). +

+ +

"ABI" means that changing from the default value may + mean changing the ABI of compiled code. In other words, these + choices control code which has already been compiled (i.e., in a + binary such as libstdc++.a/.so). If you explicitly #define or + #undef these macros, the headers may see different code + paths, but the libraries which you link against will not. + Experimenting with different values with the expectation of + consistent linkage requires changing the config headers before + building/installing the library. +

+
_GLIBCXX_DEPRECATED
-
Undefined by default. Not configurable. Turning this on enables - older ARM-style iostreams code, and other anachronisms. This may be - useful in updating old C++ programs which no longer meet the - requirements of the language. -
- -
_GLIBCXX_CONCEPT_CHECKS
-
Undefined by default. Configurable. When defined, performs - compile-time checking on certain template instantiations to detect - violations of the requirements of the standard. This is described - in more detail here. +
Defined by default. Not configurable. ABI-changing. Turning this off + removes older ARM-style iostreams code, and other anachronisms + from the API. This macro is dependent on the version of the + standard being tracked, and as a result may give different results for + -std=c++98 and -std=c++0x. This may + be useful in updating old C++ code which no longer meet the + requirements of the language, or for checking current code + against new language standards.
+ +
_GLIBCXX_FORCE_NEW
Undefined by + default. When defined, memory allocation and allocators controlled + by libstdc++ call operator new/delete without caching and + pooling. Configurable via + --enable-libstdcxx-allocator. ABI-changing.
+ + +
_GLIBCXX_CONCEPT_CHECKS
Undefined by + default. Configurable via --enable-concept-checks. + When defined, performs compile-time checking on certain template + instantiations to detect violations of the requirements of the + standard. This is described in more detail here.
+
_GLIBCXX_DEBUG
-
Undefined by default. Configurable. When defined, compiles - user code using the libstdc++ debug +
Undefined by default. When defined, compiles + user code using the libstdc++ debug mode.
_GLIBCXX_DEBUG_PEDANTIC
-
Undefined by default. Configurable. When defined while - compiling with the libstdc++ debug +
Undefined by default. When defined while + compiling with the libstdc++ debug mode, makes the debug mode extremely picky by making the use of libstdc++ extensions and libstdc++-specific behavior into errors.
+
_GLIBCXX_PARALLEL
+
Undefined by default. When defined, compiles + user code using the libstdc++ parallel + mode. +
+ no Invariant Sections. diff --git a/libstdc++-v3/docs/html/17_intro/porting-howto.html b/libstdc++-v3/docs/html/17_intro/porting-howto.html deleted file mode 100644 index d6bedb2..0000000 --- a/libstdc++-v3/docs/html/17_intro/porting-howto.html +++ /dev/null @@ -1,744 +0,0 @@ - - - - -Libstdc++-porting-howto - - -
-
-

-Libstdc++-porting-howto

-

Felix Natter

-
-

Legal Notice

-

- This document can be distributed under the FDL - (www.gnu.org) -

-
-

Tue Jun 5 20:07:49 2001

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Revision History
Revision 0.5Thu Jun 1 13:06:50 2000fnatter
First docbook-version.
Revision 0.8Sun Jul 30 20:28:40 2000fnatter
First released version using docbook-xml - + second upload to libstdc++-page. -
Revision 0.9Wed Sep 6 02:59:32 2000fnatter
5 new sections.
Revision 0.9.1Sat Sep 23 14:20:15 2000fnatter
added information about why file-descriptors are not in the - standard
Revision 0.9.2Tue Jun 5 20:07:49 2001fnatter
- a fix, added hint on increased portability of C-shadow-headers, - added autoconf-test HAVE_CONTAINER_AT -
Revision 0.9.3Fri Jun 29 16:15:56 2001fnatter
- changed signature of nonstandard filebuf-constructor and - update the section on filebuf::attach to point to ../ext/howto.html, - added link to ../21/strings/howto.html - in sec-stringstream, changed <link>-tags to have content - (so that these links work), - replace "user-space" by "global namespace" - add note about gcc 3.0 and shadow-headers - add section about ostream::form and istream::scan - sec-vector-at: remove hint to modify headers - fix spelling error in sec-stringstream -
Revision 0.9.4Mon Nov 5 17:01:04 2001fnatter
- rewrite section 1.1.3 because of gnu.gcc.help-post by - Juergen Heinzl -
-
-

Abstract

-

- Some notes on porting applications from libstdc++-2.90 (or earlier - versions) to libstdc++-v3. Not speaking in terms of the GNU libstdc++ - implementations, this means porting from earlier versions of the - C++-Standard to ISO 14882. -

-
-
-
- -

- In the following, when I say portable, I will refer to "portable among ISO - 14882-implementations". On the other hand, if I say "backportable" or - "conservative", I am talking about "compiles with older - libstdc++-implementations". -

-
-

-Namespace std::

-

- The latest C++-standard (ISO-14882) requires that the standard - C++-library is defined in namespace std::. Thus, in order to use - classes from the standard C++-library, you can do one of three - things: -

    -
  • wrap your code in namespace std { - ... } => This is not an option because only symbols - from the standard c++-library are defined in namespace std::. -

  • -
  • put a kind of - using-declaration in your source (either - using namespace std; or i.e. using - std::string;) => works well for source-files, but - cannot be used in header-files. -

  • -
  • use a fully qualified name for - each libstdc++-symbol (i.e. std::string, - std::cout) => can always be used -

  • -
-

- Because there are many compilers which still use an implementation - that does not have the standard C++-library in namespace - std::, some care is required to support these as - well. -

-

- Namespace back-portability-issues are generally not a problem with - g++, because versions of g++ that do not have libstdc++ in - std:: use -fno-honor-std - (ignore std::, :: = std::) by - default. That is, the responsibility for enabling or disabling - std:: is on the user; the maintainer does not have - to care about it. This probably applies to some other compilers as - well. -

-

- The following sections list some possible solutions to support compilers - that cannot ignore std::. -

-
-

-Using namespace - composition if the project uses a separate - namespace

-

- Gtk-- defines - most of its classes in namespace Gtk::. Thus, it was possible to - adapt Gtk-- to namespace std:: by using a C++-feature called - namespace composition. This is what happens if - you put a using-declaration into a - namespace-definition: the imported symbol(s) gets imported into the - currently active namespace(s). For example: -

-	  namespace Gtk {
-	  using std::string;
-	  class Window { ... }
-	  }
-	
- In this example, std::string gets imported into - namespace Gtk::. The result is that you don't have to use - std::string in this header, but still - std::string does not get imported into - the global namespace (::) unless the user does - using namespace Gtk; (which is not recommended - practice for Gtk--, so it is not a problem). Additionally, the - using-declarations are wrapped in macros that - are set based on autoconf-tests to either "" or i.e. using - std::string; (depending on whether the system has - libstdc++ in std:: or not). (ideas from - <llewelly@dbritsch.dsl.xmission.com>, Karl Nelson - <kenelson@ece.ucdavis.edu>) -
-
-

-Defining an empty namespace std

-

- By defining an (empty) namespace std:: before - using it, you avoid getting errors on systems where no part of the - library is in namespace std: -

-	  namespace std { }
-	  using namespace std;
-	
-
-
-

-Avoid to use fully qualified names - (i.e. std::string)

-

- If some compilers complain about using - std::string;, and if the "hack" for gtk-- mentioned above - does not work, then I see two solutions: - -

    -
  • - Define std:: as a macro if the compiler - doesn't know about std::. -

    -		#ifdef OLD_COMPILER
    -		#define std
    -		#endif
    -	      
    - (thanks to Juergen Heinzl who posted this solution on - gnu.gcc.help) -
  • -
  • - Define a macro NS_STD, which is defined to - either "" or "std" - based on an autoconf-test. Then you should be able to use - NS_STD::string, which will evaluate to - ::string ("string in the global namespace") on - systems that do not put string in std::. (This is untested) -

  • -
-
-
-

-How some open-source-projects deal - with this

-

- This information was gathered around May 2000. It may not be correct - by the time you read this. -

-
-

Table 1. Namespace std:: in Open-Source programs

- ---- - - - - - - - - - - - - - - - - - - -
clanlibusual
pingususual
mozillausual
- libsigc++conservative-impl
-
-
-

Table 2. Notations for categories

- ---- - - - - - - - - - - - - - - -
usualmostly fully qualified names and some - using-declarations (but not in headers)
noneno namespace std at all
conservative-implwrap all - namespace-handling in macros to support compilers without - namespace-support (no libstdc++ used in headers)
-
-

- As you can see, this currently lacks an example of a project - which uses libstdc++-symbols in headers in a back-portable way - (except for Gtk--: see the section on the gtkmm-hack). -

-
-
-
-

-There is no ios::nocreate/ios::noreplace - in ISO 14882

-

- I have seen ios::nocreate being used for - input-streams, most probably because the author thought it would be - more correct to specify nocreate "explicitly". So you can simply - leave it out for input-streams. -

-

- For output streams, "nocreate" is probably the default, unless you - specify std::ios::trunc ? To be safe, you can open - the file for reading, check if it has been opened, and then decide - whether you want to create/replace or not. To my knowledge, even - older implementations support app, - ate and trunc (except for - app ?). -

-
-
-

-stream::attach(int - fd) is not in the standard any more

-

- Phil Edwards <pedwards@disaster.jaj.com> writes: - It was considered and rejected. Not all environments use file - descriptors. Of those that do, not all of them use integers to represent - them. -

- -

- For a portable solution (among systems which use - filedescriptors), you need to implement a subclass of - std::streambuf (or - std::basic_streambuf<..>) which opens a file - given a descriptor, and then pass an instance of this to the - stream-constructor. For an example of this, refer to - fdstream example - by Nicolai Josuttis. -

- -

- An extension is also available: - <ext/stdio_filebuf.h> contains a derived class called - __gnu_cxx::stdio_filebuf. - This class can be constructed from a C FILE* or a file - descriptor, and provides the fd() function. -

-
-
-

-The new headers

-

- All new headers can be seen in this - source-code. -

-

- The old C++-headers (iostream.h etc.) are available, but gcc generates - a warning that you are using deprecated headers. -

-
-

-New headers replacing C-headers

-

- You should not use the C-headers (except for system-level - headers) from C++ programs. Instead, you should use a set of - headers that are named by prepending 'c' and, as usual, - omitting the extension (.h). For example, instead of using - <math.h>, you - should use <cmath>. In some cases this has - the advantage that the C++-header is more standardized than - the C-header (i.e. <ctime> (almost) - corresponds to either <time.h> or <sys/time.h>). - - The standard specifies that if you include the C-style header - (<math.h> in - this case), the symbols will be available both in the global - namespace and in namespace std:: (but - libstdc++ does not yet have fully compliant headers) On the - other hand, if you include only the new header (i.e. <cmath>), the symbols - will only be defined in namespace std:: - (and macros will be converted to inline-functions). -

-

- For more information on this, and for information on how the - GNU C++ implementation might reuse ("shadow") the C - library-functions, have a look at - www.cantrip.org. -

-
-
-

- - <fstream> does - not define std::cout, - std::cin etc.

-

- In earlier versions of the standard, - <fstream.h>, - <ostream.h> - and <istream.h> - used to define - cout, cin and so on. Because - of the templatized iostreams in libstdc++-v3, you need to include - <iostream> - explicitly to define these. -

-
-
-
-

-Iterators

-

- The following are not proper uses of iterators, but may be working - fixes for existing uses of iterators. -

    -
  • you cannot do - ostream::operator<<(iterator) to - print the address of the iterator => use - operator<< &*iterator instead ? -

  • -
  • you cannot clear an iterator's reference - (iterator = 0) => use - iterator = iterator_type(); ? -

  • -
  • -if (iterator) won't work any - more => use if (iterator != iterator_type()) - ?

  • -
-
-
-

- - Libc-macros (i.e. isspace from - <cctype>)

-

- Glibc 2.0.x and 2.1.x define the - <ctype.h> - -functionality as macros (isspace, isalpha etc.). Libstdc++-v3 - "shadows" these macros as described in the section about - c-headers. -

-

- Older implementations of libstdc++ (g++-2 for egcs 1.x and g++-3 - for gcc 2.95.x), however, keep these functions as macros, and so it - is not back-portable to use fully qualified names. For example: -

-	#include <cctype>
-	int main() { std::isspace('X'); }
-      
- will result in something like this (unless using g++-v3): -
-	std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int)
-	_ISspace )  ;
-      
-

- One solution I can think of is to test for -v3 using - autoconf-macros, and define macros for each of the C-functions - (maybe that is possible with one "wrapper" macro as well ?). -

-

- Another solution which would fix g++ is to tell the user to modify a - header-file so that g++-2 (egcs 1.x) and g++-3 (gcc 2.95.x) define a - macro which tells <ctype.h> to define functions - instead of macros: -

-	// This keeps isalnum, et al from being propagated as macros.
-	#if __linux__
-	#define __NO_CTYPE 1
-	#endif
-
-	[ now include <ctype.h> ]
-      
-

- Another problem arises if you put a using namespace - std; declaration at the top, and include <ctype.h>. This will result in - ambiguities between the definitions in the global namespace - (<ctype.h>) and the - definitions in namespace std:: - (<cctype>). -

-

- The solution to this problem was posted to the libstdc++-v3 - mailing-list: - Benjamin Kosnik <bkoz@redhat.com> writes: - ‘ - --enable-cshadow-headers is currently broken. As a result, shadow - headers are not being searched.... - ’ - This is now outdated, but gcc 3.0 still does not have fully - compliant "shadow headers". -

-
-
-

-State of streams

-

- At least some older implementations don't have - std::ios_base, so you should use - std::ios::badbit, std::ios::failbit - and std::ios::eofbit and - std::ios::goodbit. -

-
-
-

-vector::at is missing (i.e. gcc 2.95.x)

-

- One solution is to add an autoconf-test for this: -

-	AC_MSG_CHECKING(for container::at)
-	AC_TRY_COMPILE(
-	[
-	#include <vector>
-	#include <deque>
-	#include <string>
-	
-	using namespace std;
-	],
-	[
-	deque<int> test_deque(3);
-	test_deque.at(2);
-	vector<int> test_vector(2);
-	test_vector.at(1);
-	string test_string("test_string");
-	test_string.at(3);
-	],
-	[AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_CONTAINER_AT)],
-	[AC_MSG_RESULT(no)])
-      
- If you are using other (non-GNU) compilers it might be a good idea - to check for string::at separately. -
-
-

-Using std::char_traits<char>::eof()

-

-

-	#ifdef HAVE_CHAR_TRAITS
-	#define CPP_EOF std::char_traits<char>::eof()
-	#else
-	#define CPP_EOF EOF
-	#endif
-      
-
-
-

-Using string::clear()/string::erase()

-

- There are two functions for deleting the contents of a string: - clear and erase (the latter - returns the string). -

-	void 
-	clear() { _M_mutate(0, this->size(), 0); }
-      
-
-	basic_string& 
-	erase(size_type __pos = 0, size_type __n = npos)
-	{ 
-	return this->replace(_M_check(__pos), _M_fold(__pos, __n),
-	_M_data(), _M_data()); 
-	}
-      
- The implementation of erase seems to be more - complicated (from libstdc++-v3), but clear is not - implemented in gcc 2.95.x's libstdc++, so you should use - erase (which is probably faster than - operator=(charT*)). -
-
-

-GNU Extensions ostream::form and istream::scan

-

- These are not supported any more - use - - stringstreams instead. -

-
-
-

-Using stringstreams

-

- Libstdc++-v3 provides the new - i/ostringstream-classes, (<sstream>), but for compatibility - with older implementations you still have to use - i/ostrstream (<strstream>): -

-	#ifdef HAVE_SSTREAM
-	#include <sstream>
-	#else
-	#include <strstream>
-	#endif
-      
-
    -
  • strstream is considered to be - deprecated -

  • -
  • strstream is limited to - char -

  • -
  • with ostringstream you don't - have to take care of terminating the string or freeing its - memory -

  • -
  • istringstream can be re-filled - (clear(); str(input);) -

  • -
-

- You can then use output-stringstreams like this: -

-	#ifdef HAVE_SSTREAM
-	std::ostringstream oss;
-	#else
-	std::ostrstream oss;
-	#endif
-	oss << "Name=" << m_name << ", number=" << m_number << std::endl;
-	...
-	#ifndef HAVE_SSTREAM
-	oss << std::ends; // terminate the char*-string
-	#endif
-	// str() returns char* for ostrstream and a string for ostringstream
-	// this also causes ostrstream to think that the buffer's memory
-	// is yours
-	m_label.set_text(oss.str());
-	#ifndef HAVE_SSTREAM
-	// let the ostrstream take care of freeing the memory
-	oss.freeze(false);
-	#endif
-      
-

- Input-stringstreams can be used similarly: -

-	std::string input;
-	...
-	#ifdef HAVE_SSTREAM
-	std::istringstream iss(input);
-	#else
-	std::istrstream iss(input.c_str());
-	#endif
-	int i;
-	iss >> i; 
-      
- One (the only?) restriction is that an istrstream cannot be re-filled: -
-	std::istringstream iss(numerator);
-	iss >> m_num;
-	// this is not possible with istrstream
-	iss.clear();
-	iss.str(denominator);
-	iss >> m_den;
-      
- If you don't care about speed, you can put these conversions in - a template-function: -
-	template <class X>
-	void fromString(const string& input, X& any)
-	{
-	#ifdef HAVE_SSTREAM
-	std::istringstream iss(input);
-	#else
-	std::istrstream iss(input.c_str());
-	#endif
-	X temp;
-	iss >> temp;
-	if (iss.fail())
-	throw runtime_error(..)
-	any = temp;
-	}
-      
- Another example of using stringstreams is in this howto. -

- I have read the Josuttis book on Standard C++, so some information - comes from there. Additionally, there is information in - "info iostream", which covers the old implementation that gcc 2.95.x - uses. -

-
-
-

-About...

-

- Please send any experience, additions, corrections or questions to - fnatter@gmx.net or for - discussion to the libstdc++-v3-mailing-list. -

-
-
- diff --git a/libstdc++-v3/docs/html/17_intro/porting.html b/libstdc++-v3/docs/html/17_intro/porting.html index c280990..2a561a9 100644 --- a/libstdc++-v3/docs/html/17_intro/porting.html +++ b/libstdc++-v3/docs/html/17_intro/porting.html @@ -1,8 +1,8 @@ -Porting libstdc++-v3 +Porting libstdc++ - + -

Porting libstdc++-v3

+

Porting libstdc++


Node: Top, @@ -44,14 +44,14 @@ Up: (dir)
-

Porting libstdc++-v3

+

Porting libstdc++

-

This document explains how to port libstdc++-v3 (the GNU C++ library) to +

This document explains how to port libstdc++ (the GNU C++ library) to a new target. -

In order to make the GNU C++ library (libstdc++-v3) work with a new +

In order to make the GNU C++ library (libstdc++) work with a new target, you must edit some configuration files and provide some new -header files. Unless this is done, libstdc++-v3 will use generic +header files. Unless this is done, libstdc++ will use generic settings which may not be correct for your target; even if they are correct, they will likely be inefficient. @@ -115,7 +115,7 @@ OS portion of the triplet (the default), then nothing needs to be changed. os_defines.h. This file contains basic macro definitions that are required to allow the C++ library to work with your C library. -

Several libstdc++-v3 source files unconditionally define the macro +

Several libstdc++ source files unconditionally define the macro _POSIX_SOURCE. On many systems, defining this macro causes large portions of the C library header files to be eliminated at preprocessing time. Therefore, you may have to #undef this @@ -130,7 +130,7 @@ need to define. You will need to add them to the target. It will not work to simply define these macros in os_defines.h. -

At this time, there are a few libstdc++-v3-specific macros which may be +

At this time, there are a few libstdc++-specific macros which may be defined:

_GLIBCXX_USE_C99_CHECK may be defined to 1 to check C99 @@ -233,7 +233,7 @@ character classification, analogous to that provided by the C libraries certainly need some modification.

The first file to write is ctype_base.h. This file provides -some very basic information about character classification. The libstdc++-v3 +some very basic information about character classification. The libstdc++ library assumes that your C library implements <ctype.h> by using a table (indexed by character code) containing integers, where each of these integers is a bit-mask indicating whether the character is @@ -530,7 +530,7 @@ Explaining the full workings of libtool is beyond the scope of this document, but there are a few, particular bits that are necessary for porting. -

Some parts of the libstdc++-v3 library are compiled with the libtool +

Some parts of the libstdc++ library are compiled with the libtool --tags CXX option (the C++ definitions for libtool). Therefore, ltcf-cxx.sh in the top-level directory needs to have the correct logic to compile and archive objects equivalent to the C version of libtool, @@ -542,7 +542,7 @@ run as the library is loaded. Often, that requires linking in special object files when the C++ library is built as a shared library, or taking other system-specific actions. -

The libstdc++-v3 library is linked with the C version of libtool, even +

The libstdc++ library is linked with the C version of libtool, even though it is a C++ library. Therefore, the C version of libtool needs to ensure that the run-time library initializers are run. The usual way to do this is to build the library using gcc -shared. @@ -974,7 +974,7 @@ to permit their use in free software.

Table of Contents

    -
  • Porting libstdc++-v3 +
  • Porting libstdc++
  • Operating system
  • CPU
  • Character types diff --git a/libstdc++-v3/docs/html/17_intro/tr1_status.html b/libstdc++-v3/docs/html/17_intro/tr1_status.html new file mode 100644 index 0000000..3d3d673 --- /dev/null +++ b/libstdc++-v3/docs/html/17_intro/tr1_status.html @@ -0,0 +1,2322 @@ + + + + + + + + + + + + Status of TR1 features in GCC + - GNU Project - Free Software Foundation (FSF) + + + + + + +

    + Status of TR1 features in GCC +

    + +

    +This table is based on the table of contents of ISO/IEC DTR 19768 +Doc No: N1836=05-0096 Date: 2005-06-24 +Draft Technical Report on C++ Library Extensions +

    + +

    +In this implementation the header names are prefixed by +tr1/, for instance <tr1/functional>, +<tr1/memory>, and so on. +

    + +

    +This page describes the TR1 support in mainline GCC SVN, not in any particular +release. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    SectionDescriptionDoneBrokenMissingComments
    2General Utilities
    2.1Reference wrappersdone
    2.1.1Additions to header <functional> synopsisdone
    2.1.2Class template reference_wrapperdone
    2.1.2.1reference_wrapper construct/copy/destroydone
    2.1.2.2reference_wrapper assignmentdone
    2.1.2.3reference_wrapper accessdone
    2.1.2.4reference_wrapper invocationdone
    2.1.2.5reference_wrapper helper functionsdone
    2.2Smart pointersdone
    2.2.1Additions to header <memory> synopsisdone
    2.2.2Class bad_weak_ptrdone
    2.2.3Class template shared_ptrdone1
    2.2.3.1shared_ptr constructorsdone
    2.2.3.2shared_ptr destructordone
    2.2.3.3shared_ptr assignmentdone
    2.2.3.4shared_ptr modifiersdone
    2.2.3.5shared_ptr observersdone
    2.2.3.6shared_ptr comparisondone
    2.2.3.7shared_ptr I/Odone
    2.2.3.8shared_ptr specialized algorithmsdone
    2.2.3.9shared_ptr castsdone
    2.2.3.10get_deleterdone
    2.2.4Class template weak_ptrdone
    2.2.4.1weak_ptr constructorsdone
    2.2.4.2weak_ptr destructordone
    2.2.4.3weak_ptr assignmentdone
    2.2.4.4weak_ptr modifiersdone
    2.2.4.5weak_ptr observersdone
    2.2.4.6weak_ptr comparisondone
    2.2.4.7weak_ptr specialized algorithmsdone
    2.2.5Class template enable_shared_from_thisdone
    3Function objects
    3.1Definitionsdone
    3.2Additions to <functional> synopsisdone
    3.3Requirementsdone
    3.4Function return typesdone
    3.5Function template mem_fndone
    3.6Function object bindersdone
    3.6.1Class template is_bind_expressiondone
    3.6.2Class template is_placeholderdone
    3.6.3Function template binddone
    3.6.4Placeholdersdone
    3.7Polymorphic function wrappersdone
    3.7.1Class bad_function_calldone
    3.7.1.1bad_function_call constructordone
    3.7.2Class template functiondone
    3.7.2.1function construct/copy/destroydone
    3.7.2.2function modifiersdone
    3.7.2.3function capacitydone
    3.7.2.4function invocationdone
    3.7.2.5function target accessdone
    3.7.2.6undefined operatorsdone
    3.7.2.7null pointer comparison operatorsdone
    3.7.2.8specialized algorithmsdone
    4Metaprogramming and type traits
    4.1Requirementsdone
    4.2Header <type_traits> synopsisdone
    4.3Helper classesdone
    4.4General Requirementsdone
    4.5Unary Type Traitsdone
    4.5.1Primary Type Categoriesdone
    4.5.2Composite type traitsdone
    4.5.3Type propertiesdone
    4.6Relationships between typesdone
    4.7Transformations between typesdone
    4.7.1Const-volatile modificationsdone
    4.7.2Reference modificationsdone
    4.7.3Array modificationsdone
    4.7.4Pointer modificationsdone
    4.8Other transformationsdone
    4.9Implementation requirementsdone
    5Numerical facilities
    5.1Random number generationdone
    5.1.1Requirementsdone
    5.1.2Header <random> synopsisdone
    5.1.3Class template variate_generatordone
    5.1.4Random number engine class templatesdone
    5.1.4.1Class template linear_congruentialdone
    5.1.4.2Class template mersenne_twisterdone
    5.1.4.3Class template subtract_with_carrydone
    5.1.4.4Class template subtract_with_carry_01done
    5.1.4.5Class template discard_blockdone
    5.1.4.6Class template xor_combinedoneoperator()() per N2079
    5.1.5Engines with predefined parametersdone
    5.1.6Class random_devicedone
    5.1.7Random distribution class templatesdone
    5.1.7.1Class template uniform_intdone
    5.1.7.2Class bernoulli_distributiondone
    5.1.7.3Class template geometric_distributiondone
    5.1.7.4Class template poisson_distributiondone
    5.1.7.5Class template binomial_distributiondone
    5.1.7.6Class template uniform_realdone
    5.1.7.7Class template exponential_distributiondone
    5.1.7.8Class template normal_distributiondone
    5.1.7.9Class template gamma_distributiondone
    5.2Mathematical special functionsdone
    5.2.1Additions to header <cmath> synopsisdone
    5.2.1.1associated Laguerre polynomialsdone
    5.2.1.2associated Legendre functionsdone
    5.2.1.3beta functiondone
    5.2.1.4(complete) elliptic integral of the first kinddone
    5.2.1.5(complete) elliptic integral of the second kinddone
    5.2.1.6(complete) elliptic integral of the third kinddone
    5.2.1.7confluent hypergeometric functionsdone
    5.2.1.8regular modified cylindrical Bessel functionsdone
    5.2.1.9cylindrical Bessel functions (of the first kind)done
    5.2.1.10irregular modified cylindrical Bessel functionsdone
    5.2.1.11cylindrical Neumann functionsdone
    5.2.1.12(incomplete) elliptic integral of the first kinddone
    5.2.1.13(incomplete) elliptic integral of the second kinddone
    5.2.1.14(incomplete) elliptic integral of the third kinddone
    5.2.1.15exponential integraldone
    5.2.1.16Hermite polynomialsdone
    5.2.1.17hypergeometric functionsdone
    5.2.1.18Laguerre polynomialsdone
    5.2.1.19Legendre polynomialsdone
    5.2.1.20Riemann zeta functiondone
    5.2.1.21spherical Bessel functions (of the first kind)done
    5.2.1.22spherical associated Legendre functionsdone
    5.2.1.23spherical Neumann functionsdone
    5.2.2Additions to header <math.h> synopsisdone
    6Containers
    6.1Tuple typesdone
    6.1.1Header <tuple> synopsisdone
    6.1.2Additions to header <utility> synopsisdone
    6.1.3Class template tupledone
    6.1.3.1Constructiondone
    6.1.3.2Tuple creation functionsdone
    6.1.3.3Tuple helper classesdone
    6.1.3.4Element accessdone
    6.1.3.5Relational operatorsdone
    6.1.4Pairsdone
    6.2Fixed size arraydone
    6.2.1Header <array> synopsisdone
    6.2.2Class template arraydone
    6.2.2.1array constructors, copy, and assignmentdone
    6.2.2.2array specialized algorithmsdone
    6.2.2.3array sizedone
    6.2.2.4Zero sized arraysdone
    6.2.2.5Tuple interface to class template arraydone
    6.3Unordered associative containersdone
    6.3.1Unordered associative container requirementsdone
    6.3.1.1Exception safety guaranteesdone
    6.3.2Additions to header <functional> synopsisdone
    6.3.3Class template hashdone
    6.3.4Unordered associative container classesdone
    6.3.4.1Header <unordered_set> synopsisdone
    6.3.4.2Header <unordered_map> synopsisdone
    6.3.4.3Class template unordered_setdone
    6.3.4.3.1unordered_set constructorsdone
    6.3.4.3.2unordered_set swapdone
    6.3.4.4Class template unordered_mapdone
    6.3.4.4.1unordered_map constructorsdone
    6.3.4.4.2unordered_map element accessdone
    6.3.4.4.3unordered_map swapdone
    6.3.4.5Class template unordered_multisetdone
    6.3.4.5.1unordered_multiset constructorsdone
    6.3.4.5.2unordered_multiset swapdone
    6.3.4.6Class template unordered_multimapdone
    6.3.4.6.1unordered_multimap constructorsdone
    6.3.4.6.2unordered_multimap swapdone
    7Regular expressions
    7.1Definitionsmissing
    7.2Requirementsmissing
    7.3Regular expressions summarymissing
    7.4Header <regex> synopsismissing
    7.5Namespace tr1::regex_constantsmissing
    7.5.1Bitmask Type syntax_option_typemissing
    7.5.2Bitmask Type regex_constants::match_flag_typemissing
    7.5.3Implementation defined error_typemissing
    7.6Class regex_errormissing
    7.7Class template regex_traitsmissing
    7.8Class template basic_regexmissing
    7.8.1basic_regex constantsmissing
    7.8.2basic_regex constructorsmissing
    7.8.3basic_regex assignmissing
    7.8.4basic_regex constant operationsmissing
    7.8.5basic_regex localemissing
    7.8.6basic_regex swapmissing
    7.8.7basic_regex non-member functionsmissing
    7.8.7.1basic_regex non-member swapmissing
    7.9Class template sub_matchmissing
    7.9.1sub_match membersmissing
    7.9.2sub_match non-member operatorsmissing
    7.10Class template match_resultsmissing
    7.10.1match_results constructorsmissing
    7.10.2match_results sizemissing
    7.10.3match_results element accessmissing
    7.10.4match_results formattingmissing
    7.10.5match_results allocatormissing
    7.10.6match_results swapmissing
    7.11Regular expression algorithmsmissing
    7.11.1exceptionsmissing
    7.11.2regex_matchmissing
    7.11.3regex_searchmissing
    7.11.4regex_replacemissing
    7.12Regular expression Iteratorsmissing
    7.12.1Class template regex_iteratormissing
    7.12.1.1regex_iterator constructorsmissing
    7.12.1.2regex_iterator comparisonsmissing
    7.12.1.3regex_iterator dereferencemissing
    7.12.1.4regex_iterator incrementmissing
    7.12.2Class template regex_token_iteratormissing
    7.12.2.1regex_token_iterator constructorsmissing
    7.12.2.2regex_token_iterator comparisonsmissing
    7.12.2.3regex_token_iterator dereferencemissing
    7.12.2.4regex_token_iterator incrementmissing
    7.13Modified ECMAScript regular expression grammarmissing
    8C compatibility
    8.1Additions to header <complex>done
    8.1.1Synopsisdone
    8.1.2Function acosdone
    8.1.3Function asindone
    8.1.4Function atandone
    8.1.5Function acoshdone
    8.1.6Function asinhdone
    8.1.7Function atanhdone
    8.1.8Function fabsdone
    8.1.9Additional Overloadsdone
    8.2Header <ccomplex>missingDR 551
    8.3Header <complex.h>missingDR 551
    8.4Additions to header <cctype>done
    8.4.1Synopsisdone
    8.4.2Function isblankdone
    8.5Additions to header <ctype.h>done
    8.6Header <cfenv>done
    8.6.1Synopsisdone
    8.6.2Definitionsdone
    8.7Header <fenv.h>done
    8.8Additions to header <cfloat>done
    8.9Additions to header <float.h>done
    8.10Additions to header <ios>missing
    8.10.1Synopsismissing
    8.10.2Function hexfloatmissing
    8.11Header <cinttypes>done
    8.11.1SynopsisdoneDR 557
    8.11.2Definitionsdone
    8.12Header <inttypes.h>done
    8.13Additions to header <climits>done
    8.14Additions to header <limits.h>done
    8.15Additions to header <locale>missing
    8.16Additions to header <cmath>done
    8.16.1Synopsisdone
    8.16.2Definitionsdone
    8.16.3Function template definitionsdone
    8.16.4Additional overloadsdoneDR 568; DR 550
    8.17Additions to header <math.h>done
    8.18Additions to header <cstdarg>done
    8.19Additions to header <stdarg.h>done
    8.20The header <cstdbool>done
    8.21The header <stdbool.h>done
    8.22The header <cstdint>done
    8.22.1Synopsisdone
    8.22.2Definitionsdone
    8.23The header <stdint.h>done
    8.24Additions to header <cstdio>done
    8.24.1Synopsisdone
    8.24.2Definitionsdone
    8.24.3Additional format specifiersdoneC library responsibility
    8.24.4Additions to header <stdio.h>done
    8.25Additions to header <cstdlib>done
    8.25.1Synopsisdone
    8.25.2Definitionsdone
    8.25.3Function absdone
    8.25.4Function divdone
    8.26Additions to header <stdlib.h>done
    8.27Header <ctgmath>doneDR 551
    8.28Header <tgmath.h>doneDR 551
    8.29Additions to header <ctime>doneC library responsibility
    8.30Additions to header <cwchar>done
    8.30.1Synopsisdone
    8.30.2Definitionsdone
    8.30.3Additional wide format specifiersdoneC library responsibility
    8.31Additions to header <wchar.h>done
    8.32Additions to header <cwctype>done
    8.32.1Synopsisdone
    8.32.2Function iswblankdone
    8.33Additions to header <wctype.h>done
    + +

    Footnotes

    + +
      + +
    1. + + The shared_ptr implementation uses some code from the + Boost + shared_ptr library. +
    2. + +
    + +

    +Please send FSF & GNU inquiries & questions to +gnu@gnu.org. +There are also other ways +to contact the FSF. +

    + +

    +These pages are maintained by +the GCC team. +

    + +
    +For questions related to the use of GCC, please consult these web +pages and the GCC manuals. If +that fails, the gcc-help@gcc.gnu.org +mailing list might help.
    +Please send comments on these web pages and the development of GCC to our +developer mailing list at gcc@gnu.org +or gcc@gcc.gnu.org. All of our lists +have public archives. +
    + +

    +Copyright (C) Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110, USA. +

    +

    +Verbatim copying and distribution of this entire article is +permitted in any medium, provided this notice is preserved. +

    + + + + + + +
    + Last modified 2006-10-01 + + + Valid XHTML 1.0 + +
    + + + diff --git a/libstdc++-v3/docs/html/18_support/howto.html b/libstdc++-v3/docs/html/18_support/howto.html index c6faf5e..87dd8a5 100644 --- a/libstdc++-v3/docs/html/18_support/howto.html +++ b/libstdc++-v3/docs/html/18_support/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 18: Library Support + libstdc++ HOWTO: Chapter 18: Library Support diff --git a/libstdc++-v3/docs/html/19_diagnostics/howto.html b/libstdc++-v3/docs/html/19_diagnostics/howto.html index 7bf44c6..90a60b3 100644 --- a/libstdc++-v3/docs/html/19_diagnostics/howto.html +++ b/libstdc++-v3/docs/html/19_diagnostics/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 19: Diagnostics + libstdc++ HOWTO: Chapter 19: Diagnostics @@ -36,7 +36,6 @@

    Contents

    @@ -68,22 +67,6 @@


    -

    Exception class hierarchy diagram

    -

    At one point we were going to make up a PDF of the exceptions - hierarchy, akin to the one done for the I/O class hierarchy. - Time was our enemy. Since then we've moved to Doxygen, which has - the useful property of not sucking. Specifically, when the source - code is changed, the diagrams are automatically brought up to date. - For the old way, we had to update the diagrams separately. -

    -

    There are several links to the Doxygen-generated pages from - here. -

    -

    Return to top of page or - to the FAQ. -

    - -

    Concept checkers -- new and improved!

    Better taste! Less fat! Literally!

    In 1999, SGI added concept checkers to their implementation @@ -119,6 +102,13 @@ (or with #define _GLIBCPP_CONCEPT_CHECKS for versions 3.1, 3.2 and 3.3).

    + +

    Please note that the upcoming C++ standard has first-class + support for template parameter constraints based on concepts in the core + language. This will obviate the need for the library-simulated concept + checking described above. +

    +

    Return to top of page or to the FAQ.

    diff --git a/libstdc++-v3/docs/html/20_util/allocator.html b/libstdc++-v3/docs/html/20_util/allocator.html index f222e2d..409c08b 100644 --- a/libstdc++-v3/docs/html/20_util/allocator.html +++ b/libstdc++-v3/docs/html/20_util/allocator.html @@ -28,14 +28,16 @@

    - To the libstdc++-v3 homepage. + To the libstdc++ homepage.


    The C++ Standard encapsulates memory management characteristics for strings, container classes, and parts of iostreams in a - template class called std::allocator. + template class called std::allocator. This class, and + base classes of it, are the superset of available free store + ("heap") management classes.

    @@ -100,7 +102,7 @@

    What about threads? No problem: in a threadsafe environment, the memory pool is manipulated atomically, so you can grow a container in one thread and shrink it in another, etc. BUT what - if threads in libstdc++-v3 aren't set up properly? + if threads in libstdc++ aren't set up properly? That's been answered already.

    BUT what if you want to use your own allocator? What diff --git a/libstdc++-v3/docs/html/20_util/howto.html b/libstdc++-v3/docs/html/20_util/howto.html index 4c40459..fb02aa1 100644 --- a/libstdc++-v3/docs/html/20_util/howto.html +++ b/libstdc++-v3/docs/html/20_util/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 20: General Utilities + libstdc++ HOWTO: Chapter 20: General Utilities @@ -214,15 +214,7 @@

         pair<int,MyClass> p = make_pair(4,myobject);
        
    -

    Return to top of page or - to the FAQ. -

    -
    -

    Memory allocators

    -

    The available free store ("heap") management classes are - described here. -

    Return to top of page or to the FAQ.

    diff --git a/libstdc++-v3/docs/html/21_strings/howto.html b/libstdc++-v3/docs/html/21_strings/howto.html index a356667..1c32672 100644 --- a/libstdc++-v3/docs/html/21_strings/howto.html +++ b/libstdc++-v3/docs/html/21_strings/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 21: Strings + libstdc++ HOWTO: Chapter 21: Strings @@ -141,10 +141,10 @@ if the implementors do it correctly. The libstdc++ implementors did it correctly. Other vendors might not.
  • -
  • While parts of the SGI STL are used in libstdc++-v3, their +
  • While parts of the SGI STL are used in libstdc++, their string class is not. The SGI string is essentially vector<char> and does not do any reference - counting like libstdc++-v3's does. (It is O(n), though.) + counting like libstdc++'s does. (It is O(n), though.) So if you're thinking about SGI's string or rope classes, you're now looking at four possibilities: CString, the libstdc++ string, the SGI string, and the SGI rope, and this diff --git a/libstdc++-v3/docs/html/22_locale/codecvt.html b/libstdc++-v3/docs/html/22_locale/codecvt.html index b2e10b1..24b412b 100644 --- a/libstdc++-v3/docs/html/22_locale/codecvt.html +++ b/libstdc++-v3/docs/html/22_locale/codecvt.html @@ -37,7 +37,7 @@ attempts to detail conversions between the implementation-defined wide characters (hereafter referred to as wchar_t) and the standard type char that is so beloved in classic "C" (which can now be referred to as narrow characters.) This document attempts to describe how the GNU -libstdc++-v3 implementation deals with the conversion between wide and +libstdc++ implementation deals with the conversion between wide and narrow characters, and also presents a framework for dealing with the huge number of other encodings that iconv can convert, including Unicode and UTF8. Design issues and requirements are addressed, and @@ -274,7 +274,7 @@ multiple locales is fundamental. In practice, most users may not run into this limitation. However, as a quality of implementation issue, the GNU C++ library would like to offer a solution that allows multiple locales and or simultaneous usage with computationally -correct results. In short, libstdc++-v3 is trying to offer, as an +correct results. In short, libstdc++ is trying to offer, as an option, a high-quality implementation, damn the additional complexity!

    @@ -314,7 +314,7 @@ to wchar_t and wcsrtombs for conversions between wchar_t and char.

    Neither of these two required specializations deals with Unicode -characters. As such, libstdc++-v3 implements a partial specialization +characters. As such, libstdc++ implements a partial specialization of the codecvt class with and iconv wrapper class, encoding_state as the third template parameter.

    diff --git a/libstdc++-v3/docs/html/22_locale/ctype.html b/libstdc++-v3/docs/html/22_locale/ctype.html index ee5e69f..e52f835 100644 --- a/libstdc++-v3/docs/html/22_locale/ctype.html +++ b/libstdc++-v3/docs/html/22_locale/ctype.html @@ -76,7 +76,7 @@ to wchar_t and wcsrtombs for conversions between wchar_t and char.

    Neither of these two required specializations deals with Unicode -characters. As such, libstdc++-v3 implements +characters. As such, libstdc++ implements

    diff --git a/libstdc++-v3/docs/html/22_locale/howto.html b/libstdc++-v3/docs/html/22_locale/howto.html index 3d19bb6..3709a6f 100644 --- a/libstdc++-v3/docs/html/22_locale/howto.html +++ b/libstdc++-v3/docs/html/22_locale/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 22: Localization + libstdc++ HOWTO: Chapter 22: Localization @@ -75,7 +75,7 @@ wide characters (hereafter referred to as wchar_t) and the standard type char that is so beloved in classic "C" (which can now be referred to as narrow characters.) This document attempts - to describe how the GNU libstdc++-v3 implementation deals with the + to describe how the GNU libstdc++ implementation deals with the conversion between wide and narrow characters, and also presents a framework for dealing with the huge number of other encodings that iconv can convert, including Unicode and UTF8. Design issues and diff --git a/libstdc++-v3/docs/html/22_locale/messages.html b/libstdc++-v3/docs/html/22_locale/messages.html index 41e94a4..bb096c0 100644 --- a/libstdc++-v3/docs/html/22_locale/messages.html +++ b/libstdc++-v3/docs/html/22_locale/messages.html @@ -267,10 +267,10 @@ documentation. Here's an idea of what is required:
  • Copy the binary files into the correct directory structure.

    - cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++-v3.mo + cp fr_FR.mo (dir)/fr_FR/LC_MESSAGES/libstdc++.mo

    - cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++-v3.mo + cp de_DE.mo (dir)/de_DE/LC_MESSAGES/libstdc++.mo

  • @@ -302,7 +302,7 @@ void test01() { typedef messages<char>::catalog catalog; const char* dir = - "/mnt/egcs/build/i686-pc-linux-gnu/libstdc++-v3/po/share/locale"; + "/mnt/egcs/build/i686-pc-linux-gnu/libstdc++/po/share/locale"; const locale loc_de("de_DE"); const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); diff --git a/libstdc++-v3/docs/html/23_containers/howto.html b/libstdc++-v3/docs/html/23_containers/howto.html index 55415af..eab90e8 100644 --- a/libstdc++-v3/docs/html/23_containers/howto.html +++ b/libstdc++-v3/docs/html/23_containers/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 23: Containers + libstdc++ HOWTO: Chapter 23: Containers @@ -200,7 +200,7 @@ along the lines of the third category, the author would love to hear from you...

    -

    Also note that the implementation of bitset used in libstdc++-v3 has +

    Also note that the implementation of bitset used in libstdc++ has some extensions.

    Return to top of page or @@ -230,7 +230,7 @@

    However, please ignore all discussions about the user-level configuration of the lock implementation inside the STL container-memory allocator on those pages. For the sake of this - discussion, libstdc++-v3 configures the SGI STL implementation, + discussion, libstdc++ configures the SGI STL implementation, not you. This is quite different from how gcc pre-3.0 worked. In particular, past advice was for people using g++ to explicitly define _PTHREADS or other macros or port-specific @@ -239,7 +239,7 @@ longer be done unless you really know what you are doing and assume all responsibility.

    -

    Since the container implementation of libstdc++-v3 uses the SGI +

    Since the container implementation of libstdc++ uses the SGI code, we use the same definition of thread safety as SGI when discussing design. A key point that beginners may miss is the fourth major paragraph of the first page mentioned above @@ -248,7 +248,7 @@ client code (that'd be you, not us). There is a notable exceptions to this rule. Allocators called while a container or element is constructed uses an internal lock obtained and - released solely within libstdc++-v3 code (in fact, this is the + released solely within libstdc++ code (in fact, this is the reason STL requires any knowledge of the thread configuration).

    For implementing a container which does its own locking, it is @@ -290,7 +290,7 @@ addresses this topic, but I will ignore it here because it is not yet finalized.)

    -

    Here we'll describe how the hinting works in the libstdc++-v3 +

    Here we'll describe how the hinting works in the libstdc++ implementation, and what you need to do in order to take advantage of it. (Insertions can change from logarithmic complexity to amortized constant time, if the hint is properly used.) Also, since the current diff --git a/libstdc++-v3/docs/html/24_iterators/howto.html b/libstdc++-v3/docs/html/24_iterators/howto.html index 43d199d..7c2f106 100644 --- a/libstdc++-v3/docs/html/24_iterators/howto.html +++ b/libstdc++-v3/docs/html/24_iterators/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 24: Iterators + libstdc++ HOWTO: Chapter 24: Iterators @@ -45,7 +45,7 @@

    They ain't pointers!

    FAQ 5.1 points out that iterators are not implemented as pointers. They are a generalization of - pointers, but they are implemented in libstdc++-v3 as separate classes. + pointers, but they are implemented in libstdc++ as separate classes.

    Keeping that simple fact in mind as you design your code will prevent a whole lot of difficult-to-understand bugs. diff --git a/libstdc++-v3/docs/html/25_algorithms/howto.html b/libstdc++-v3/docs/html/25_algorithms/howto.html index fe45f32..bb5caee 100644 --- a/libstdc++-v3/docs/html/25_algorithms/howto.html +++ b/libstdc++-v3/docs/html/25_algorithms/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 25: Algorithms + libstdc++ HOWTO: Chapter 25: Algorithms diff --git a/libstdc++-v3/docs/html/26_numerics/howto.html b/libstdc++-v3/docs/html/26_numerics/howto.html index 48dc84c..e56659b 100644 --- a/libstdc++-v3/docs/html/26_numerics/howto.html +++ b/libstdc++-v3/docs/html/26_numerics/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 26: Numerics + libstdc++ HOWTO: Chapter 26: Numerics @@ -144,7 +144,7 @@


    C99

    In addition to the other topics on this page, we'll note here some - of the C99 features that appear in libstdc++-v3. + of the C99 features that appear in libstdc++.

    The C99 features depend on the --enable-c99 configure flag. This flag is already on by default, but it can be disabled by the diff --git a/libstdc++-v3/docs/html/27_io/howto.html b/libstdc++-v3/docs/html/27_io/howto.html index 1472053..067be3a 100644 --- a/libstdc++-v3/docs/html/27_io/howto.html +++ b/libstdc++-v3/docs/html/27_io/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Chapter 27: Input/Output + libstdc++ HOWTO: Chapter 27: Input/Output @@ -458,7 +458,7 @@

    The special steps taken by libstdc++, at least for version 3.0, involve doing very little buffering for the standard streams, leaving most of the buffering to the underlying C library. (This kind of - thing is tricky to get right.) + thing is tricky to get right.) The upside is that correctness is ensured. The downside is that writing through cout can quite easily lead to awful performance when the C++ I/O library is layered on top of the C I/O @@ -501,7 +501,7 @@

    This gets a bit tricky. Please read carefully, and bear with me.

    Structure

    -

    As described here, a wrapper +

    A wrapper type called __basic_file provides our abstraction layer for the std::filebuf classes. Nearly all decisions dealing with actual input and output must be made in __basic_file. @@ -539,8 +539,8 @@ like any other critical shared resource.

    The future

    -

    As already mentioned here, a - second choice is available for I/O implementations: libio. This is +

    A + second choice may be available for I/O implementations: libio. This is disabled by default, and in fact will not currently work due to other issues. It will be revisited, however.

    @@ -713,7 +713,7 @@

    The v2 library included non-standard extensions to construct std::filebufs from C stdio types such as FILE*s and POSIX file descriptors. - Today the recommended way to use stdio types with libstdc++-v3 + Today the recommended way to use stdio types with libstdc++ IOStreams is via the stdio_filebuf class (see below), but earlier releases provided slightly different mechanisms.

    diff --git a/libstdc++-v3/docs/html/Makefile b/libstdc++-v3/docs/html/Makefile deleted file mode 100644 index f75752e..0000000 --- a/libstdc++-v3/docs/html/Makefile +++ /dev/null @@ -1,37 +0,0 @@ - -PWD_COMMAND=$${PWDCMD-pwd} -MAKEINFO=makeinfo -INC=../../../gcc/doc/include - -all: documentation.html \ - faq/index.txt \ - 17_intro/confdeps.png \ - 17_intro/porting.html \ - 17_intro/porting-howto.html - -# chock full of GNUism, probably -documentation.html: $(wildcard */howto.html) - sed -n '1,/beginlist/p' $@ > tmp.top - sed -n '/endlist/,$$p' $@ > tmp.bottom - echo '
      ' > tmp.middle - for i in [0-9]*/howto.html; do \ - title=`grep 'h1 ' $$i |\ - sed 's=.*\(Chapter [[:digit:]]*\):[[:space:]]*\(.*\).*=\2 (\1)='` ;\ - awk -v file=$$i -v "title=$$title" -f makedoc.awk $$i >> tmp.middle ;\ - done - awk -v file=ext/howto.html -v "title=Extensions to the Standard Library"\ - -f makedoc.awk ext/howto.html >> tmp.middle ;\ - echo '
    ' >> tmp.middle - cat tmp.top tmp.middle tmp.bottom > $@ - rm tmp.top tmp.middle tmp.bottom - -faq/index.txt: faq/index.html - lynx -dump $< | sed "s%file://localhost`${PWD_COMMAND}`%..%" > $@ - -17_intro/porting.html: 17_intro/porting.texi - ${MAKEINFO} -I ${INC} --html --no-split $< -o $@ - -17_intro/confdeps.png: 17_intro/confdeps.dot - dot -Tpng -o $@ $< - -# vim:noet ts=4 diff --git a/libstdc++-v3/docs/html/abi.html b/libstdc++-v3/docs/html/abi.html deleted file mode 100644 index 59828e5..0000000 --- a/libstdc++-v3/docs/html/abi.html +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - - - - - Standard C++ Library ABI - - - - - - -

    C++ Standard Library ABI

    - -

    - The latest version of this document is always available at - - http://gcc.gnu.org/onlinedocs/libstdc++/abi.html. -

    - -

    - To the libstdc++-v3 homepage. -

    - - -
    -

    - The C++ interface -

    - -

    C++ applications often dependent on specific language support -routines, say for throwing exceptions, or catching exceptions, and -perhaps also dependent on features in the C++ Standard Library. -

    - -

    The C++ Standard Library has many include files, types defined in -those include files, specific named functions, and other behavior. The -text of these behaviors, as written in source include files, is called -the Application Programing Interface, or API. -

    - -

    Furthermore, C++ source that is compiled into object files is - transformed by the compiler: it arranges objects with specific - alignment and in a particular layout, mangling names according to a - well-defined algorithm, has specific arrangements for the support of - virtual functions, etc. These details are defined as the compiler - Application Binary Interface, or ABI. The GNU C++ compiler uses an - industry-standard C++ ABI starting with version 3. Details can be - found in the - ABI specification. -

    - -

    - The GNU C++ compiler, g++, has a compiler command line option to - switch between various different C++ ABIs. This explicit version - switch is the flag -fabi-version. In addition, some - g++ command line options may change the ABI as a side-effect of - use. Such flags include -fpack-struct and - -fno-exceptions, but include others: see the complete - list in the GCC manual under the heading Options - for Code Generation Conventions. -

    - -

    The configure options used when building a specific libstdc++ -version may also impact the resulting library ABI. The available -configure options, and their impact on the library ABI, are documented - -here. -

    - -

    Putting all of these ideas together results in the C++ Standard -library ABI, which is the compilation of a given library API by a -given compiler ABI. In a nutshell: -

    - - library API + compiler ABI = library ABI - -

    - The library ABI is mostly of interest for end-users who have - unresolved symbols and are linking dynamically to the C++ Standard - library, and who thus must be careful to compile their application - with a compiler that is compatible with the available C++ Standard - library binary. In this case, compatible is defined with the equation - above: given an application compiled with a given compiler ABI and - library API, it will work correctly with a Standard C++ Library - created with the same constraints. -

    - -

    - To use a specific version of the C++ ABI, one must use a - corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that - implements the C++ ABI in question. -

    - -

    - Versioning -

    - -

    The C++ interface has evolved throughout the history of the GNU -C++ toolchain. With each release, various details have been changed so -as to give distinct versions to the C++ interface. -

    - -
    - Goals of versioning -
    - -

    Extending existing, stable ABIs. Versioning gives subsequent stable -releases series libraries the ability to add new symbols and add -functionality, all the while retaining backwards compatibility with -the previous releases in the series. Note: the reverse is not true. It -is not possible to take binaries linked with the latest version of a -release series (if symbols have been added) and expect the initial -release of the series to remain link compatible. -

    - -

    Allows multiple, incompatible ABIs to coexist at the same time. -

    - -

    -

    - -
    - Version History -
    -

    - How can this complexity be managed? What does C++ versioning mean? - Because library and compiler changes often make binaries compiled - with one version of the GNU tools incompatible with binaries - compiled with other (either newer or older) versions of the same GNU - tools, specific techniques are used to make managing this complexity - easier. -

    - -

    - The following techniques are used: -

    - -
      - -
    • Release versioning on the libgcc_s.so binary. This is -implemented via file names and the ELF DT_SONAME mechanism (at least -on ELF systems).

      - -

      It is versioned as follows: -

      -
        -
      • gcc-3.0.0: libgcc_s.so.1
      • -
      • gcc-3.0.1: libgcc_s.so.1
      • -
      • gcc-3.0.2: libgcc_s.so.1
      • -
      • gcc-3.0.3: libgcc_s.so.1
      • -
      • gcc-3.0.4: libgcc_s.so.1
      • -
      • gcc-3.1.0: libgcc_s.so.1
      • -
      • gcc-3.1.1: libgcc_s.so.1
      • -
      • gcc-3.2.0: libgcc_s.so.1
      • -
      • gcc-3.2.1: libgcc_s.so.1
      • -
      • gcc-3.2.2: libgcc_s.so.1
      • -
      • gcc-3.2.3: libgcc_s.so.1
      • -
      • gcc-3.3.0: libgcc_s.so.1
      • -
      • gcc-3.3.1: libgcc_s.so.1
      • -
      • gcc-3.3.2: libgcc_s.so.1
      • -
      • gcc-3.3.3: libgcc_s.so.1
      • -
      • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: on m68k-linux and - hppa-linux this is either libgcc_s.so.1 (when configuring - --with-sjlj-exceptions) or libgcc_s.so.2. For all - others, this is libgcc_s.so.1.
      -

      -
    • - -
    • Symbol versioning on the libgcc_s.so binary. -

      mapfile: gcc/libgcc-std.ver

      - -

      It is versioned with the following labels and version - definitions, where the version definition is the maximum for a - particular release. Labels are cumulative. If a particular release - is not listed, it has the same version labels as the preceeding - release.

      -
        -
      • gcc-3.0.0: GCC_3.0
      • -
      • gcc-3.3.0: GCC_3.3
      • -
      • gcc-3.3.1: GCC_3.3.1
      • -
      • gcc-3.3.2: GCC_3.3.2
      • -
      • gcc-3.3.4: GCC_3.3.4
      • -
      • gcc-3.4.0: GCC_3.4
      • -
      • gcc-3.4.2: GCC_3.4.2
      • -
      • gcc-3.4.4: GCC_3.4.4
      • -
      • gcc-4.0.0: GCC_4.0.0
      • -
      • gcc-4.1.0: GCC_4.1.0
      • -
      • gcc-4.2.0: GCC_4.2.0
      • -
      -

      -
    • - -
    • Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above. - -

      It is versioned as follows: -

      -
        -
      • gcc-3.0.0: libstdc++.so.3.0.0
      • -
      • gcc-3.0.1: libstdc++.so.3.0.1
      • -
      • gcc-3.0.2: libstdc++.so.3.0.2
      • -
      • gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)
      • -
      • gcc-3.0.4: libstdc++.so.3.0.4
      • -
      • gcc-3.1.0: libstdc++.so.4.0.0
      • -
      • gcc-3.1.1: libstdc++.so.4.0.1
      • -
      • gcc-3.2.0: libstdc++.so.5.0.0
      • -
      • gcc-3.2.1: libstdc++.so.5.0.1
      • -
      • gcc-3.2.2: libstdc++.so.5.0.2
      • -
      • gcc-3.2.3: libstdc++.so.5.0.3 (Not strictly required)
      • -
      • gcc-3.3.0: libstdc++.so.5.0.4
      • -
      • gcc-3.3.1: libstdc++.so.5.0.5
      • -
      • gcc-3.3.2: libstdc++.so.5.0.5
      • -
      • gcc-3.3.3: libstdc++.so.5.0.5
      • -
      • gcc-3.4.0: libstdc++.so.6.0.0
      • -
      • gcc-3.4.1: libstdc++.so.6.0.1
      • -
      • gcc-3.4.2: libstdc++.so.6.0.2
      • -
      • gcc-3.4.3: libstdc++.so.6.0.3
      • -
      • gcc-3.4.4: libstdc++.so.6.0.3
      • -
      • gcc-3.4.5: libstdc++.so.6.0.3
      • -
      • gcc-3.4.6: libstdc++.so.6.0.3
      • -
      • gcc-4.0.0: libstdc++.so.6.0.4
      • -
      • gcc-4.0.1: libstdc++.so.6.0.5
      • -
      • gcc-4.0.2: libstdc++.so.6.0.6
      • -
      • gcc-4.0.3: libstdc++.so.6.0.7
      • -
      • gcc-4.1.0: libstdc++.so.6.0.7
      • -
      • gcc-4.1.1: libstdc++.so.6.0.8
      • -
      • gcc-4.1.2: libstdc++.so.6.0.8
      • -
      • gcc-4.2.0: libstdc++.so.6.0.9
      • -
      -

      -
    • - -
    • Symbol versioning on the libstdc++.so binary. - -

      mapfile: libstdc++-v3/config/linker-map.gnu

      -

      It is versioned with the following labels and version - definitions, where the version definition is the maximum for a - particular release. Note, only symbol which are newly introduced - will use the maximum version definition. Thus, for release series - with the same label, but incremented version definitions, the later - release has both versions. (An example of this would be the - gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and - GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0 - release.) If a particular release is not listed, it has the same - version labels as the preceeding release. -

      -
        -
      • gcc-3.0.0: (Error, not versioned)
      • -
      • gcc-3.0.1: (Error, not versioned)
      • -
      • gcc-3.0.2: (Error, not versioned)
      • -
      • gcc-3.0.3: (Error, not versioned)
      • -
      • gcc-3.0.4: (Error, not versioned)
      • -
      • gcc-3.1.0: GLIBCPP_3.1, CXXABI_1
      • -
      • gcc-3.1.1: GLIBCPP_3.1, CXXABI_1
      • -
      • gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2
      • -
      • gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2
      • -
      • gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2
      • -
      • gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2
      • -
      • gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1
      • -
      • gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1
      • -
      • gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1
      • -
      • gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1
      • -
      • gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3
      • -
      • gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3
      • -
      • gcc-3.4.2: GLIBCXX_3.4.2
      • -
      • gcc-3.4.3: GLIBCXX_3.4.3
      • -
      • gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1
      • -
      • gcc-4.0.1: GLIBCXX_3.4.5
      • -
      • gcc-4.0.2: GLIBCXX_3.4.6
      • -
      • gcc-4.0.3: GLIBCXX_3.4.7
      • -
      • gcc-4.1.1: GLIBCXX_3.4.8
      • -
      • gcc-4.2.0: GLIBCXX_3.4.9
      • -
      -

      -
    • - -
    • -

      Incremental bumping of a compiler pre-defined macro, - __GXX_ABI_VERSION. This macro is defined as the version of the - compiler v3 ABI, with g++ 3.0.x being version 100. This macro will - be automatically defined whenever g++ is used (the curious can - test this by invoking g++ with the '-v' flag.) -

      - -

      - This macro was defined in the file "lang-specs.h" in the gcc/cp directory. - Later versions defined it in "c-common.c" in the gcc directory, and from - G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the - '-fabi-version' command line option. -

      - -

      - It is versioned as follows, where 'n' is given by '-fabi-version=n': -

      -
        -
      • gcc-3.0.x: 100
      • -
      • gcc-3.1.x: 100 (Error, should be 101)
      • -
      • gcc-3.2.x: 102
      • -
      • gcc-3.3.x: 102
      • -
      • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 102 (when n=1)
      • -
      • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 1000 + n (when n>1)
      • -
      • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: 999999 (when n=0)
      • -
      -

      -
    • - -
    • -

      Changes to the default compiler option for - -fabi-version. -

      -

      - It is versioned as follows: -

      -
        -
      • gcc-3.0.x: (Error, not versioned)
      • -
      • gcc-3.1.x: (Error, not versioned)
      • -
      • gcc-3.2.x: -fabi-version=1
      • -
      • gcc-3.3.x: -fabi-version=1
      • -
      • gcc-3.4.x, gcc-4.0.x, gcc-4.1.x, gcc-4.2.x: -fabi-version=2
      • -
      -

      -
    • - -
    • -

      Incremental bumping of a library pre-defined macro. For releases - before 3.4.0, the macro is __GLIBCPP__. For later releases, it's - __GLIBCXX__. (The libstdc++ project generously changed from CPP to - CXX throughout its source to allow the "C" pre-processor the CPP - macro namespace.) These macros are defined as the date the library - was released, in compressed ISO date format, as an unsigned long. -

      - -

      - This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory. (Up to gcc-4.1.0, it was - changed every night by an automated script. Since gcc-4.1.0, it is - the same value as gcc/DATESTAMP.) -

      -

      - It is versioned as follows: -

      -
        -
      • gcc-3.0.0: 20010615
      • -
      • gcc-3.0.1: 20010819
      • -
      • gcc-3.0.2: 20011023
      • -
      • gcc-3.0.3: 20011220
      • -
      • gcc-3.0.4: 20020220
      • -
      • gcc-3.1.0: 20020514
      • -
      • gcc-3.1.1: 20020725
      • -
      • gcc-3.2.0: 20020814
      • -
      • gcc-3.2.1: 20021119
      • -
      • gcc-3.2.2: 20030205
      • -
      • gcc-3.2.3: 20030422
      • -
      • gcc-3.3.0: 20030513
      • -
      • gcc-3.3.1: 20030804
      • -
      • gcc-3.3.2: 20031016
      • -
      • gcc-3.3.3: 20040214
      • -
      • gcc-3.4.0: 20040419
      • -
      • gcc-3.4.1: 20040701
      • -
      • gcc-3.4.2: 20040906
      • -
      • gcc-3.4.3: 20041105
      • -
      • gcc-3.4.4: 20050519
      • -
      • gcc-3.4.5: 20051201
      • -
      • gcc-3.4.6: 20060306
      • -
      • gcc-4.0.0: 20050421
      • -
      • gcc-4.0.1: 20050707
      • -
      • gcc-4.0.2: 20050921
      • -
      • gcc-4.0.3: 20060309
      • -
      • gcc-4.1.0: 20060228
      • -
      • gcc-4.1.1: 20060524
      • -
      • gcc-4.1.2: 20070214
      • -
      • gcc-4.2.0: 20070514
      • -
      -

      -
    • - -
    • -

      - Incremental bumping of a library pre-defined macro, - _GLIBCPP_VERSION. This macro is defined as the released version of - the library, as a string literal. This is only implemented in - gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it - is called _GLIBCXX_VERSION). -

      - -

      - This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory and is generated - automatically by autoconf as part of the configure-time generation - of config.h. -

      - -

      - It is versioned as follows: -

      -
        -
      • gcc-3.0.0: "3.0.0"
      • -
      • gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")
      • -
      • gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")
      • -
      • gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")
      • -
      • gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")
      • -
      • gcc-3.1.0: "3.1.0"
      • -
      • gcc-3.1.1: "3.1.1"
      • -
      • gcc-3.2.0: "3.2"
      • -
      • gcc-3.2.1: "3.2.1"
      • -
      • gcc-3.2.2: "3.2.2"
      • -
      • gcc-3.2.3: "3.2.3"
      • -
      • gcc-3.3.0: "3.3"
      • -
      • gcc-3.3.1: "3.3.1"
      • -
      • gcc-3.3.2: "3.3.2"
      • -
      • gcc-3.3.3: "3.3.3"
      • -
      • gcc-3.4.x: "version-unused"
      • -
      • gcc-4.0.x: "version-unused"
      • -
      • gcc-4.1.x: "version-unused"
      • -
      • gcc-4.2.x: "version-unused"
      • -
      -

      -
    • - -
    • -

      - Matching each specific C++ compiler release to a specific set of - C++ include files. This is only implemented in gcc-3.1.1 releases - and higher. -

      -

      - All C++ includes are installed in include/c++, then nest in a - directory hierarchy corresponding to the C++ compiler's released - version. This version corresponds to the variable "gcc_version" in - "libstdc++-v3/acinclude.m4," and more details can be found in that - file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0). -

      -

      - C++ includes are versioned as follows: -

      -
        -
      • gcc-3.0.0: include/g++-v3
      • -
      • gcc-3.0.1: include/g++-v3
      • -
      • gcc-3.0.2: include/g++-v3
      • -
      • gcc-3.0.3: include/g++-v3
      • -
      • gcc-3.0.4: include/g++-v3
      • -
      • gcc-3.1.0: include/g++-v3
      • -
      • gcc-3.1.1: include/c++/3.1.1
      • -
      • gcc-3.2.0: include/c++/3.2
      • -
      • gcc-3.2.1: include/c++/3.2.1
      • -
      • gcc-3.2.2: include/c++/3.2.2
      • -
      • gcc-3.2.3: include/c++/3.2.3
      • -
      • gcc-3.3.0: include/c++/3.3
      • -
      • gcc-3.3.1: include/c++/3.3.1
      • -
      • gcc-3.3.2: include/c++/3.3.2
      • -
      • gcc-3.3.3: include/c++/3.3.3
      • -
      • gcc-3.4.0: include/c++/3.4.0
      • -
      • gcc-3.4.1: include/c++/3.4.1
      • -
      • gcc-3.4.2: include/c++/3.4.2
      • -
      • gcc-3.4.3: include/c++/3.4.3
      • -
      • gcc-3.4.4: include/c++/3.4.4
      • -
      • gcc-3.4.5: include/c++/3.4.5
      • -
      • gcc-3.4.6: include/c++/3.4.6
      • -
      • gcc-4.0.0: include/c++/4.0.0
      • -
      • gcc-4.0.1: include/c++/4.0.1
      • -
      • gcc-4.0.2: include/c++/4.0.2
      • -
      • gcc-4.0.3: include/c++/4.0.3
      • -
      • gcc-4.1.0: include/c++/4.1.0
      • -
      • gcc-4.1.1: include/c++/4.1.1
      • -
      • gcc-4.1.2: include/c++/4.1.2
      • -
      • gcc-4.2.0: include/c++/4.2.0
      • -
      -

      -
    • -
    -

    - Taken together, these techniques can accurately specify interface - and implementation changes in the GNU C++ tools themselves. Used - properly, they allow both the GNU C++ tools implementation, and - programs using them, an evolving yet controlled development that - maintains backward compatibility. -

    - - - -
    - Minimum requirements for a versioned ABI -
    -

    - Minimum environment that supports a versioned ABI: A supported - dynamic linker, a GNU linker of sufficient vintage to understand - demangled C++ name globbing (ld), a shared executable compiled with - g++, and shared libraries (libgcc_s, libstdc++-v3) compiled by a - compiler (g++) with a compatible ABI. Phew. -

    - -

    - On top of all that, an additional constraint: libstdc++ did not - attempt to version symbols (or age gracefully, really) until version - 3.1.0. -

    - -

    - Most modern Linux and BSD versions, particularly ones using - gcc-3.1.x tools and more recent vintages, will meet the requirements above. -

    - - -
    - What configure options impact symbol versioning? -
    -

    - It turns out that most of the configure options that change default - behavior will impact the mangled names of exported symbols, and thus - impact versioning and compatibility. -

    - -

    - For more information on configure options, including ABI impacts, see: - http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html -

    - -

    - There is one flag that explicitly deals with symbol versioning: - --enable-symvers. -

    - -

    - In particular, libstdc++-v3/acinclude.m4 has a macro called - GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed - in via --enable-symvers=foo). At that point, the macro attempts to - make sure that all the requirement for symbol versioning are in - place. For more information, please consult acinclude.m4. -

    - - -
    - How to tell if symbol versioning is, indeed, active? -
    -

    - When the GNU C++ library is being built with symbol versioning on, - you should see the following at configure time for libstdc++-v3: -

    - - - checking versioning on shared library symbols... gnu - -

    - If you don't see this line in the configure output, or if this line - appears but the last word is 'no', then you are out of luck. -

    - -

    - If the compiler is pre-installed, a quick way to test is to compile - the following (or any) simple C++ file and link it to the shared - libstdc++ library: -

    - -
    -#include <iostream>
    -
    -int main()
    -{ std::cout << "hello" << std::endl; return 0; }
    -
    -%g++ hello.cc -o hello.out
    -
    -%ldd hello.out
    -        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00764000)
    -        libm.so.6 => /lib/tls/libm.so.6 (0x004a8000)
    -        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
    -        libc.so.6 => /lib/tls/libc.so.6 (0x0036d000)
    -        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    -
    -%nm hello.out
    -
    - -

    -If you see symbols in the resulting output with "GLIBCXX_3" as part -of the name, then the executable is versioned. Here's an example: -

    - - U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4 - -

    - Library allowed ABI changes -

    -

    -The following will cause the library minor version number to -increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5". -

    -
      -
    • adding an exported global or static data member
    • -
    • adding an exported function, static or non-virtual member function
    • -
    • adding an exported symbol or symbols by additional instantiations
    • -
    -

    -

    -

    -Other allowed changes are possible. -

    - - -

    - Library disallowed ABI changes -

    - -

    -The following non-exhaustive list will cause the library major version -number to increase, say from "libstdc++.so.3.0.4" to -"libstdc++.so.4.0.0". -

    -
      -
    • changes in the gcc/g++ compiler ABI
    • -
    • changing size of an exported symbol
    • -
    • changing alignment of an exported symbol
    • -
    • changing the layout of an exported symbol
    • -
    • changing mangling on an exported symbol
    • -
    • deleting an exported symbol
    • -
    • changing the inheritance properties of a type by adding or removing - base classes
    • -
    • - changing the size, alignment, or layout of types - specified in the C++ standard. These may not necessarily be - instantiated or otherwise exported in the library binary, and - include all the required locale facets, as well as things like - std::basic_streambuf, et al. -
    • - -
    • adding an explicit copy constructor or destructor to a -class that would otherwise have implicit versions. This will change -the way the compiler deals with this class in by-value return -statements or parameters: instead of being passing instances of this -class in registers, the compiler will be forced to use memory. See this part - of the C++ ABI documentation for further details. -
    • - -
    - -

    - Library implementation strategy

    - -
      -
    • Separation of interface and implementation -

      This is accomplished by two techniques that separate the API from -the ABI: forcing undefined references to link against a library binary -for definitions. -

      - -
      -
      Include files have declarations, source files have defines
      - -
      For non-templatized types, such as much of class - locale, the appropriate standard C++ include, say - locale, can contain full declarations, while various - source files (say locale.cc, locale_init.cc, - localename.cc) contain definitions.
      - -
      Extern template on required types
      - -
      For parts of the standard that have an explicit list of required - instantiations, the GNU extension syntax extern template - can be used to control where template definitions - reside. By marking required instantiations as extern - template in include files, and providing explicit - instantiations in the appropriate instantiation files, non-inlined - template functions can be versioned. This technique is mostly used - on parts of the standard that require char and - wchar_t instantiations, and includes - basic_string, the locale facets, and the types in - iostreams.
      - -
      -

      In addition, these techniques have the additional benefit that - they reduce binary size, which can increase runtime performance. -

      -
    • - -
    • Namespaces linking symbol definitions to export mapfiles - -

      All symbols in the shared library binary are processed by a linker -script at build time that either allows or disallows external -linkage. Because of this, some symbols, regardless of normal C/C++ -linkage, are not visible. Symbols that are internal have several -appealing characteristics: by not exporting the symbols, there are no -relocations when the shared library is started and thus this makes for -faster runtime loading performance by the underlying dynamic loading -mechanism. In addition, they have the possibility of changing without -impacting ABI compatibility. -

      - -

      The following namespaces are transformed by the mapfile:

      - -
      -
      namespace std
      -
      Defaults to exporting all symbols in label -GLIBCXX that do not begin with an underscore, ie -__test_func would not be exported by default. Select -exceptional symbols are allowed to be visible.
      - -
      namespace __gnu_cxx
      -
      Defaults to not exporting any symbols in label -GLIBCXX, select items are allowed to be visible.
      - -
      namespace __gnu_internal
      -
      Defaults to not exported, no items are allowed to be visible.
      - -
      namespace __cxxabiv1, aliased to namespace abi
      -
      Defaults to not exporting any symbols in label -CXXABI, select items are allowed to be visible.
      -
      -

      -

      -
    • - -
    • Freezing the API -

      Disallowed changes, as above, are not made on a stable release -branch. Enforcement tends to be less strict with GNU extensions that -standard includes.

      -
    • -
    - -

    - Testing ABI changes -

    - -

    -Testing for GNU C++ ABI changes is composed of two distinct areas: -testing the C++ compiler (g++) for compiler changes, and testing the -C++ library (libstdc++) for library changes. -

    - -

    -Testing the C++ compiler ABI can be done various ways. -

    - -

    -One. -Intel ABI checker. More information can be obtained -here. -

    - -

    -Two. -The second is yet unreleased, but has been announced on the gcc -mailing list. It is yet unspecified if these tools will be freely -available, and able to be included in a GNU project. Please contact -Mark Mitchell (mark@codesourcery.com) for more details, and current -status. -

    - -

    -Three. -Involves using the vlad.consistency test framework. This has also been -discussed on the gcc mailing lists. -

    - -

    -Testing the C++ library ABI can also be done various ways. -

    - -

    -One. -(Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways, -one with a new compiler and an old library, and the other with an old -compiler and a new library, and look for testsuite regressions) -

    - -

    -Details on how to set this kind of test up can be found here: -http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html -

    - -

    -Two. -Use the 'make check-abi' rule in the libstdc++-v3 Makefile. -

    - -

    -This is a proactive check the library ABI. Currently, exported symbol -names that are either weak or defined are checked against a last known -good baseline. Currently, this baseline is keyed off of 3.4.0 -binaries, as this was the last time the .so number was incremented. In -addition, all exported names are demangled, and the exported objects -are checked to make sure they are the same size as the same object in -the baseline. - -Notice that each baseline is relative to a default -configured library and compiler: in particular, if options such as ---enable-clocale, or --with-cpu, in case of multilibs, are used at -configure time, the check may fail, either because of substantive -differences or because of limitations of the current checking -machinery. -

    - -

    -This dataset is insufficient, yet a start. Also needed is a -comprehensive check for all user-visible types part of the standard -library for sizeof() and alignof() changes. -

    - -

    -Verifying compatible layouts of objects is not even attempted. It -should be possible to use sizeof, alignof, and offsetof to compute -offsets for each structure and type in the standard library, saving to -another datafile. Then, compute this in a similar way for new -binaries, and look for differences. -

    - -

    -Another approach might be to use the -fdump-class-hierarchy flag to -get information. However, currently this approach gives insufficient -data for use in library testing, as class data members, their offsets, -and other detailed data is not displayed with this flag. -(See g++/7470 on how this was used to find bugs.) -

    - -

    -Perhaps there are other C++ ABI checkers. If so, please notify -us. We'd like to know about them! -

    - -

    - Testing Multi-ABI binaries -

    - -

    -A "C" application, dynamically linked to two shared libraries, liba, -libb. The dependent library liba is C++ shared library compiled with -gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library -libb is a C++ shared library compiled with gcc-3.4.x, and also uses io, -exceptions, locale, etc. -

    - -

    As above, libone is constructed as follows:

    -
    -%$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
    -
    -%$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
    -
    -%ln -s libone.so.1.0.0 libone.so
    -
    -%$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
    -
    -%ar cru libone.a a.o 
    -
    - -

    And, libtwo is constructed as follows:

    - -
    -%$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
    -
    -%$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
    -
    -%ln -s libtwo.so.1.0.0 libtwo.so
    -
    -%$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
    -
    -%ar cru libtwo.a b.o 
    -
    - -

    ...with the resulting libraries looking like

    -
    -%ldd libone.so.1.0.0
    -        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40016000)
    -        libm.so.6 => /lib/tls/libm.so.6 (0x400fa000)
    -        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
    -        libc.so.6 => /lib/tls/libc.so.6 (0x40125000)
    -        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    -
    -%ldd libtwo.so.1.0.0
    -        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40027000)
    -        libm.so.6 => /lib/tls/libm.so.6 (0x400e1000)
    -        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
    -        libc.so.6 => /lib/tls/libc.so.6 (0x4010c000)
    -        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    -
    -
    - -

    Then, the "C" compiler is used to compile a source file that uses -functions from each library.

    -
    -gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
    -
    - -

    -Which gives the expected: -

    -
    -%ldd a.out
    -        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00764000)
    -        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40015000)
    -        libc.so.6 => /lib/tls/libc.so.6 (0x0036d000)
    -        libm.so.6 => /lib/tls/libm.so.6 (0x004a8000)
    -        libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
    -        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    -
    - -

    -This resulting binary, when executed, will be able to safely use code -from both liba, and the dependent libstdc++.so.6, and libb, with the -dependent libstdc++.so.5. -

    - - -

    - Outstanding Issues -

    - -

    Some features in the C++ language make versioning especially -difficult. In particular, compiler generated constructs such as -implicit instantiations for templates, typeinfo information, and -virtual tables all may cause ABI leakage across shared library -boundaries. Because of this, mixing C++ ABI's is not recommended at -this time. -

    - -

    For more background on this issue, see these bugzilla entries:

    - -

    -24660: versioning weak symbols in libstdc++ -

    - -

    -19664: libstdc++ headers should have pop/push of the visibility around the declarations -

    - -

    - Bibliography / Further Reading -

    - -

    -ABIcheck, a vague idea of checking ABI compatibility -
    -http://abicheck.sourceforge.net/ -

    - -

    -C++ ABI reference -
    -http://www.codesourcery.com/cxx-abi/ -

    - -

    -Intel ABI documentation, "Intel® Compilers for Linux* -Compatibility with the GNU Compilers" -
    -http://developer.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm -

    - -

    -Sun Solaris 2.9 docs -
    -Linker and Libraries Guide (document 816-1386) -
    -C++ Migration Guide (document 816-2459) -
    -http://docs.sun.com/db/prod/solaris.9 -
    -http://docs.sun.com/?p=/doc/816-1386&a=load -

    - -

    -Ulrich Drepper, "ELF Symbol Versioning" -
    -http://people.redhat.com/drepper/symbol-versioning -

    - -

    -C++ ABI for the ARM Architecture -
    -http://www.arm.com/miscPDFs/8033.pdf -

    - -

    -Benjamin Kosnik, ISO C++ J16/06-0046 -
    -Dynamic Shared Objects: Survey and Issues -

    - -

    -Benjamin Kosnik, ISO C++ J16/06-0083 -
    -Versioning With Namespaces -

    - - - - diff --git a/libstdc++-v3/docs/html/configopts.html b/libstdc++-v3/docs/html/configopts.html index 215a1ab..c830a99 100644 --- a/libstdc++-v3/docs/html/configopts.html +++ b/libstdc++-v3/docs/html/configopts.html @@ -6,10 +6,10 @@ - - + + - libstdc++-v3 configure options + libstdc++ configure options @@ -25,7 +25,7 @@ options

- To the libstdc++-v3 homepage. + To the libstdc++ homepage.

@@ -94,8 +94,7 @@ options
--enable-cstdio=OPTION

Select a target-specific I/O package. At the moment, the only choice is to use 'stdio', a generic "C" abstraction. - The default is 'stdio'. A longer explanation is here. + The default is 'stdio'.

diff --git a/libstdc++-v3/docs/html/debug.html b/libstdc++-v3/docs/html/debug.html index 60e8418..6e0369b 100644 --- a/libstdc++-v3/docs/html/debug.html +++ b/libstdc++-v3/docs/html/debug.html @@ -24,7 +24,7 @@

- To the libstdc++-v3 homepage. + To the libstdc++ homepage.

diff --git a/libstdc++-v3/docs/html/debug_mode.html b/libstdc++-v3/docs/html/debug_mode.html deleted file mode 100644 index 44d471f..0000000 --- a/libstdc++-v3/docs/html/debug_mode.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - - - - Design of the libstdc++ debug mode - - - - -

Design of the libstdc++ debug mode

- -

- The latest version of this document is always available at - - http://gcc.gnu.org/onlinedocs/libstdc++/debug_mode.html. -

- -

- To the libstdc++-v3 homepage. -

- - - - -
-

Debug mode design

-

The libstdc++ debug mode replaces unsafe (but efficient) standard - containers and iterators with semantically equivalent safe standard - containers and iterators to aid in debugging user programs. The - following goals directed the design of the libstdc++ debug mode:

- -
    - -
  • Correctness: the libstdc++ debug mode must not change - the semantics of the standard library for all cases specified in - the ANSI/ISO C++ standard. The essence of this constraint is that - any valid C++ program should behave in the same manner regardless - of whether it is compiled with debug mode or release mode. In - particular, entities that are defined in namespace std in release - mode should remain defined in namespace std in debug mode, so that - legal specializations of namespace std entities will remain - valid. A program that is not valid C++ (e.g., invokes undefined - behavior) is not required to behave similarly, although the debug - mode will abort with a diagnostic when it detects undefined - behavior.
  • - -
  • Performance: the additional of the libstdc++ debug mode - must not affect the performance of the library when it is compiled - in release mode. Performance of the libstdc++ debug mode is - secondary (and, in fact, will be worse than the release - mode).
  • - -
  • Usability: the libstdc++ debug mode should be easy to - use. It should be easily incorporated into the user's development - environment (e.g., by requiring only a single new compiler switch) - and should produce reasonable diagnostics when it detects a - problem with the user program. Usability also involves detection - of errors when using the debug mode incorrectly, e.g., by linking - a release-compiled object against a debug-compiled object if in - fact the resulting program will not run correctly.
  • - -
  • Minimize recompilation: While it is expected that - users recompile at least part of their program to use debug - mode, the amount of recompilation affects the - detect-compile-debug turnaround time. This indirectly affects the - usefulness of the debug mode, because debugging some applications - may require rebuilding a large amount of code, which may not be - feasible when the suspect code may be very localized. There are - several levels of conformance to this requirement, each with its - own usability and implementation characteristics. In general, the - higher-numbered conformance levels are more usable (i.e., require - less recompilation) but are more complicated to implement than - the lower-numbered conformance levels. -
      -
    1. Full recompilation: The user must recompile his or - her entire application and all C++ libraries it depends on, - including the C++ standard library that ships with the - compiler. This must be done even if only a small part of the - program can use debugging features.
    2. - -
    3. Full user recompilation: The user must recompile - his or her entire application and all C++ libraries it depends - on, but not the C++ standard library itself. This must be done - even if only a small part of the program can use debugging - features. This can be achieved given a full recompilation - system by compiling two versions of the standard library when - the compiler is installed and linking against the appropriate - one, e.g., a multilibs approach.
    4. - -
    5. Partial recompilation: The user must recompile the - parts of his or her application and the C++ libraries it - depends on that will use the debugging facilities - directly. This means that any code that uses the debuggable - standard containers would need to be recompiled, but code - that does not use them (but may, for instance, use IOStreams) - would not have to be recompiled.
    6. - -
    7. Per-use recompilation: The user must recompile the - parts of his or her application and the C++ libraries it - depends on where debugging should occur, and any other code - that interacts with those containers. This means that a set of - translation units that accesses a particular standard - container instance may either be compiled in release mode (no - checking) or debug mode (full checking), but must all be - compiled in the same way; a translation unit that does not see - that standard container instance need not be recompiled. This - also means that a translation unit A that contains a - particular instantiation - (say, std::vector<int>) compiled in release - mode can be linked against a translation unit B that - contains the same instantiation compiled in debug mode (a - feature not present with partial recompilation). While this - behavior is technically a violation of the One Definition - Rule, this ability tends to be very important in - practice. The libstdc++ debug mode supports this level of - recompilation.
    8. - -
    9. Per-unit recompilation: The user must only - recompile the translation units where checking should occur, - regardless of where debuggable standard containers are - used. This has also been dubbed "-g mode", - because the -g compiler switch works in this way, - emitting debugging information at a per--translation-unit - granularity. We believe that this level of recompilation is in - fact not possible if we intend to supply safe iterators, leave - the program semantics unchanged, and not regress in - performance under release mode because we cannot associate - extra information with an iterator (to form a safe iterator) - without either reserving that space in release mode - (performance regression) or allocating extra memory associated - with each iterator with new (changes the program - semantics).
    10. -
    -
  • -
- -

Other implementations

-

There are several existing implementations of debug modes for C++ - standard library implementations, although none of them directly - supports debugging for programs using libstdc++. The existing - implementations include:

-
    -
  • SafeSTL: - SafeSTL was the original debugging version of the Standard Template - Library (STL), implemented by Cay S. Horstmann on top of the - Hewlett-Packard STL. Though it inspired much work in this area, it - has not been kept up-to-date for use with modern compilers or C++ - standard library implementations.
  • - -
  • STLport: STLport is a free - implementation of the C++ standard library derived from the SGI implementation, and - ported to many other platforms. It includes a debug mode that uses a - wrapper model (that in some way inspired the libstdc++ debug mode - design), although at the time of this writing the debug mode is - somewhat incomplete and meets only the "Full user recompilation" (2) - recompilation guarantee by requiring the user to link against a - different library in debug mode vs. release mode.
  • - -
  • Metrowerks - CodeWarrior: The C++ standard library that ships with Metrowerks - CodeWarrior includes a debug mode. It is a full debug-mode - implementation (including debugging for CodeWarrior extensions) and - is easy to use, although it meets only the "Full recompilation" (1) - recompilation guarantee.
  • -
- -

Debug mode design methodology

-

This section provides an overall view of the design of the - libstdc++ debug mode and details the relationship between design - decisions and the stated design goals.

- -

The wrapper model

-

The libstdc++ debug mode uses a wrapper model where the debugging - versions of library components (e.g., iterators and containers) form - a layer on top of the release versions of the library - components. The debugging components first verify that the operation - is correct (aborting with a diagnostic if an error is found) and - will then forward to the underlying release-mode container that will - perform the actual work. This design decision ensures that we cannot - regress release-mode performance (because the release-mode - containers are left untouched) and partially enables mixing debug and release code at link time, - although that will not be discussed at this time.

- -

Two types of wrappers are used in the implementation of the debug - mode: container wrappers and iterator wrappers. The two types of - wrappers interact to maintain relationships between iterators and - their associated containers, which are necessary to detect certain - types of standard library usage errors such as dereferencing - past-the-end iterators or inserting into a container using an - iterator from a different container.

- -

Safe iterators

-

Iterator wrappers provide a debugging layer over any iterator that - is attached to a particular container, and will manage the - information detailing the iterator's state (singular, - dereferenceable, etc.) and tracking the container to which the - iterator is attached. Because iterators have a well-defined, common - interface the iterator wrapper is implemented with the iterator - adaptor class template __gnu_debug::_Safe_iterator, - which takes two template parameters:

- -
    -
  • Iterator: The underlying iterator type, which must - be either the iterator or const_iterator - typedef from the sequence type this iterator can reference.
  • - -
  • Sequence: The type of sequence that this iterator - references. This sequence must be a safe sequence (discussed below) - whose iterator or const_iterator typedef - is the type of the safe iterator.
  • -
- -

Safe sequences (containers)

-

Container wrappers provide a debugging layer over a particular - container type. Because containers vary greatly in the member - functions they support and the semantics of those member functions - (especially in the area of iterator invalidation), container - wrappers are tailored to the container they reference, e.g., the - debugging version of std::list duplicates the entire - interface of std::list, adding additional semantic - checks and then forwarding operations to the - real std::list (a public base class of the debugging - version) as appropriate. However, all safe containers inherit from - the class template __gnu_debug::_Safe_sequence, - instantiated with the type of the safe container itself (an instance - of the curiously recurring template pattern).

- -

The iterators of a container wrapper will be - safe iterators that reference sequences - of this type and wrap the iterators provided by the release-mode - base class. The debugging container will use only the safe - iterators within its own interface (therefore requiring the user to - use safe iterators, although this does not change correct user - code) and will communicate with the release-mode base class with - only the underlying, unsafe, release-mode iterators that the base - class exports.

- -

The debugging version of std::list will have the - following basic structure:

- -
-template<typename _Tp, typename _Allocator = allocator<_Tp>
-  class debug-list :
-    public release-list<_Tp, _Allocator>,
-    public __gnu_debug::_Safe_sequence<debug-list<_Tp, _Allocator> >
-  {
-    typedef release-list<_Tp, _Allocator> _Base;
-    typedef debug-list<_Tp, _Allocator>   _Self;
-
-  public:
-    typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, _Self>       iterator;
-    typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, _Self> const_iterator;
-
-    // duplicate std::list interface with debugging semantics
-  };
-
- -

Precondition checking

-

The debug mode operates primarily by checking the preconditions of - all standard library operations that it supports. Preconditions that - are always checked (regardless of whether or not we are in debug - mode) are checked via the __check_xxx macros defined - and documented in the source - file include/debug/debug.h. Preconditions that may or - may not be checked, depending on the debug-mode - macro _GLIBCXX_DEBUG, are checked via - the __requires_xxx macros defined and documented in the - same source file. Preconditions are validated using any additional - information available at run-time, e.g., the containers that are - associated with a particular iterator, the position of the iterator - within those containers, the distance between two iterators that may - form a valid range, etc. In the absence of suitable information, - e.g., an input iterator that is not a safe iterator, these - precondition checks will silently succeed.

- -

The majority of precondition checks use the aforementioned macros, - which have the secondary benefit of having prewritten debug - messages that use information about the current status of the - objects involved (e.g., whether an iterator is singular or what - sequence it is attached to) along with some static information - (e.g., the names of the function parameters corresponding to the - objects involved). When not using these macros, the debug mode uses - either the debug-mode assertion - macro _GLIBCXX_DEBUG_ASSERT , its pedantic - cousin _GLIBCXX_DEBUG_PEDASSERT, or the assertion - check macro that supports more advance formulation of error - messages, _GLIBCXX_DEBUG_VERIFY. These macros are - documented more thoroughly in the debug mode source code.

- -

Release- and debug-mode coexistence

-

The libstdc++ debug mode is the first debug mode we know of that - is able to provide the "Per-use recompilation" (4) guarantee, that - allows release-compiled and debug-compiled code to be linked and - executed together without causing unpredictable behavior. This - guarantee minimizes the recompilation that users are required to - perform, shortening the detect-compile-debug bughunting cycle - and making the debug mode easier to incorporate into development - environments by minimizing dependencies.

- -

Achieving link- and run-time coexistence is not a trivial - implementation task. To achieve this goal we required a small - extension to the GNU C++ compiler (described in the GCC Manual for - C++ Extensions, see strong - using), and a complex organization of debug- and - release-modes. The end result is that we have achieved per-use - recompilation but have had to give up some checking of the - std::basic_string class template (namely, safe - iterators). -

- -

Compile-time coexistence of release- and - debug-mode components

-

Both the release-mode components and the debug-mode - components need to exist within a single translation unit so that - the debug versions can wrap the release versions. However, only one - of these components should be user-visible at any particular - time with the standard name, e.g., std::list.

- -

In release mode, we define only the release-mode version of the - component with its standard name and do not include the debugging - component at all. The release mode version is defined within the - namespace std. Minus the namespace associations, this - method leaves the behavior of release mode completely unchanged from - its behavior prior to the introduction of the libstdc++ debug - mode. Here's an example of what this ends up looking like, in - C++.

- -
-namespace std
-{
-  template<typename _Tp, typename _Alloc = allocator<_Tp> >
-    class list
-    {
-      // ...
-     };
-} // namespace std
-
- -

In debug mode we include the release-mode container (which is now -defined in in the namespace __norm) and also the -debug-mode container. The debug-mode container is defined within the -namespace __debug, which is associated with namespace -std via the GNU namespace association extension. This -method allows the debug and release versions of the same component to -coexist at compile-time and link-time without causing an unreasonable -maintenance burden, while minimizing confusion. Again, this boils down -to C++ code as follows:

- -
-namespace std
-{
-  namespace __norm
-  {
-    template<typename _Tp, typename _Alloc = allocator<_Tp> >
-      class list
-      {
-        // ...
-      };
-  } // namespace __gnu_norm
-
-  namespace __debug
-  {
-    template<typename _Tp, typename _Alloc = allocator<_Tp> >
-      class list
-      : public __norm::list<_Tp, _Alloc>,
-        public __gnu_debug::_Safe_sequence<list<_Tp, _Alloc> >
-      {
-        // ...
-      };
-  } // namespace __norm
-
-  using namespace __debug __attribute__ ((strong));
-}
-
- -

Link- and run-time coexistence of release- and - debug-mode components

- -

Because each component has a distinct and separate release and -debug implementation, there are are no issues with link-time -coexistence: the separate namespaces result in different mangled -names, and thus unique linkage.

- -

However, components that are defined and used within the C++ -standard library itself face additional constraints. For instance, -some of the member functions of std::moneypunct return -std::basic_string. Normally, this is not a problem, but -with a mixed mode standard library that could be using either -debug-mode or release-mode basic_string objects, things -get more complicated. As the return value of a function is not -encoded into the mangled name, there is no way to specify a -release-mode or a debug-mode string. In practice, this results in -runtime errors. A simplified example of this problem is as follows. -

- -

Take this translation unit, compiled in debug-mode:

-
-// -D_GLIBCXX_DEBUG
-#include <string>
-
-std::string test02();
- 
-std::string test01()
-{
-  return test02();
-}
- 
-int main()
-{
-  test01();
-  return 0;
-}
-
- -

... and linked to this translation unit, compiled in release mode:

- -
-#include <string>
- 
-std::string
-test02()
-{
-  return std::string("toast");
-}
-
- -

For this reason we cannot easily provide safe iterators for - the std::basic_string class template, as it is present - throughout the C++ standard library. For instance, locale facets - define typedefs that include basic_string: in a mixed - debug/release program, should that typedef be based on the - debug-mode basic_string or the - release-mode basic_string? While the answer could be - "both", and the difference hidden via renaming a la the - debug/release containers, we must note two things about locale - facets:

- -
    -
  1. They exist as shared state: one can create a facet in one - translation unit and access the facet via the same type name in a - different translation unit. This means that we cannot have two - different versions of locale facets, because the types would not be - the same across debug/release-mode translation unit barriers.
  2. - -
  3. They have virtual functions returning strings: these functions - mangle in the same way regardless of the mangling of their return - types (see above), and their precise signatures can be relied upon - by users because they may be overridden in derived classes.
  4. -
- -

With the design of libstdc++ debug mode, we cannot effectively hide - the differences between debug and release-mode strings from the - user. Failure to hide the differences may result in unpredictable - behavior, and for this reason we have opted to only - perform basic_string changes that do not require ABI - changes. The effect on users is expected to be minimal, as there are - simple alternatives (e.g., __gnu_debug::basic_string), - and the usability benefit we gain from the ability to mix debug- and - release-compiled translation units is enormous.

- -

Alternatives for Coexistence

-

The coexistence scheme above was chosen over many alternatives, - including language-only solutions and solutions that also required - extensions to the C++ front end. The following is a partial list of - solutions, with justifications for our rejection of each.

- -
    -
  • Completely separate debug/release libraries: This is by - far the simplest implementation option, where we do not allow any - coexistence of debug- and release-compiled translation units in a - program. This solution has an extreme negative affect on usability, - because it is quite likely that some libraries an application - depends on cannot be recompiled easily. This would not meet - our usability or minimize recompilation criteria - well.
  • - -
  • Add a Debug boolean template parameter: - Partial specialization could be used to select the debug - implementation when Debug == true, and the state - of _GLIBCXX_DEBUG could decide whether the - default Debug argument is true - or false. This option would break conformance with the - C++ standard in both debug and release modes. This would - not meet our correctness criteria.
  • - -
  • Packaging a debug flag in the allocators: We could - reuse the Allocator template parameter of containers - by adding a sentinel wrapper debug<> that - signals the user's intention to use debugging, and pick up - the debug<> allocator wrapper in a partial - specialization. However, this has two drawbacks: first, there is a - conformance issue because the default allocator would not be the - standard-specified std::allocator<T>. Secondly - (and more importantly), users that specify allocators instead of - implicitly using the default allocator would not get debugging - containers. Thus this solution fails the correctness - criteria.
  • - -
  • Define debug containers in another namespace, and employ - a using declaration (or directive): This is an - enticing option, because it would eliminate the need for - the link_name extension by aliasing the - templates. However, there is no true template aliasing mechanism - is C++, because both using directives and using - declarations disallow specialization. This method fails - the correctness criteria.
  • - -
  • Use implementation-specific properties of anonymous - namespaces. - See this post - - This method fails the correctness criteria.
  • - -
  • Extension: allow reopening on namespaces: This would - allow the debug mode to effectively alias the - namespace std to an internal namespace, such - as __gnu_std_debug, so that it is completely - separate from the release-mode std namespace. While - this will solve some renaming problems and ensure that - debug- and release-compiled code cannot be mixed unsafely, it ensures that - debug- and release-compiled code cannot be mixed at all. For - instance, the program would have two std::cout - objects! This solution would fails the minimize - recompilation requirement, because we would only be able to - support option (1) or (2).
  • - -
  • Extension: use link name: This option involves - complicated re-naming between debug-mode and release-mode - components at compile time, and then a g++ extension called - link name to recover the original names at link time. There - are two drawbacks to this approach. One, it's very verbose, - relying on macro renaming at compile time and several levels of - include ordering. Two, ODR issues remained with container member - functions taking no arguments in mixed-mode settings resulting in - equivalent link names, vector::push_back() being - one example. - See link - name
  • -
- -

Other options may exist for implementing the debug mode, many of - which have probably been considered and others that may still be - lurking. This list may be expanded over time to include other - options that we could have implemented, but in all cases the full - ramifications of the approach (as measured against the design goals - for a libstdc++ debug mode) should be considered first. The DejaGNU - testsuite includes some testcases that check for known problems with - some solutions (e.g., the using declaration solution - that breaks user specialization), and additional testcases will be - added as we are able to identify other typical problem cases. These - test cases will serve as a benchmark by which we can compare debug - mode implementations.

- - - -
-

-See license.html for copying conditions. -Comments and suggestions are welcome, and may be sent to -the libstdc++ mailing list. -

- - - - diff --git a/libstdc++-v3/docs/html/documentation.html b/libstdc++-v3/docs/html/documentation.html index dbeeae0..f14d1b6 100644 --- a/libstdc++-v3/docs/html/documentation.html +++ b/libstdc++-v3/docs/html/documentation.html @@ -6,100 +6,33 @@ - GNU C++ Standard Library + content="libstdc++, homepage, home, C++, library, c++, std, g++, STL" /> + The GNU C++ Library +

The GNU C++ Library

-

All of these documents (in fact, this entire homepage set) - are bundled with the library source, under the docs - subdirectory, for releases and snapshots. The sole exception is the - automatically-generated source documentation, available separately. -

-
-
-

Introduction

-

This is a short list of text files pertaining to this implementation of - ISO 14882. A brief description may follow the name of the file. -

- +

Table of Contents

-
-
-

Configuring, Building, Testing, Installing

- - - -
-
-

Source-Level Documentation

-

The library sources have been specially formatted so that with the - proper invocation of another tool (Doxygen), a set of HTML pages - are generated from the sources files themselves. The resultant - documentation is referred to as Source-Level Documentation, and is - useful for examining the signatures of public member functions for - the library classes, finding out what is in a particular include - file, looking at inheritance diagrams, etc. -

-

The source-level documentation for the most recent releases can - be viewed online: -

- -

This generated HTML collection, as above, is also available for download in - the libstdc++ snapshots directory at - <URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/>. - You will almost certainly need to use one of the - mirror sites to download - the tarball. After unpacking, simply load libstdc++-html-*/index.html - into a browser. +

+The GNU Standard C++ Library is an ongoing project to implement the ISO +14882 Standard C++ library as described in chapters 17 through 27 and +annex D, extensions as described by TR1, and future C++ library +standards still in progress. For those who want to see exactly how far +the project has come, or just want the latest bleeding-edge code, the +up-to-date source is always publically available over anonymous SVN, +and can be browsed over the web.

-

Documentation for older releases is available for download only, not - online viewing. -

-

In addition, an initial set of man pages are also available in the - same place as the HTML collections. Start with C++Intro(3). -

- -
-
-

Chapter-Specific Documentation

-

Information, extensions, notes and advice on specific implementation - capabilites and/or liabilities broken down into chapter names based on the - C++ standard. +

Stable versions of libstdc++ are included with releases of + the GCC compilers.

- - -
-
-

Contributor-Specific Information

+
  • Appendix + +
  • + + + + +
    +
    +

    Source-Level Documentation

    +

    The library sources have been specially formatted so that with the + proper invocation of another tool (Doxygen), a set of HTML pages + are generated from the sources files themselves. The resultant + documentation is referred to as Source-Level Documentation, and is + useful for examining the signatures of public member functions for + the library classes, finding out what is in a particular include + file, looking at inheritance diagrams, etc. +

    +

    The source-level documentation for the most recent releases can + be viewed online: +

    + +

    This generated HTML collection, as above, is also available for download in + the libstdc++ snapshots directory at + <URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/>. + You will almost certainly need to use one of the + mirror sites to download + the tarball. After unpacking, simply load libstdc++-html-*/index.html + into a browser. +

    +

    Documentation for older releases is available for download only, not + online viewing. +

    +

    In addition, an initial set of man pages are also available in the + same place as the HTML collections. Start with C++Intro(3). +

    + +
    +
    +

    Frequently Asked Questions

    +
    +

    All of these documents (in fact, this entire homepage set) + are bundled with the library source, under the docs + subdirectory, for releases and snapshots. The sole exception is the + automatically-generated source documentation, available separately. +

    + +

    Return to the libstdc++ homepage.

    +

    See license.html for copying conditions. diff --git a/libstdc++-v3/docs/html/explanations.html b/libstdc++-v3/docs/html/explanations.html deleted file mode 100644 index 938b449..0000000 --- a/libstdc++-v3/docs/html/explanations.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - Explanatory notes about libstdc++-v3 design - - - - - -

    Explanatory notes about libstdc++-v3 -design

    - -

    - The latest version of this document is always available at - - http://gcc.gnu.org/onlinedocs/libstdc++/explanations.html. -

    - -

    - To the libstdc++-v3 homepage. -

    - - - -
    -

    "I/O packages", --enable-cstdio

    -

    In addition to all the nifty things which C++ can do for I/O, its library - also includes all of the I/O capabilites of C. Making them work together - can be a challenge, not only - for the programmer but for the - implementors as well. -

    -

    There are two ways to do a C++ library: the cool way, and the easy way. - More specifically, the cool-but-easy-to-get-wrong way, and the - easy-to-guarantee-correct-behavior way. For 3.0, the easy way is used. -

    -

    Choosing 'stdio' is the easy way. It builds a C++ library which forwards - all operations to the C library. Many of the C++ I/O functions are - specified in the standard 'as if' they called a certain C function; the - easiest way to get it correct is to actually call that function. The - disadvantage is that the C++ code will run slower (fortunately, the layer - is thin). -

    -

    Other packages are possible. For a new package, a header must be - written to provide types like streamsize (usually just a typedef), as - well as some internal types like __c_file_type and - __c_lock (for the stdio case, these are FILE (as in - "FILE*") and a simple POSIX mutex, respectively). An - interface class called __basic_file must also be filled in; - as an example, for the stdio case, these member functions are all - inline calles to fread, fwrite, etc. -

    -

    Return to the top of the page or - to the homepage. -

    - - -
    -

    Internal Allocators

    -

    -

    -

    Return to the top of the page or - to the homepage. -

    - - - - -
    -

    -See license.html for copying conditions. -Comments and suggestions are welcome, and may be sent to -the libstdc++ mailing list. -

    - - - - diff --git a/libstdc++-v3/docs/html/ext/ballocator_doc.html b/libstdc++-v3/docs/html/ext/ballocator_doc.html index fa09584..064f593 100644 --- a/libstdc++-v3/docs/html/ext/ballocator_doc.html +++ b/libstdc++-v3/docs/html/ext/ballocator_doc.html @@ -15,7 +15,7 @@ at http://gcc.gnu.org/onlinedocs/libstdc++/ext/ballocator_doc.html.


    - To the libstdc++-v3 + To the libstdc++ homepage.



    @@ -415,7 +415,7 @@ Thus, knowing these values, and based on the sizeof(value_type), we may create a function that returns the Max_Wastage_Percentage for us to use.


    See license.html + href="file:///home/dhruv/projects/libstdc++/gcc/libstdc++/docs/html/17_intro/license.html">license.html for copying conditions. Comments and suggestions are welcome, and may be sent to the libstdc++ mailing diff --git a/libstdc++-v3/docs/html/ext/debug_mode.html b/libstdc++-v3/docs/html/ext/debug_mode.html new file mode 100644 index 0000000..7e9d9ba --- /dev/null +++ b/libstdc++-v3/docs/html/ext/debug_mode.html @@ -0,0 +1,578 @@ + + + + + + + + + + Design of the libstdc++ debug mode + + + + +

    Design of the libstdc++ debug mode

    + +

    + The latest version of this document is always available at + + http://gcc.gnu.org/onlinedocs/libstdc++/debug_mode.html. +

    + +

    + To the libstdc++ homepage. +

    + + + + +
    +

    Debug mode design

    +

    The libstdc++ debug mode replaces unsafe (but efficient) standard + containers and iterators with semantically equivalent safe standard + containers and iterators to aid in debugging user programs. The + following goals directed the design of the libstdc++ debug mode:

    + +
      + +
    • Correctness: the libstdc++ debug mode must not change + the semantics of the standard library for all cases specified in + the ANSI/ISO C++ standard. The essence of this constraint is that + any valid C++ program should behave in the same manner regardless + of whether it is compiled with debug mode or release mode. In + particular, entities that are defined in namespace std in release + mode should remain defined in namespace std in debug mode, so that + legal specializations of namespace std entities will remain + valid. A program that is not valid C++ (e.g., invokes undefined + behavior) is not required to behave similarly, although the debug + mode will abort with a diagnostic when it detects undefined + behavior.
    • + +
    • Performance: the additional of the libstdc++ debug mode + must not affect the performance of the library when it is compiled + in release mode. Performance of the libstdc++ debug mode is + secondary (and, in fact, will be worse than the release + mode).
    • + +
    • Usability: the libstdc++ debug mode should be easy to + use. It should be easily incorporated into the user's development + environment (e.g., by requiring only a single new compiler switch) + and should produce reasonable diagnostics when it detects a + problem with the user program. Usability also involves detection + of errors when using the debug mode incorrectly, e.g., by linking + a release-compiled object against a debug-compiled object if in + fact the resulting program will not run correctly.
    • + +
    • Minimize recompilation: While it is expected that + users recompile at least part of their program to use debug + mode, the amount of recompilation affects the + detect-compile-debug turnaround time. This indirectly affects the + usefulness of the debug mode, because debugging some applications + may require rebuilding a large amount of code, which may not be + feasible when the suspect code may be very localized. There are + several levels of conformance to this requirement, each with its + own usability and implementation characteristics. In general, the + higher-numbered conformance levels are more usable (i.e., require + less recompilation) but are more complicated to implement than + the lower-numbered conformance levels. +
        +
      1. Full recompilation: The user must recompile his or + her entire application and all C++ libraries it depends on, + including the C++ standard library that ships with the + compiler. This must be done even if only a small part of the + program can use debugging features.
      2. + +
      3. Full user recompilation: The user must recompile + his or her entire application and all C++ libraries it depends + on, but not the C++ standard library itself. This must be done + even if only a small part of the program can use debugging + features. This can be achieved given a full recompilation + system by compiling two versions of the standard library when + the compiler is installed and linking against the appropriate + one, e.g., a multilibs approach.
      4. + +
      5. Partial recompilation: The user must recompile the + parts of his or her application and the C++ libraries it + depends on that will use the debugging facilities + directly. This means that any code that uses the debuggable + standard containers would need to be recompiled, but code + that does not use them (but may, for instance, use IOStreams) + would not have to be recompiled.
      6. + +
      7. Per-use recompilation: The user must recompile the + parts of his or her application and the C++ libraries it + depends on where debugging should occur, and any other code + that interacts with those containers. This means that a set of + translation units that accesses a particular standard + container instance may either be compiled in release mode (no + checking) or debug mode (full checking), but must all be + compiled in the same way; a translation unit that does not see + that standard container instance need not be recompiled. This + also means that a translation unit A that contains a + particular instantiation + (say, std::vector<int>) compiled in release + mode can be linked against a translation unit B that + contains the same instantiation compiled in debug mode (a + feature not present with partial recompilation). While this + behavior is technically a violation of the One Definition + Rule, this ability tends to be very important in + practice. The libstdc++ debug mode supports this level of + recompilation.
      8. + +
      9. Per-unit recompilation: The user must only + recompile the translation units where checking should occur, + regardless of where debuggable standard containers are + used. This has also been dubbed "-g mode", + because the -g compiler switch works in this way, + emitting debugging information at a per--translation-unit + granularity. We believe that this level of recompilation is in + fact not possible if we intend to supply safe iterators, leave + the program semantics unchanged, and not regress in + performance under release mode because we cannot associate + extra information with an iterator (to form a safe iterator) + without either reserving that space in release mode + (performance regression) or allocating extra memory associated + with each iterator with new (changes the program + semantics).
      10. +
      +
    • +
    + +

    Other implementations

    +

    There are several existing implementations of debug modes for C++ + standard library implementations, although none of them directly + supports debugging for programs using libstdc++. The existing + implementations include:

    +
      +
    • SafeSTL: + SafeSTL was the original debugging version of the Standard Template + Library (STL), implemented by Cay S. Horstmann on top of the + Hewlett-Packard STL. Though it inspired much work in this area, it + has not been kept up-to-date for use with modern compilers or C++ + standard library implementations.
    • + +
    • STLport: STLport is a free + implementation of the C++ standard library derived from the SGI implementation, and + ported to many other platforms. It includes a debug mode that uses a + wrapper model (that in some way inspired the libstdc++ debug mode + design), although at the time of this writing the debug mode is + somewhat incomplete and meets only the "Full user recompilation" (2) + recompilation guarantee by requiring the user to link against a + different library in debug mode vs. release mode.
    • + +
    • Metrowerks + CodeWarrior: The C++ standard library that ships with Metrowerks + CodeWarrior includes a debug mode. It is a full debug-mode + implementation (including debugging for CodeWarrior extensions) and + is easy to use, although it meets only the "Full recompilation" (1) + recompilation guarantee.
    • +
    + +

    Debug mode design methodology

    +

    This section provides an overall view of the design of the + libstdc++ debug mode and details the relationship between design + decisions and the stated design goals.

    + +

    The wrapper model

    +

    The libstdc++ debug mode uses a wrapper model where the debugging + versions of library components (e.g., iterators and containers) form + a layer on top of the release versions of the library + components. The debugging components first verify that the operation + is correct (aborting with a diagnostic if an error is found) and + will then forward to the underlying release-mode container that will + perform the actual work. This design decision ensures that we cannot + regress release-mode performance (because the release-mode + containers are left untouched) and partially enables mixing debug and release code at link time, + although that will not be discussed at this time.

    + +

    Two types of wrappers are used in the implementation of the debug + mode: container wrappers and iterator wrappers. The two types of + wrappers interact to maintain relationships between iterators and + their associated containers, which are necessary to detect certain + types of standard library usage errors such as dereferencing + past-the-end iterators or inserting into a container using an + iterator from a different container.

    + +

    Safe iterators

    +

    Iterator wrappers provide a debugging layer over any iterator that + is attached to a particular container, and will manage the + information detailing the iterator's state (singular, + dereferenceable, etc.) and tracking the container to which the + iterator is attached. Because iterators have a well-defined, common + interface the iterator wrapper is implemented with the iterator + adaptor class template __gnu_debug::_Safe_iterator, + which takes two template parameters:

    + +
      +
    • Iterator: The underlying iterator type, which must + be either the iterator or const_iterator + typedef from the sequence type this iterator can reference.
    • + +
    • Sequence: The type of sequence that this iterator + references. This sequence must be a safe sequence (discussed below) + whose iterator or const_iterator typedef + is the type of the safe iterator.
    • +
    + +

    Safe sequences (containers)

    +

    Container wrappers provide a debugging layer over a particular + container type. Because containers vary greatly in the member + functions they support and the semantics of those member functions + (especially in the area of iterator invalidation), container + wrappers are tailored to the container they reference, e.g., the + debugging version of std::list duplicates the entire + interface of std::list, adding additional semantic + checks and then forwarding operations to the + real std::list (a public base class of the debugging + version) as appropriate. However, all safe containers inherit from + the class template __gnu_debug::_Safe_sequence, + instantiated with the type of the safe container itself (an instance + of the curiously recurring template pattern).

    + +

    The iterators of a container wrapper will be + safe iterators that reference sequences + of this type and wrap the iterators provided by the release-mode + base class. The debugging container will use only the safe + iterators within its own interface (therefore requiring the user to + use safe iterators, although this does not change correct user + code) and will communicate with the release-mode base class with + only the underlying, unsafe, release-mode iterators that the base + class exports.

    + +

    The debugging version of std::list will have the + following basic structure:

    + +
    +template<typename _Tp, typename _Allocator = allocator<_Tp>
    +  class debug-list :
    +    public release-list<_Tp, _Allocator>,
    +    public __gnu_debug::_Safe_sequence<debug-list<_Tp, _Allocator> >
    +  {
    +    typedef release-list<_Tp, _Allocator> _Base;
    +    typedef debug-list<_Tp, _Allocator>   _Self;
    +
    +  public:
    +    typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, _Self>       iterator;
    +    typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, _Self> const_iterator;
    +
    +    // duplicate std::list interface with debugging semantics
    +  };
    +
    + +

    Precondition checking

    +

    The debug mode operates primarily by checking the preconditions of + all standard library operations that it supports. Preconditions that + are always checked (regardless of whether or not we are in debug + mode) are checked via the __check_xxx macros defined + and documented in the source + file include/debug/debug.h. Preconditions that may or + may not be checked, depending on the debug-mode + macro _GLIBCXX_DEBUG, are checked via + the __requires_xxx macros defined and documented in the + same source file. Preconditions are validated using any additional + information available at run-time, e.g., the containers that are + associated with a particular iterator, the position of the iterator + within those containers, the distance between two iterators that may + form a valid range, etc. In the absence of suitable information, + e.g., an input iterator that is not a safe iterator, these + precondition checks will silently succeed.

    + +

    The majority of precondition checks use the aforementioned macros, + which have the secondary benefit of having prewritten debug + messages that use information about the current status of the + objects involved (e.g., whether an iterator is singular or what + sequence it is attached to) along with some static information + (e.g., the names of the function parameters corresponding to the + objects involved). When not using these macros, the debug mode uses + either the debug-mode assertion + macro _GLIBCXX_DEBUG_ASSERT , its pedantic + cousin _GLIBCXX_DEBUG_PEDASSERT, or the assertion + check macro that supports more advance formulation of error + messages, _GLIBCXX_DEBUG_VERIFY. These macros are + documented more thoroughly in the debug mode source code.

    + +

    Release- and debug-mode coexistence

    +

    The libstdc++ debug mode is the first debug mode we know of that + is able to provide the "Per-use recompilation" (4) guarantee, that + allows release-compiled and debug-compiled code to be linked and + executed together without causing unpredictable behavior. This + guarantee minimizes the recompilation that users are required to + perform, shortening the detect-compile-debug bughunting cycle + and making the debug mode easier to incorporate into development + environments by minimizing dependencies.

    + +

    Achieving link- and run-time coexistence is not a trivial + implementation task. To achieve this goal we required a small + extension to the GNU C++ compiler (described in the GCC Manual for + C++ Extensions, see strong + using), and a complex organization of debug- and + release-modes. The end result is that we have achieved per-use + recompilation but have had to give up some checking of the + std::basic_string class template (namely, safe + iterators). +

    + +

    Compile-time coexistence of release- and + debug-mode components

    +

    Both the release-mode components and the debug-mode + components need to exist within a single translation unit so that + the debug versions can wrap the release versions. However, only one + of these components should be user-visible at any particular + time with the standard name, e.g., std::list.

    + +

    In release mode, we define only the release-mode version of the + component with its standard name and do not include the debugging + component at all. The release mode version is defined within the + namespace std. Minus the namespace associations, this + method leaves the behavior of release mode completely unchanged from + its behavior prior to the introduction of the libstdc++ debug + mode. Here's an example of what this ends up looking like, in + C++.

    + +
    +namespace std
    +{
    +  template<typename _Tp, typename _Alloc = allocator<_Tp> >
    +    class list
    +    {
    +      // ...
    +     };
    +} // namespace std
    +
    + +

    In debug mode we include the release-mode container (which is now +defined in in the namespace __norm) and also the +debug-mode container. The debug-mode container is defined within the +namespace __debug, which is associated with namespace +std via the GNU namespace association extension. This +method allows the debug and release versions of the same component to +coexist at compile-time and link-time without causing an unreasonable +maintenance burden, while minimizing confusion. Again, this boils down +to C++ code as follows:

    + +
    +namespace std
    +{
    +  namespace __norm
    +  {
    +    template<typename _Tp, typename _Alloc = allocator<_Tp> >
    +      class list
    +      {
    +        // ...
    +      };
    +  } // namespace __gnu_norm
    +
    +  namespace __debug
    +  {
    +    template<typename _Tp, typename _Alloc = allocator<_Tp> >
    +      class list
    +      : public __norm::list<_Tp, _Alloc>,
    +        public __gnu_debug::_Safe_sequence<list<_Tp, _Alloc> >
    +      {
    +        // ...
    +      };
    +  } // namespace __norm
    +
    +  using namespace __debug __attribute__ ((strong));
    +}
    +
    + +

    Link- and run-time coexistence of release- and + debug-mode components

    + +

    Because each component has a distinct and separate release and +debug implementation, there are are no issues with link-time +coexistence: the separate namespaces result in different mangled +names, and thus unique linkage.

    + +

    However, components that are defined and used within the C++ +standard library itself face additional constraints. For instance, +some of the member functions of std::moneypunct return +std::basic_string. Normally, this is not a problem, but +with a mixed mode standard library that could be using either +debug-mode or release-mode basic_string objects, things +get more complicated. As the return value of a function is not +encoded into the mangled name, there is no way to specify a +release-mode or a debug-mode string. In practice, this results in +runtime errors. A simplified example of this problem is as follows. +

    + +

    Take this translation unit, compiled in debug-mode:

    +
    +// -D_GLIBCXX_DEBUG
    +#include <string>
    +
    +std::string test02();
    + 
    +std::string test01()
    +{
    +  return test02();
    +}
    + 
    +int main()
    +{
    +  test01();
    +  return 0;
    +}
    +
    + +

    ... and linked to this translation unit, compiled in release mode:

    + +
    +#include <string>
    + 
    +std::string
    +test02()
    +{
    +  return std::string("toast");
    +}
    +
    + +

    For this reason we cannot easily provide safe iterators for + the std::basic_string class template, as it is present + throughout the C++ standard library. For instance, locale facets + define typedefs that include basic_string: in a mixed + debug/release program, should that typedef be based on the + debug-mode basic_string or the + release-mode basic_string? While the answer could be + "both", and the difference hidden via renaming a la the + debug/release containers, we must note two things about locale + facets:

    + +
      +
    1. They exist as shared state: one can create a facet in one + translation unit and access the facet via the same type name in a + different translation unit. This means that we cannot have two + different versions of locale facets, because the types would not be + the same across debug/release-mode translation unit barriers.
    2. + +
    3. They have virtual functions returning strings: these functions + mangle in the same way regardless of the mangling of their return + types (see above), and their precise signatures can be relied upon + by users because they may be overridden in derived classes.
    4. +
    + +

    With the design of libstdc++ debug mode, we cannot effectively hide + the differences between debug and release-mode strings from the + user. Failure to hide the differences may result in unpredictable + behavior, and for this reason we have opted to only + perform basic_string changes that do not require ABI + changes. The effect on users is expected to be minimal, as there are + simple alternatives (e.g., __gnu_debug::basic_string), + and the usability benefit we gain from the ability to mix debug- and + release-compiled translation units is enormous.

    + +

    Alternatives for Coexistence

    +

    The coexistence scheme above was chosen over many alternatives, + including language-only solutions and solutions that also required + extensions to the C++ front end. The following is a partial list of + solutions, with justifications for our rejection of each.

    + +
      +
    • Completely separate debug/release libraries: This is by + far the simplest implementation option, where we do not allow any + coexistence of debug- and release-compiled translation units in a + program. This solution has an extreme negative affect on usability, + because it is quite likely that some libraries an application + depends on cannot be recompiled easily. This would not meet + our usability or minimize recompilation criteria + well.
    • + +
    • Add a Debug boolean template parameter: + Partial specialization could be used to select the debug + implementation when Debug == true, and the state + of _GLIBCXX_DEBUG could decide whether the + default Debug argument is true + or false. This option would break conformance with the + C++ standard in both debug and release modes. This would + not meet our correctness criteria.
    • + +
    • Packaging a debug flag in the allocators: We could + reuse the Allocator template parameter of containers + by adding a sentinel wrapper debug<> that + signals the user's intention to use debugging, and pick up + the debug<> allocator wrapper in a partial + specialization. However, this has two drawbacks: first, there is a + conformance issue because the default allocator would not be the + standard-specified std::allocator<T>. Secondly + (and more importantly), users that specify allocators instead of + implicitly using the default allocator would not get debugging + containers. Thus this solution fails the correctness + criteria.
    • + +
    • Define debug containers in another namespace, and employ + a using declaration (or directive): This is an + enticing option, because it would eliminate the need for + the link_name extension by aliasing the + templates. However, there is no true template aliasing mechanism + is C++, because both using directives and using + declarations disallow specialization. This method fails + the correctness criteria.
    • + +
    • Use implementation-specific properties of anonymous + namespaces. + See this post + + This method fails the correctness criteria.
    • + +
    • Extension: allow reopening on namespaces: This would + allow the debug mode to effectively alias the + namespace std to an internal namespace, such + as __gnu_std_debug, so that it is completely + separate from the release-mode std namespace. While + this will solve some renaming problems and ensure that + debug- and release-compiled code cannot be mixed unsafely, it ensures that + debug- and release-compiled code cannot be mixed at all. For + instance, the program would have two std::cout + objects! This solution would fails the minimize + recompilation requirement, because we would only be able to + support option (1) or (2).
    • + +
    • Extension: use link name: This option involves + complicated re-naming between debug-mode and release-mode + components at compile time, and then a g++ extension called + link name to recover the original names at link time. There + are two drawbacks to this approach. One, it's very verbose, + relying on macro renaming at compile time and several levels of + include ordering. Two, ODR issues remained with container member + functions taking no arguments in mixed-mode settings resulting in + equivalent link names, vector::push_back() being + one example. + See link + name
    • +
    + +

    Other options may exist for implementing the debug mode, many of + which have probably been considered and others that may still be + lurking. This list may be expanded over time to include other + options that we could have implemented, but in all cases the full + ramifications of the approach (as measured against the design goals + for a libstdc++ debug mode) should be considered first. The DejaGNU + testsuite includes some testcases that check for known problems with + some solutions (e.g., the using declaration solution + that breaks user specialization), and additional testcases will be + added as we are able to identify other typical problem cases. These + test cases will serve as a benchmark by which we can compare debug + mode implementations.

    + + + +
    +

    +See license.html for copying conditions. +Comments and suggestions are welcome, and may be sent to +the libstdc++ mailing list. +

    + + + + diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html index 54dffba..5dea146 100644 --- a/libstdc++-v3/docs/html/ext/howto.html +++ b/libstdc++-v3/docs/html/ext/howto.html @@ -10,7 +10,7 @@ - libstdc++-v3 HOWTO: Extensions + libstdc++ HOWTO: Extensions @@ -37,7 +37,7 @@ existence, of these extensions may change with little or no warning. (Ideally, the really good ones will appear in the next revision of C++.) Also, other platforms, other compilers, other - versions of g++ or libstdc++-v3 may not recognize these names, or + versions of g++ or libstdc++ may not recognize these names, or treat them differently, or...
  • You should know how to access these headers properly.
  • @@ -144,7 +144,7 @@

    Compile-time checks

    -

    Currently libstdc++-v3 uses the concept checkers from the Boost +

    Currently libstdc++ uses the concept checkers from the Boost library to perform optional compile-time checking of template instantiations of the standard containers. They are described in the linked-to page. @@ -161,7 +161,7 @@ for making changes to the library. They periodically publish an Issues List containing problems and possible solutions. As they reach a consensus on proposed solutions, we often incorporate the solution - into libstdc++-v3. + into libstdc++.

    Here are the issues which have resulted in code changes to the library. The links are to the specific defect reports from a partial diff --git a/libstdc++-v3/docs/html/ext/mt_allocator.html b/libstdc++-v3/docs/html/ext/mt_allocator.html index b938451..b53e7e6 100644 --- a/libstdc++-v3/docs/html/ext/mt_allocator.html +++ b/libstdc++-v3/docs/html/ext/mt_allocator.html @@ -27,7 +27,7 @@

    - To the libstdc++-v3 homepage. + To the libstdc++ homepage.

    diff --git a/libstdc++-v3/docs/html/ext/parallel_mode.html b/libstdc++-v3/docs/html/ext/parallel_mode.html new file mode 100644 index 0000000..2e4f662 --- /dev/null +++ b/libstdc++-v3/docs/html/ext/parallel_mode.html @@ -0,0 +1,591 @@ + + + + + + + + + + The libstdc++ parallel mode + + + + + +

    The libstdc++ parallel mode

    + +

    + The latest version of this document is always available at + + http://gcc.gnu.org/onlinedocs/libstdc++/parallel_mode.html. +

    + +

    + To the libstdc++ homepage. +

    + + +
    +

    The libstdc++ parallel mode is an experimental parallel +implementation of many algorithms the C++ Standard Library. +

    + +

    +Several of the standard algorithms, for instance +std::sort, are made parallel using OpenMP +annotations. These parallel mode constructs and can be invoked by +explicit source declaration or by compiling existing sources with a +specific compiler flag. +

    + +

    The libstdc++ parallel mode

    + +

    The libstdc++ parallel mode performs parallelization of algorithms, +function objects, classes, and functions in the C++ Standard.

    + +

    Using the libstdc++ parallel mode

    + +

    To use the libstdc++ parallel mode, compile your application with + the compiler flag -D_GLIBCXX_PARALLEL -fopenmp. This + will link in libgomp, the GNU OpenMP implementation, + whose presence is mandatory. In addition, hardware capable of atomic + operations is mandatory. Actually activating these atomic + operations may require explicit compiler flags on some targets + (like sparc and x86), such as -march=i686, + -march=native or -mcpu=v9. +

    + +

    Note that the _GLIBCXX_PARALLEL define may change the + sizes and behavior of standard class templates such as + std::search, and therefore one can only link code + compiled with parallel mode and code compiled without parallel mode + if no instantiation of a container is passed between the two + translation units. Parallel mode functionality has distinct linkage, + and cannot be confused with normal mode symbols.

    + + +

    The following library components in the include +<numeric> are included in the parallel mode:

    +
      +
    • std::accumulate
    • +
    • std::adjacent_difference
    • +
    • std::inner_product
    • +
    • std::partial_sum
    • +
    + +

    The following library components in the include +<algorithm> are included in the parallel mode:

    +
      +
    • std::adjacent_find
    • +
    • std::count
    • +
    • std::count_if
    • +
    • std::equal
    • +
    • std::find
    • +
    • std::find_if
    • +
    • std::find_first_of
    • +
    • std::for_each
    • +
    • std::generate
    • +
    • std::generate_n
    • +
    • std::lexicographical_compare
    • +
    • std::mismatch
    • +
    • std::search
    • +
    • std::search_n
    • +
    • std::transform
    • +
    • std::replace
    • +
    • std::replace_if
    • +
    • std::max_element
    • +
    • std::merge
    • +
    • std::min_element
    • +
    • std::nth_element
    • +
    • std::partial_sort
    • +
    • std::partition
    • +
    • std::random_shuffle
    • +
    • std::set_union
    • +
    • std::set_intersection
    • +
    • std::set_symmetric_difference
    • +
    • std::set_difference
    • +
    • std::sort
    • +
    • std::stable_sort
    • +
    • std::unique_copy
    • +
    + +

    The following library components in the includes +<set> and <map> are included in the parallel mode:

    +
      +
    • std::(multi_)map/set<T>::(multi_)map/set(Iterator begin, Iterator end) (bulk construction)
    • +
    • std::(multi_)map/set<T>::insert(Iterator begin, Iterator end) (bulk insertion)
    • +
    + + +

    Using the parallel algorithms without parallel mode

    + +

    When it is not feasible to recompile your entire application, or + only specific algorithms need to be parallel-aware, individual + parallel algorithms can be made available explicitly. These + parallel algorithms are functionally equivalent to the standard + drop-in algorithms used in parallel mode, but they are available in + a separate namespace as GNU extensions and may be used in programs + compiled with either release mode or with parallel mode. The + following table provides the names and headers of the parallel + algorithms: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AlgorithmHeaderParallel algorithmParallel header
    std::accumulate<numeric>__gnu_parallel::accumulate<parallel/numeric>
    std::adjacent_difference<numeric>__gnu_parallel::adjacent_difference<parallel/numeric>
    std::inner_product<numeric>__gnu_parallel::inner_product<parallel/numeric>
    std::partial_sum<numeric>__gnu_parallel::partial_sum<parallel/numeric>
    std::adjacent_find<algorithm>__gnu_parallel::adjacent_find<parallel/algorithm>
    std::count<algorithm>__gnu_parallel::count<parallel/algorithm>
    std::count_if<algorithm>__gnu_parallel::count_if<parallel/algorithm>
    std::equal<algorithm>__gnu_parallel::equal<parallel/algorithm>
    std::find<algorithm>__gnu_parallel::find<parallel/algorithm>
    std::find_if<algorithm>__gnu_parallel::find_if<parallel/algorithm>
    std::find_first_of<algorithm>__gnu_parallel::find_first_of<parallel/algorithm>
    std::for_each<algorithm>__gnu_parallel::for_each<parallel/algorithm>
    std::generate<algorithm>__gnu_parallel::generate<parallel/algorithm>
    std::generate_n<algorithm>__gnu_parallel::generate_n<parallel/algorithm>
    std::lexicographical_compare<algorithm>__gnu_parallel::lexicographical_compare<parallel/algorithm>
    std::mismatch<algorithm>__gnu_parallel::mismatch<parallel/algorithm>
    std::search<algorithm>__gnu_parallel::search<parallel/algorithm>
    std::search_n<algorithm>__gnu_parallel::search_n<parallel/algorithm>
    std::transform<algorithm>__gnu_parallel::transform<parallel/algorithm>
    std::replace<algorithm>__gnu_parallel::replace<parallel/algorithm>
    std::replace_if<algorithm>__gnu_parallel::replace_if<parallel/algorithm>
    std::max_element<algorithm>__gnu_parallel::max_element<parallel/algorithm>
    std::merge<algorithm>__gnu_parallel::merge<parallel/algorithm>
    std::min_element<algorithm>__gnu_parallel::min_element<parallel/algorithm>
    std::nth_element<algorithm>__gnu_parallel::nth_element<parallel/algorithm>
    std::partial_sort<algorithm>__gnu_parallel::partial_sort<parallel/algorithm>
    std::partition<algorithm>__gnu_parallel::partition<parallel/algorithm>
    std::random_shuffle<algorithm>__gnu_parallel::random_shuffle<parallel/algorithm>
    std::set_union<algorithm>__gnu_parallel::set_union<parallel/algorithm>
    std::set_intersection<algorithm>__gnu_parallel::set_intersection<parallel/algorithm>
    std::set_symmetric_difference<algorithm>__gnu_parallel::set_symmetric_difference<parallel/algorithm>
    std::set_difference<algorithm>__gnu_parallel::set_difference<parallel/algorithm>
    std::sort<algorithm>__gnu_parallel::sort<parallel/algorithm>
    std::stable_sort<algorithm>__gnu_parallel::stable_sort<parallel/algorithm>
    std::unique_copy<algorithm>__gnu_parallel::unique_copy<parallel/algorithm>
    + + +

    Parallel mode semantics

    + +

    The parallel mode STL algorithms are currently not exception-safe, +i. e. user-defined functors must not throw exceptions. +

    + +

    Since the current GCC OpenMP implementation does not support +OpenMP parallel regions in concurrent threads, +it is not possible to call parallel STL algorithm in +concurrent threads, either. +It might work with other compilers, though.

    + + +

    Configuration and Tuning

    + +

    Some algorithm variants can be enabled/disabled/selected at compile-time. +See +<compiletime_settings.h> and +See +<features.h> for details. +

    + +

    +To specify the number of threads to be used for an algorithm, +use omp_set_num_threads. +To force a function to execute sequentially, +even though parallelism is switched on in general, +add __gnu_parallel::sequential_tag() +to the end of the argument list. +

    + +

    +Parallelism always incurs some overhead. Thus, it is not +helpful to parallelize operations on very small sets of data. +There are measures to avoid parallelizing stuff that is not worth it. +For each algorithm, a minimum problem size can be stated, +usually using the variable +__gnu_parallel::Settings::[algorithm]_minimal_n. +Please see +<settings.h> for details.

    + + + +

    Interface basics and general design

    + +

    All parallel algorithms are intended to have signatures that are +equivalent to the ISO C++ algorithms replaced. For instance, the +std::adjacent_find function is declared as: + +

    +namespace std
    +{
    +  template<typename _FIter>
    +    _FIter
    +    adjacent_find(_FIter, _FIter);
    +}
    +
    + +Which means that there should be something equivalent for the parallel +version. Indeed, this is the case: + +
    +namespace std
    +{
    +  namespace __parallel
    +  {
    +    template<typename _FIter>
    +      _FIter
    +      adjacent_find(_FIter, _FIter);
    +
    +    ...
    +  }
    +}
    +
    + +

    But.... why the elipses? +

    + +

    The elipses in the example above represent additional overloads +required for the parallel version of the function. These additional +overloads are used to dispatch calls from the ISO C++ function +signature to the appropriate parallel function (or sequential +function, if no parallel functions are deemed worthy), based on either +compile-time or run-time conditions. +

    + +

    Compile-time conditions are referred to as "embarrassingly +parallel," and are denoted with the appropriate dispatch object, ie +one of __gnu_parallel::sequential_tag, +__gnu_parallel::parallel_tag, +__gnu_parallel::balanced_tag, +__gnu_parallel::unbalanced_tag, +__gnu_parallel::omp_loop_tag, or +__gnu_parallel::omp_loop_static_tag. +

    + +

    Run-time conditions depend on the hardware being used, the number +of threads available, etc., and are denoted by the use of the enum +__gnu_parallel::parallelism. Values of this enum include +__gnu_parallel::sequential, +__gnu_parallel::parallel_unbalanced, +__gnu_parallel::parallel_balanced, +__gnu_parallel::parallel_omp_loop, +__gnu_parallel::parallel_omp_loop_static, or +__gnu_parallel::parallel_taskqueue. +

    + +

    Putting all this together, the general view of overloads for the +parallel algorithms look like this: +

    +

      +
    • ISO C++ signature
    • +
    • ISO C++ signature + sequential_tag argument
    • +
    • ISO C++ signature + parallelism argument
    • +
    + +

    Please note that the implementation may use additional functions +(designated with the _switch suffix) to dispatch from the +ISO C++ signature to the correct parallel version. Also, some of the +algorithms do not have support for run-time conditions, so the last +overload is therefore missing. +

    + + +

    Relevant namespaces

    + +

    One namespace contain versions of code that are explicitly sequential: +__gnu_serial. +

    + +

    Two namespaces contain the parallel mode: +std::__parallel and __gnu_parallel. +

    + +

    Parallel implementations of standard components, including +template helpers to select parallelism, are defined in namespace +std::__parallel. For instance, std::transform from +<algorithm> has a parallel counterpart in +std::__parallel::transform from +<parallel/algorithm>. In addition, these parallel +implementations are injected into namespace +__gnu_parallel with using declarations. +

    + +

    Support and general infrastructure is in namespace +__gnu_parallel. +

    + +

    More information, and an organized index of types and functions +related to the parallel mode on a per-namespace basis, can be found in +the generated source documentation. +

    + +

    Testing

    + +

    Both the normal conformance and regression tests and the +supplemental performance tests work.

    + +

    To run the conformance and regression tests with the parallel mode +active,

    +make check-parallel + +

    The log and summary files for conformance testing are in the +testsuite/parallel directory.

    + +

    To run the performance tests with the parallel mode active,

    +make check-performance-parallel + +

    The result file for performance testing are in the +testsuite directory, in the file +libstdc++_performance.sum. In addition, the policy-based +containers have their own visualizations, which have additional +software dependencies than the usual bare-boned text file, and can be +generated by using the make doc-performance rule in the +testsuite's Makefile.

    + +

    Return to the top of the page or + to the libstdc++ homepage. +

    + + +

    References / Further Reading

    + +

    +Johannes Singler, Peter Sanders, Felix Putze. The Multi-Core Standard Template Library. Euro-Par 2007: Parallel Processing. (LNCS 4641) +

    + +

    +Leonor Frias, Johannes Singler: Parallelization of Bulk Operations for STL Dictionaries. Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) +

    + + + +
    +

    +See license.html for copying conditions. +Comments and suggestions are welcome, and may be sent to +the libstdc++ mailing list. +

    + + + + diff --git a/libstdc++-v3/docs/html/ext/sgiexts.html b/libstdc++-v3/docs/html/ext/sgiexts.html index 515fc15..7f9b8c0 100644 --- a/libstdc++-v3/docs/html/ext/sgiexts.html +++ b/libstdc++-v3/docs/html/ext/sgiexts.html @@ -6,10 +6,10 @@ - - + + - SGI extensions to the library in libstdc++-v3 + SGI extensions to the library in libstdc++ @@ -20,7 +20,7 @@

    SGI extensions to the library in -libstdc++-v3

    +libstdc++

    This page describes the extensions that SGI made to their version of the STL subset of the Standard C++ Library. For a time we @@ -44,7 +44,7 @@ libstdc++-v3 documentation, buy a copy of Matt Austern's book. *grin*

    -

    Back to the libstdc++-v3 extensions. +

    Back to the libstdc++ extensions.

    diff --git a/libstdc++-v3/docs/html/ext/tr1.html b/libstdc++-v3/docs/html/ext/tr1.html deleted file mode 100644 index 6b92802..0000000 --- a/libstdc++-v3/docs/html/ext/tr1.html +++ /dev/null @@ -1,2322 +0,0 @@ - - - - - - - - - - - - Status of TR1 features in GCC - - GNU Project - Free Software Foundation (FSF) - - - - - - -

    - Status of TR1 features in GCC -

    - -

    -This table is based on the table of contents of ISO/IEC DTR 19768 -Doc No: N1836=05-0096 Date: 2005-06-24 -Draft Technical Report on C++ Library Extensions -

    - -

    -In this implementation the header names are prefixed by -tr1/, for instance <tr1/functional>, -<tr1/memory>, and so on. -

    - -

    -This page describes the TR1 support in mainline GCC SVN, not in any particular -release. -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SectionDescriptionDoneBrokenMissingComments
    2General Utilities
    2.1Reference wrappersdone
    2.1.1Additions to header <functional> synopsisdone
    2.1.2Class template reference_wrapperdone
    2.1.2.1reference_wrapper construct/copy/destroydone
    2.1.2.2reference_wrapper assignmentdone
    2.1.2.3reference_wrapper accessdone
    2.1.2.4reference_wrapper invocationdone
    2.1.2.5reference_wrapper helper functionsdone
    2.2Smart pointersdone
    2.2.1Additions to header <memory> synopsisdone
    2.2.2Class bad_weak_ptrdone
    2.2.3Class template shared_ptrdone1
    2.2.3.1shared_ptr constructorsdone
    2.2.3.2shared_ptr destructordone
    2.2.3.3shared_ptr assignmentdone
    2.2.3.4shared_ptr modifiersdone
    2.2.3.5shared_ptr observersdone
    2.2.3.6shared_ptr comparisondone
    2.2.3.7shared_ptr I/Odone
    2.2.3.8shared_ptr specialized algorithmsdone
    2.2.3.9shared_ptr castsdone
    2.2.3.10get_deleterdone
    2.2.4Class template weak_ptrdone
    2.2.4.1weak_ptr constructorsdone
    2.2.4.2weak_ptr destructordone
    2.2.4.3weak_ptr assignmentdone
    2.2.4.4weak_ptr modifiersdone
    2.2.4.5weak_ptr observersdone
    2.2.4.6weak_ptr comparisondone
    2.2.4.7weak_ptr specialized algorithmsdone
    2.2.5Class template enable_shared_from_thisdone
    3Function objects
    3.1Definitionsdone
    3.2Additions to <functional> synopsisdone
    3.3Requirementsdone
    3.4Function return typesdone
    3.5Function template mem_fndone
    3.6Function object bindersdone
    3.6.1Class template is_bind_expressiondone
    3.6.2Class template is_placeholderdone
    3.6.3Function template binddone
    3.6.4Placeholdersdone
    3.7Polymorphic function wrappersdone
    3.7.1Class bad_function_calldone
    3.7.1.1bad_function_call constructordone
    3.7.2Class template functiondone
    3.7.2.1function construct/copy/destroydone
    3.7.2.2function modifiersdone
    3.7.2.3function capacitydone
    3.7.2.4function invocationdone
    3.7.2.5function target accessdone
    3.7.2.6undefined operatorsdone
    3.7.2.7null pointer comparison operatorsdone
    3.7.2.8specialized algorithmsdone
    4Metaprogramming and type traits
    4.1Requirementsdone
    4.2Header <type_traits> synopsisdone
    4.3Helper classesdone
    4.4General Requirementsdone
    4.5Unary Type Traitsdone
    4.5.1Primary Type Categoriesdone
    4.5.2Composite type traitsdone
    4.5.3Type propertiesdone
    4.6Relationships between typesdone
    4.7Transformations between typesdone
    4.7.1Const-volatile modificationsdone
    4.7.2Reference modificationsdone
    4.7.3Array modificationsdone
    4.7.4Pointer modificationsdone
    4.8Other transformationsdone
    4.9Implementation requirementsdone
    5Numerical facilities
    5.1Random number generationdone
    5.1.1Requirementsdone
    5.1.2Header <random> synopsisdone
    5.1.3Class template variate_generatordone
    5.1.4Random number engine class templatesdone
    5.1.4.1Class template linear_congruentialdone
    5.1.4.2Class template mersenne_twisterdone
    5.1.4.3Class template subtract_with_carrydone
    5.1.4.4Class template subtract_with_carry_01done
    5.1.4.5Class template discard_blockdone
    5.1.4.6Class template xor_combinedoneoperator()() per N2079
    5.1.5Engines with predefined parametersdone
    5.1.6Class random_devicedone
    5.1.7Random distribution class templatesdone
    5.1.7.1Class template uniform_intdone
    5.1.7.2Class bernoulli_distributiondone
    5.1.7.3Class template geometric_distributiondone
    5.1.7.4Class template poisson_distributiondone
    5.1.7.5Class template binomial_distributiondone
    5.1.7.6Class template uniform_realdone
    5.1.7.7Class template exponential_distributiondone
    5.1.7.8Class template normal_distributiondone
    5.1.7.9Class template gamma_distributiondone
    5.2Mathematical special functionsdone
    5.2.1Additions to header <cmath> synopsisdone
    5.2.1.1associated Laguerre polynomialsdone
    5.2.1.2associated Legendre functionsdone
    5.2.1.3beta functiondone
    5.2.1.4(complete) elliptic integral of the first kinddone
    5.2.1.5(complete) elliptic integral of the second kinddone
    5.2.1.6(complete) elliptic integral of the third kinddone
    5.2.1.7confluent hypergeometric functionsdone
    5.2.1.8regular modified cylindrical Bessel functionsdone
    5.2.1.9cylindrical Bessel functions (of the first kind)done
    5.2.1.10irregular modified cylindrical Bessel functionsdone
    5.2.1.11cylindrical Neumann functionsdone
    5.2.1.12(incomplete) elliptic integral of the first kinddone
    5.2.1.13(incomplete) elliptic integral of the second kinddone
    5.2.1.14(incomplete) elliptic integral of the third kinddone
    5.2.1.15exponential integraldone
    5.2.1.16Hermite polynomialsdone
    5.2.1.17hypergeometric functionsdone
    5.2.1.18Laguerre polynomialsdone
    5.2.1.19Legendre polynomialsdone
    5.2.1.20Riemann zeta functiondone
    5.2.1.21spherical Bessel functions (of the first kind)done
    5.2.1.22spherical associated Legendre functionsdone
    5.2.1.23spherical Neumann functionsdone
    5.2.2Additions to header <math.h> synopsisdone
    6Containers
    6.1Tuple typesdone
    6.1.1Header <tuple> synopsisdone
    6.1.2Additions to header <utility> synopsisdone
    6.1.3Class template tupledone
    6.1.3.1Constructiondone
    6.1.3.2Tuple creation functionsdone
    6.1.3.3Tuple helper classesdone
    6.1.3.4Element accessdone
    6.1.3.5Relational operatorsdone
    6.1.4Pairsdone
    6.2Fixed size arraydone
    6.2.1Header <array> synopsisdone
    6.2.2Class template arraydone
    6.2.2.1array constructors, copy, and assignmentdone
    6.2.2.2array specialized algorithmsdone
    6.2.2.3array sizedone
    6.2.2.4Zero sized arraysdone
    6.2.2.5Tuple interface to class template arraydone
    6.3Unordered associative containersdone
    6.3.1Unordered associative container requirementsdone
    6.3.1.1Exception safety guaranteesdone
    6.3.2Additions to header <functional> synopsisdone
    6.3.3Class template hashdone
    6.3.4Unordered associative container classesdone
    6.3.4.1Header <unordered_set> synopsisdone
    6.3.4.2Header <unordered_map> synopsisdone
    6.3.4.3Class template unordered_setdone
    6.3.4.3.1unordered_set constructorsdone
    6.3.4.3.2unordered_set swapdone
    6.3.4.4Class template unordered_mapdone
    6.3.4.4.1unordered_map constructorsdone
    6.3.4.4.2unordered_map element accessdone
    6.3.4.4.3unordered_map swapdone
    6.3.4.5Class template unordered_multisetdone
    6.3.4.5.1unordered_multiset constructorsdone
    6.3.4.5.2unordered_multiset swapdone
    6.3.4.6Class template unordered_multimapdone
    6.3.4.6.1unordered_multimap constructorsdone
    6.3.4.6.2unordered_multimap swapdone
    7Regular expressions
    7.1Definitionsmissing
    7.2Requirementsmissing
    7.3Regular expressions summarymissing
    7.4Header <regex> synopsismissing
    7.5Namespace tr1::regex_constantsmissing
    7.5.1Bitmask Type syntax_option_typemissing
    7.5.2Bitmask Type regex_constants::match_flag_typemissing
    7.5.3Implementation defined error_typemissing
    7.6Class regex_errormissing
    7.7Class template regex_traitsmissing
    7.8Class template basic_regexmissing
    7.8.1basic_regex constantsmissing
    7.8.2basic_regex constructorsmissing
    7.8.3basic_regex assignmissing
    7.8.4basic_regex constant operationsmissing
    7.8.5basic_regex localemissing
    7.8.6basic_regex swapmissing
    7.8.7basic_regex non-member functionsmissing
    7.8.7.1basic_regex non-member swapmissing
    7.9Class template sub_matchmissing
    7.9.1sub_match membersmissing
    7.9.2sub_match non-member operatorsmissing
    7.10Class template match_resultsmissing
    7.10.1match_results constructorsmissing
    7.10.2match_results sizemissing
    7.10.3match_results element accessmissing
    7.10.4match_results formattingmissing
    7.10.5match_results allocatormissing
    7.10.6match_results swapmissing
    7.11Regular expression algorithmsmissing
    7.11.1exceptionsmissing
    7.11.2regex_matchmissing
    7.11.3regex_searchmissing
    7.11.4regex_replacemissing
    7.12Regular expression Iteratorsmissing
    7.12.1Class template regex_iteratormissing
    7.12.1.1regex_iterator constructorsmissing
    7.12.1.2regex_iterator comparisonsmissing
    7.12.1.3regex_iterator dereferencemissing
    7.12.1.4regex_iterator incrementmissing
    7.12.2Class template regex_token_iteratormissing
    7.12.2.1regex_token_iterator constructorsmissing
    7.12.2.2regex_token_iterator comparisonsmissing
    7.12.2.3regex_token_iterator dereferencemissing
    7.12.2.4regex_token_iterator incrementmissing
    7.13Modified ECMAScript regular expression grammarmissing
    8C compatibility
    8.1Additions to header <complex>done
    8.1.1Synopsisdone
    8.1.2Function acosdone
    8.1.3Function asindone
    8.1.4Function atandone
    8.1.5Function acoshdone
    8.1.6Function asinhdone
    8.1.7Function atanhdone
    8.1.8Function fabsdone
    8.1.9Additional Overloadsdone
    8.2Header <ccomplex>missingDR 551
    8.3Header <complex.h>missingDR 551
    8.4Additions to header <cctype>done
    8.4.1Synopsisdone
    8.4.2Function isblankdone
    8.5Additions to header <ctype.h>done
    8.6Header <cfenv>done
    8.6.1Synopsisdone
    8.6.2Definitionsdone
    8.7Header <fenv.h>done
    8.8Additions to header <cfloat>done
    8.9Additions to header <float.h>done
    8.10Additions to header <ios>missing
    8.10.1Synopsismissing
    8.10.2Function hexfloatmissing
    8.11Header <cinttypes>done
    8.11.1SynopsisdoneDR 557
    8.11.2Definitionsdone
    8.12Header <inttypes.h>done
    8.13Additions to header <climits>done
    8.14Additions to header <limits.h>done
    8.15Additions to header <locale>missing
    8.16Additions to header <cmath>done
    8.16.1Synopsisdone
    8.16.2Definitionsdone
    8.16.3Function template definitionsdone
    8.16.4Additional overloadsdoneDR 568; DR 550
    8.17Additions to header <math.h>done
    8.18Additions to header <cstdarg>done
    8.19Additions to header <stdarg.h>done
    8.20The header <cstdbool>done
    8.21The header <stdbool.h>done
    8.22The header <cstdint>done
    8.22.1Synopsisdone
    8.22.2Definitionsdone
    8.23The header <stdint.h>done
    8.24Additions to header <cstdio>done
    8.24.1Synopsisdone
    8.24.2Definitionsdone
    8.24.3Additional format specifiersdoneC library responsability
    8.24.4Additions to header <stdio.h>done
    8.25Additions to header <cstdlib>done
    8.25.1Synopsisdone
    8.25.2Definitionsdone
    8.25.3Function absdone
    8.25.4Function divdone
    8.26Additions to header <stdlib.h>done
    8.27Header <ctgmath>doneDR 551
    8.28Header <tgmath.h>doneDR 551
    8.29Additions to header <ctime>doneC library responsability
    8.30Additions to header <cwchar>done
    8.30.1Synopsisdone
    8.30.2Definitionsdone
    8.30.3Additional wide format specifiersdoneC library responsability
    8.31Additions to header <wchar.h>done
    8.32Additions to header <cwctype>done
    8.32.1Synopsisdone
    8.32.2Function iswblankdone
    8.33Additions to header <wctype.h>done
    - -

    Footnotes

    - -
      - -
    1. - - The shared_ptr implementation uses some code from the - Boost - shared_ptr library. -
    2. - -
    - -

    -Please send FSF & GNU inquiries & questions to -gnu@gnu.org. -There are also other ways -to contact the FSF. -

    - -

    -These pages are maintained by -the GCC team. -

    - -
    -For questions related to the use of GCC, please consult these web -pages and the GCC manuals. If -that fails, the gcc-help@gcc.gnu.org -mailing list might help.
    -Please send comments on these web pages and the development of GCC to our -developer mailing list at gcc@gnu.org -or gcc@gcc.gnu.org. All of our lists -have public archives. -
    - -

    -Copyright (C) Free Software Foundation, Inc., -51 Franklin St, Fifth Floor, Boston, MA 02110, USA. -

    -

    -Verbatim copying and distribution of this entire article is -permitted in any medium, provided this notice is preserved. -

    - - - - - - -
    - Last modified 2006-10-01 - - - Valid XHTML 1.0 - -
    - - - diff --git a/libstdc++-v3/docs/html/faq/index.html b/libstdc++-v3/docs/html/faq/index.html index e38732e..de316d1 100644 --- a/libstdc++-v3/docs/html/faq/index.html +++ b/libstdc++-v3/docs/html/faq/index.html @@ -6,9 +6,9 @@ - + - libstdc++-v3 FAQ + libstdc++ FAQ @@ -28,7 +28,7 @@

    - To the libstdc++-v3 homepage. + To the libstdc++ homepage.

    @@ -38,21 +38,21 @@
  • General Information
      -
    1. What is libstdc++-v3?
    2. +
    3. What is libstdc++?
    4. Why should I use libstdc++?
    5. Who's in charge of it?
    6. -
    7. How do I get libstdc++?
    8. +
    9. [removed]
    10. When is libstdc++ going to be finished?
    11. How do I contribute to the effort?
    12. What happened to libg++? I need that!
    13. What if I have more questions?
    14. -
    15. What are the license terms for libstdc++-v3?
    16. +
    17. What are the license terms for libstdc++?
  • Installation
      -
    1. How do I install libstdc++-v3?
    2. +
    3. How do I install libstdc++?
    4. [removed]
    5. What is this SVN thing that you keep mentioning?
    6. @@ -66,7 +66,7 @@
    7. Platform-Specific Issues
        -
      1. Can libstdc++-v3 be used with <my +
      2. Can libstdc++ be used with <my favorite compiler>?
      3. [removed]
      4. [removed]
      5. @@ -85,7 +85,7 @@
      6. Known Bugs and Non-Bugs
        1. What works already?
        2. -
        3. Bugs in gcc/g++ (not libstdc++-v3)
        4. +
        5. Bugs in gcc/g++ (not libstdc++)
        6. Bugs in the C++ language/lib specification
        7. Things in libstdc++ that only look like bugs
          • reopening a stream fails
          • @@ -110,11 +110,11 @@
            1. string::iterator is not char*; vector<T>::iterator is not T*
            2. -
            3. What's next after libstdc++-v3?
            4. +
            5. What's next after libstdc++?
            6. What about the STL from SGI?
            7. Extensions and Backward Compatibility
            8. Does libstdc++ support TR1?
            9. -
            10. Is libstdc++-v3 thread-safe?
            11. +
            12. Is libstdc++ thread-safe?
            13. How do I get a copy of the ISO C++ Standard?
            14. What's an ABI and why is it so messy?
            15. How do I make std::vector<T>::capacity() @@ -130,23 +130,15 @@

              1.0 General Information

              -

              1.1 What is libstdc++-v3?

              +

              1.1 What is libstdc++?

              The GNU Standard C++ Library v3 is an ongoing project to implement the ISO 14882 Standard C++ library as described in chapters 17 through 27 and annex D. For those who want to see exactly how far the project has come, or just want the latest bleeding-edge code, the up-to-date source is available over - anonymous SVN, and can even be browsed over the Web (see - 1.4 below). -

              -

              The older libstdc++-v2 project is no longer maintained; the code - has been completely replaced and rewritten. - If you are using V2, then you need to - report bugs to your system vendor, not to the V3 list. -

              -

              A more formal description of the V3 goals can be found in the - official design document. + anonymous SVN, and can even be browsed over the + web.


              @@ -164,7 +156,7 @@ is overseen by the GCC team. All of the rapid development and near-legendary - portability + portability that are the hallmarks of an open-source project are being applied to libstdc++.

              @@ -192,17 +184,10 @@

              1.4 How do I get libstdc++?

              -

              The homepage - has instructions for retrieving the latest SVN sources, and for - browsing the SVN sources over the web. -

              +

              Stable versions of libstdc++-v3 are included with releases of the GCC compilers.

              -

              The subset commonly known as the Standard Template Library - (chapters 23 through 25, mostly) is adapted from the final release - of the SGI STL, with extensive changes. -


              1.5 When is libstdc++ going to be finished?

              @@ -266,7 +251,7 @@ which is no longer available, thanks deja...-->

              1.8 What if I have more questions?

              -

              If you have read the README and RELEASE-NOTES files, and your +

              If you have read the README file, and your question remains unanswered, then just ask the mailing list. At present, you do not need to be subscribed to the list to send a message to it. More information is available on the @@ -281,14 +266,14 @@ which is no longer available, thanks deja...-->


              -

              1.9 What are the license terms for libstdc++-v3?

              +

              1.9 What are the license terms for libstdc++?

              See our license description for these and related questions.


              2.0 Installation

              -

              2.1 How do I install libstdc++-v3?

              +

              2.1 How do I install libstdc++?

              Complete instructions are not given here (this is a FAQ, not an installation document), but the tools required are few:

              @@ -310,12 +295,10 @@ which is no longer available, thanks deja...--> with new flags such as --enable-threads are there also, as well as patches and instructions for working with GCC 2.95.

              -

              The top-level install.html and - RELEASE-NOTES files contain +

              The top-level install.html file contains the exact build and installation instructions. You may wish to browse those files over ViewVC ahead of time to get a feel for - what's required. RELEASE-NOTES is located in the - ".../docs/17_intro/" directory of the distribution. + what's required.


              @@ -343,7 +326,7 @@ which is no longer available, thanks deja...-->

              2.4 How do I know if it works?

              -

              libstdc++-v3 comes with its own testsuite. You do not need +

              libstdc++ comes with its own testsuite. You do not need to actually install the library ("make install") to run the testsuite, but you do need DejaGNU, as described @@ -367,7 +350,7 @@ which is no longer available, thanks deja...--> into your executable, not the entire library. Unfortunately, even if you only need a single function or variable from an object file, the entire object file is extracted. (There's nothing unique to C++ - or libstdc++-v3 about this; it's just common behavior, given here + or libstdc++ about this; it's just common behavior, given here for background reasons.)

              Some of the object files which make up libstdc++.a are rather large. @@ -376,7 +359,7 @@ which is no longer available, thanks deja...--> of your executable. Historically the best way around this was to only place a very few functions (often only a single one) in each source/object file; then extracting a single function is the same - as extracting a single .o file. For libstdc++-v3 this is only + as extracting a single .o file. For libstdc++ this is only possible to a certain extent; the object files in question contain template classes and template functions, pre-instantiated, and splitting those up causes severe maintenance headaches. @@ -449,7 +432,7 @@ which is no longer available, thanks deja...-->


              3.0 Platform-Specific Issues

              -

              3.1 Can libstdc++-v3 be used with <my +

              3.1 Can libstdc++ be used with <my favorite compiler>?

              Probably not. Yet.

              Because GCC advances so rapidly, development and testing of @@ -594,8 +577,7 @@ which is no longer available, thanks deja...-->

              4.0 Known Bugs and Non-Bugs

              Note that this section can get rapidly outdated -- such is the nature of an open-source project. For the latest information, join - the mailing list or look through recent archives. The RELEASE- - NOTES and BUGS files are generally kept up-to-date. + the mailing list or look through GCC bugzilla.

              For 3.0.1, the most common "bug" is an apparently missing "../" in include/Makefile, resulting in files @@ -631,13 +613,12 @@ which is no longer available, thanks deja...--> corner cases. Also, localization is incomplete. For whether it works well, or as you expect it to work, see 5.2.

              -

              Long answer: See the docs/html/17_intro/CHECKLIST file, which is - badly outdated... Also see the RELEASE-NOTES file, which is kept - more up to date. +

              Long answer: See the implementation status pages for C++98, + TR1, and C++0x.


              -

              4.2 Bugs in gcc/g++ (not libstdc++-v3)

              +

              4.2 Bugs in gcc/g++ (not libstdc++)

              This is by no means meant to be complete nor exhaustive, but mentions some problems that users may encounter when building or using libstdc++. If you are experiencing one of these @@ -646,8 +627,7 @@ which is no longer available, thanks deja...-->

              Before reporting a bug, examine the bugs database with the - category set to "libstdc++". The BUGS file in the source - tree also tracks known serious problems. + category set to "libstdc++".

              • Debugging is problematic, due to bugs in line-number generation @@ -746,7 +726,7 @@ which is no longer available, thanks deja...--> libstdc++-v2 library, which is nonstandard and unmaintained. Do not report problems with -v2 to the -v3 mailing list.

                -

                For GCC versions 3.0 and 3.1 the libstdc++-v3 header files are +

                For GCC versions 3.0 and 3.1 the libstdc++ header files are installed in ${prefix}/include/g++-v3 (see the 'v'?). Starting with version 3.2 the headers are installed in ${prefix}/include/c++/${version} as this prevents @@ -768,7 +748,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff

                Note that 2.95.x shipped with the old v2 library which is no longer maintained. Also note that gcc 2.95.3 fixes this problem, but - requires a separate patch for libstdc++-v3. + requires a separate patch for libstdc++.

                concept checks If you see compilation errors containing messages about @@ -855,8 +835,8 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff


                -

                5.2 What's next after libstdc++-v3?

                -

                Hopefully, not much. The goal of libstdc++-v3 is to produce +

                5.2 What's next after libstdc++?

                +

                Hopefully, not much. The goal of libstdc++ is to produce a fully-compliant, fully-portable Standard Library. After that, we're mostly done: there won't be any more compliance work to do. However: @@ -883,7 +863,7 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff

              • The current libstdc++ contains extensions to the Library which must be explicitly requested by client code (for example, the hash tables from SGI). Other extensions may be added to - libstdc++-v3 if they seem to be "standard" enough. + libstdc++ if they seem to be "standard" enough. (For example, the "long long" type from C99.) Bugfixes and rewrites (to improve or fix thread safety, for instance) will of course be a continuing task. @@ -1061,8 +1041,8 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff


                -

                5.6 Is libstdc++-v3 thread-safe?

                -

                libstdc++-v3 strives to be thread-safe when all of the following +

                5.6 Is libstdc++ thread-safe?

                +

                libstdc++ strives to be thread-safe when all of the following conditions are met:

                  diff --git a/libstdc++-v3/docs/html/faq/index.txt b/libstdc++-v3/docs/html/faq/index.txt deleted file mode 100644 index 907de9f..0000000 --- a/libstdc++-v3/docs/html/faq/index.txt +++ /dev/null @@ -1,1118 +0,0 @@ - - #[1]GNU C++ Standard Library [2]Copyright - - libstdc++ Frequently Asked Questions - - The latest version of this document is always available at - [3]http://gcc.gnu.org/onlinedocs/libstdc++/faq/. The main - documentation page is at - [4]http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html. - - To the [5]libstdc++-v3 homepage. - _________________________________________________________________ - - Questions - - 1. [6]General Information - 1. [7]What is libstdc++-v3? - 2. [8]Why should I use libstdc++? - 3. [9]Who's in charge of it? - 4. [10]How do I get libstdc++? - 5. [11]When is libstdc++ going to be finished? - 6. [12]How do I contribute to the effort? - 7. [13]What happened to libg++? I need that! - 8. [14]What if I have more questions? - 9. [15]What are the license terms for libstdc++-v3? - 2. [16]Installation - 1. [17]How do I install libstdc++-v3? - 2. [18][removed] - 3. [19]What is this SVN thing that you keep mentioning? - 4. [20]How do I know if it works? - 5. [21]This library is HUGE! And what's libsupc++? - 6. [22]Why do I get an error saying libstdc++.so.X is missing - when I run my program? - 3. [23]Platform-Specific Issues - 1. [24]Can libstdc++-v3 be used with ? - 2. [25][removed] - 3. [26][removed] - 4. [27]I can't use 'long long' on Solaris - 5. [28]_XOPEN_SOURCE / _GNU_SOURCE / etc is always defined - 6. [29]OS X ctype.h is broken! How can I hack it? - 7. [30]Threading is broken on i386 - 8. [31]Recent GNU/Linux glibc required? - 9. [32]Can't use wchar_t/wstring on FreeBSD - 10. [33]MIPS atomic operations - 4. [34]Known Bugs and Non-Bugs - 1. [35]What works already? - 2. [36]Bugs in gcc/g++ (not libstdc++-v3) - 3. [37]Bugs in the C++ language/lib specification - 4. [38]Things in libstdc++ that only look like bugs - o [39]reopening a stream fails - o [40]-Weffc++ complains too much - o [41]"ambiguous overloads" after including an old-style - header - o [42]The g++-3 headers are not ours - o [43]compilation errors from streambuf.h - o [44]errors about *Concept and constraints in the STL... - o [45]program crashes when using library code in a - dynamically-loaded library - o [46]"memory leaks" in containers - 5. [47]Aw, that's easy to fix! - 5. [48]Miscellaneous - 1. [49]string::iterator is not char*; vector::iterator is not - T* - 2. [50]What's next after libstdc++-v3? - 3. [51]What about the STL from SGI? - 4. [52]Extensions and Backward Compatibility - 5. [53]Does libstdc++ support TR1? - 6. [54]Is libstdc++-v3 thread-safe? - 7. [55]How do I get a copy of the ISO C++ Standard? - 8. [56]What's an ABI and why is it so messy? - 9. [57]How do I make std::vector::capacity() == - std::vector::size? - _________________________________________________________________ - - 1.0 General Information - -1.1 What is libstdc++-v3? - - The GNU Standard C++ Library v3 is an ongoing project to implement the - ISO 14882 Standard C++ library as described in chapters 17 through 27 - and annex D. For those who want to see exactly how far the project has - come, or just want the latest bleeding-edge code, the up-to-date - source is available over anonymous SVN, and can even be browsed over - the Web (see [58]1.4 below). - - The older libstdc++-v2 project is no longer maintained; the code has - been completely replaced and rewritten. [59]If you are using V2, then - you need to report bugs to your system vendor, not to the V3 list. - - A more formal description of the V3 goals can be found in the official - [60]design document. - _________________________________________________________________ - -1.2 Why should I use libstdc++? - - The completion of the ISO C++ standardization gave the C++ community a - powerful set of reuseable tools in the form of the C++ Standard - Library. However, all existing C++ implementations are (as the Draft - Standard used to say) "incomplet and incorrekt," and many suffer from - limitations of the compilers that use them. - - The GNU C/C++/FORTRAN/ compiler (gcc, g++, etc) is - widely considered to be one of the leading compilers in the world. Its - development is overseen by the [61]GCC team. All of the rapid - development and near-legendary [62]portability that are the hallmarks - of an open-source project are being applied to libstdc++. - - That means that all of the Standard classes and functions (such as - string, vector<>, iostreams, and algorithms) will be freely available - and fully compliant. Programmers will no longer need to "roll their - own" nor be worried about platform-specific incompatibilities. - _________________________________________________________________ - -1.3 Who's in charge of it? - - The libstdc++ project is contributed to by several developers all over - the world, in the same way as GCC or Linux. Benjamin Kosnik, Gabriel - Dos Reis, Phil Edwards, Ulrich Drepper, Loren James Rittle, and Paolo - Carlini are the lead maintainers of the SVN archive. - - Development and discussion is held on the libstdc++ mailing list. - Subscribing to the list, or searching the list archives, is open to - everyone. You can read instructions for doing so on the [63]homepage. - If you have questions, ideas, code, or are just curious, sign up! - _________________________________________________________________ - -1.4 How do I get libstdc++? - - The [64]homepage has instructions for retrieving the latest SVN - sources, and for browsing the SVN sources over the web. - - Stable versions of libstdc++-v3 are included with releases of [65]the - GCC compilers. - - The subset commonly known as the Standard Template Library (chapters - 23 through 25, mostly) is adapted from the final release of the SGI - STL, with extensive changes. - _________________________________________________________________ - -1.5 When is libstdc++ going to be finished? - - Nathan Myers gave the best of all possible answers, responding to a - Usenet article asking this question: Sooner, if you help. - _________________________________________________________________ - -1.6 How do I contribute to the effort? - - Here is [66]a page devoted to this topic. Subscribing to the mailing - list (see above, or the homepage) is a very good idea if you have - something to contribute, or if you have spare time and want to help. - Contributions don't have to be in the form of source code; anybody who - is willing to help write documentation, for example, or has found a - bug in code that we all thought was working, is more than welcome! - _________________________________________________________________ - -1.7 What happened to libg++? I need that! - - The most recent libg++ README states that libg++ is no longer being - actively maintained. It should not be used for new projects, and is - only being kicked along to support older code. - - The libg++ was designed and created when there was no Standard to - provide guidance. Classes like linked lists are now provided for by - list and do not need to be created by genclass. (For that matter, - templates exist now and are well-supported, whereas genclass (mostly) - predates them.) - - There are other classes in libg++ that are not specified in the ISO - Standard (e.g., statistical analysis). While there are a lot of really - useful things that are used by a lot of people (e.g., statistics :-), - the Standards Committee couldn't include everything, and so a lot of - those "obvious" classes didn't get included. - - Since libstdc++ is an implementation of the Standard Library, we have - no plans at this time to include non-Standard utilities in the - implementation, however handy they are. (The extensions provided in - the SGI STL aren't maintained by us and don't get a lot of our - attention, because they don't require a lot of our time.) It is - entirely plausable that the "useful stuff" from libg++ might be - extracted into an updated utilities library, but nobody has started - such a project yet. - - (The [67]Boost site houses free C++ libraries that do varying things, - and happened to be started by members of the Standards Committee. - Certain "useful stuff" classes will probably migrate there.) - - For the bold and/or desperate, the [68]GCC extensions page describes - where to find the last libg++ source. - _________________________________________________________________ - -1.8 What if I have more questions? - - If you have read the README and RELEASE-NOTES files, and your question - remains unanswered, then just ask the mailing list. At present, you do - not need to be subscribed to the list to send a message to it. More - information is available on the homepage (including how to browse the - list archives); to send to the list, use [69]libstdc++@gcc.gnu.org. - - If you have a question that you think should be included here, or if - you have a question about a question/answer here, contact [70]Phil - Edwards or [71]Gabriel Dos Reis. - _________________________________________________________________ - -1.9 What are the license terms for libstdc++-v3? - - See [72]our license description for these and related questions. - _________________________________________________________________ - - 2.0 Installation - -2.1 How do I install libstdc++-v3? - - Complete instructions are not given here (this is a FAQ, not an - installation document), but the tools required are few: - * A 3.x release of GCC. Note that building GCC is much easier and - more automated than building the GCC 2.[78] series was. If you are - using GCC 2.95, you can still build earlier snapshots of - libstdc++. - * GNU Make is required for GCC 3.4 and later. - * The GNU Autotools are needed if you are messing with the configury - or makefiles. - - The file [73]documentation.html provides a good overview of the steps - necessary to build, install, and use the library. Instructions for - configuring the library with new flags such as --enable-threads are - there also, as well as patches and instructions for working with GCC - 2.95. - - The top-level install.html and [74]RELEASE-NOTES files contain the - exact build and installation instructions. You may wish to browse - those files over ViewVC ahead of time to get a feel for what's - required. RELEASE-NOTES is located in the ".../docs/17_intro/" - directory of the distribution. - _________________________________________________________________ - -2.2 [removed] - - This question has become moot and has been removed. The stub is here - to preserve numbering (and hence links/bookmarks). - _________________________________________________________________ - -2.3 What is this SVN thing that you keep mentioning? - - Subversion is one of several revision control packages. It was - selected for GNU projects because it's free (speech), free (beer), and - very high quality. The [75]Subversion home page has a better - description. - - The "anonymous client checkout" feature of SVN is similar to anonymous - FTP in that it allows anyone to retrieve the latest libstdc++ sources. - - After the first of April, American users will have a "/pharmacy" - command-line option... - _________________________________________________________________ - -2.4 How do I know if it works? - - libstdc++-v3 comes with its own testsuite. You do not need to actually - install the library ("make install") to run the testsuite, but you do - need DejaGNU, as described [76]here. - - To run the testsuite on the library after building it, use "make - check" while in your build directory. To run the testsuite on the - library after building and installing it, use "make check-install" - instead. - - If you find bugs in the testsuite programs themselves, or if you think - of a new test program that should be added to the suite, please write - up your idea and send it to the list! - _________________________________________________________________ - -2.5 This library is HUGE! And what's libsupc++? - - Usually the size of libraries on disk isn't noticeable. When a link - editor (or simply "linker") pulls things from a static archive - library, only the necessary object files are copied into your - executable, not the entire library. Unfortunately, even if you only - need a single function or variable from an object file, the entire - object file is extracted. (There's nothing unique to C++ or - libstdc++-v3 about this; it's just common behavior, given here for - background reasons.) - - Some of the object files which make up libstdc++.a are rather large. - If you create a statically-linked executable with -static, those large - object files are suddenly part of your executable. Historically the - best way around this was to only place a very few functions (often - only a single one) in each source/object file; then extracting a - single function is the same as extracting a single .o file. For - libstdc++-v3 this is only possible to a certain extent; the object - files in question contain template classes and template functions, - pre-instantiated, and splitting those up causes severe maintenance - headaches. - - It's not a bug, and it's not really a problem. Nevertheless, some - people don't like it, so here are two pseudo-solutions: - - If the only functions from libstdc++.a which you need are language - support functions (those listed in [77]clause 18 of the standard, - e.g., new and delete), then try linking against libsupc++.a (Using gcc - instead of g++ and explicitly linking in -lsupc++ for the final link - step will do it). This library contains only those support routines, - one per object file. But if you are using anything from the rest of - the library, such as IOStreams or vectors, then you'll still need - pieces from libstdc++.a. - - The second method is one we hope to incorporate into the library build - process. Some platforms can place each function and variable into its - own section in a .o file. The GNU linker can then perform garbage - collection on unused sections; this reduces the situation to only - copying needed functions into the executable, as before, but all - happens automatically. - - Unfortunately the garbage collection in GNU ld is buggy; sections - (corresponding to functions and variables) which are used are - mistakenly removed, leading to horrible crashes when your executable - starts up. For the time being, this feature is not used when building - the library. - _________________________________________________________________ - -2.6 Why do I get an error saying libstdc++.so.X is missing when I run my -program? - - Depending on your platform and library version, the message might be - similar to one of the following: - ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open -shared object file: No such file or directory - - /usr/libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found - - This doesn't mean that the shared library isn't installed, only that - the dynamic linker can't find it. When a dynamically-linked executable - is run the linker finds and loads the required shared libraries by - searching a pre-configured list of directories. If the directory where - you've installed libstdc++ is not in this list then the libraries - won't be found. The simplest way to fix this is to use the - LD_LIBRARY_PATH environment variable, which is a colon-separated list - of directories in which the linker will search for shared libraries: - LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - - The exact environment variable to use will depend on your platform, - e.g. DYLD_LIBRARY_PATH for Darwin, - LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit, - LD_LIBRARYN32_PATH/LD_LIBRARY64_PATH for Irix N32/64-bit ABIs and - SHLIB_PATH for HP-UX. - - See the man pages for ld(1), ldd(1) and ldconfig(8) for more - information. The dynamic linker has different names on different - platforms but the man page is usually called something such as ld.so / - rtld / dld.so. - _________________________________________________________________ - - 3.0 Platform-Specific Issues - -3.1 Can libstdc++-v3 be used with ? - - Probably not. Yet. - - Because GCC advances so rapidly, development and testing of libstdc++ - is being done almost entirely under that compiler. If you are curious - about whether other, lesser compilers (*grin*) support libstdc++, you - are more than welcome to try. Configuring and building the library - (see above) will still require certain tools, however. Also keep in - mind that building libstdc++ does not imply that your compiler will be - able to use all of the features found in the C++ Standard Library. - - Since the goal of ISO Standardization is for all C++ implementations - to be able to share code, the final libstdc++ should, in theory, be - usable under any ISO-compliant compiler. It will still be targeted and - optimized for GCC/g++, however. - _________________________________________________________________ - -3.2 [removed] - - This question has become moot and has been removed. The stub is here - to preserve numbering (and hence links/bookmarks). - _________________________________________________________________ - -3.3 [removed] - - This question has become moot and has been removed. The stub is here - to preserve numbering (and hence links/bookmarks). - _________________________________________________________________ - -3.4 I can't use 'long long' on Solaris - - By default we try to support the C99 long long type. This requires - that certain functions from your C library be present. - - Up through release 3.0.2 the tests performed were too general, and - this feature was disabled when it did not need to be. The most - commonly reported platform affected was Solaris. - - This has been fixed for 3.0.3 and onwards. - _________________________________________________________________ - -3.5 _XOPEN_SOURCE / _GNU_SOURCE / etc is always defined - - On Solaris, g++ (but not gcc) always defines the preprocessor macro - _XOPEN_SOURCE. On GNU/Linux, the same happens with _GNU_SOURCE. (This - is not an exhaustive list; other macros and other platforms are also - affected.) - - These macros are typically used in C library headers, guarding new - versions of functions from their older versions. The C++ standard - library includes the C standard library, but it requires the C90 - version, which for backwards-compatability reasons is often not the - default for many vendors. - - More to the point, the C++ standard requires behavior which is only - available on certain platforms after certain symbols are defined. - Usually the issue involves I/O-related typedefs. In order to ensure - correctness, the compiler simply predefines those symbols. - - Note that it's not enough to #define them only when the library is - being built (during installation). Since we don't have an 'export' - keyword, much of the library exists as headers, which means that the - symbols must also be defined as your programs are parsed and compiled. - - To see which symbols are defined, look for CPLUSPLUS_CPP_SPEC in the - gcc config headers for your target (and try changing them to see what - happens when building complicated code). You can also run "g++ -E -dM - - < /dev/null" to display a list of predefined macros for any - particular installation. - - This has been discussed on the mailing lists [78]quite a bit. - - This method is something of a wart. We'd like to find a cleaner - solution, but nobody yet has contributed the time. - _________________________________________________________________ - -3.6 OS X ctype.h is broken! How can I hack it? - - This is a long-standing bug in the OS X support. Fortunately, the - patch is quite simple, and well-known. [79]Here's a link to the - solution. - _________________________________________________________________ - -3.7 Threading is broken on i386 - - Support for atomic integer operations is/was broken on i386 platforms. - The assembly code accidentally used opcodes that are only available on - the i486 and later. So if you configured GCC to target, for example, - i386-linux, but actually used the programs on an i686, then you would - encounter no problems. Only when actually running the code on a i386 - will the problem appear. - - This is fixed in 3.2.2. - _________________________________________________________________ - -3.8 Recent GNU/Linux glibc required? - - When running on GNU/Linux, libstdc++ 3.2.1 (shared library version - 5.0.1) and later uses localization and formatting code from the system - C library (glibc) version 2.2.5. That version of glibc is over a year - old and contains necessary bugfixes. Many GNU/Linux distros make glibc - version 2.3.x available now. - - The guideline is simple: the more recent the C++ library, the more - recent the C library. (This is also documented in the main GCC - installation instructions.) - _________________________________________________________________ - -3.9 Can't use wchar_t/wstring on FreeBSD - - At the moment there are a few problems in FreeBSD's support for wide - character functions, and as a result the libstdc++ configury decides - that wchar_t support should be disabled. Once the underlying problems - are fixed in FreeBSD (soon), the library support will automatically - enable itself. - - You can fix the problems yourself, and learn more about the situation, - by reading [80]this short thread ("_GLIBCPP_USE_WCHAR_T undefined in - FreeBSD's c++config.h?"). - _________________________________________________________________ - -3.10 MIPS atomic operations - - The atomic locking routines for MIPS targets requires MIPS II and - later. A patch went in just after the 3.3 release to make mips* use - the generic implementation instead. You can also configure for - mipsel-elf as a workaround. - - mips*-*-linux* continues to use the MIPS II routines, and more work in - this area is expected. - _________________________________________________________________ - - 4.0 Known Bugs and Non-Bugs - - Note that this section can get rapdily outdated -- such is the nature - of an open-source project. For the latest information, join the - mailing list or look through recent archives. The RELEASE- NOTES and - BUGS files are generally kept up-to-date. - - For 3.0.1, the most common "bug" is an apparently missing "../" in - include/Makefile, resulting in files like gthr.h and gthr-single.h not - being found. Please read [81]the configuration instructions for GCC, - specifically the part about configuring in a separate build directory, - and how strongly recommended it is. Building in the source directory - is fragile, is rarely tested, and tends to break, as in this case. - This was fixed for 3.0.2. - - For 3.1, the most common "bug" is a parse error when using , - ending with a message, "bits/basic_file.h:52: parse error before `{' - token." Please read [82]the installation instructions for GCC, - specifically the part about not installing newer versions on top of - older versions. If you install 3.1 over a 3.0.x release, then the - wrong basic_file.h header will be found (its location changed between - releases). - - Please do not report these as bugs. We know about them. Reporting this - -- or any other problem that's already been fixed -- hinders the - development of GCC, because we have to take time to respond to your - report. Thank you. - _________________________________________________________________ - -4.1 What works already? - - Short answer: Pretty much everything works except for some corner - cases. Also, localization is incomplete. For whether it works well, or - as you expect it to work, see 5.2. - - Long answer: See the docs/html/17_intro/CHECKLIST file, which is badly - outdated... Also see the RELEASE-NOTES file, which is kept more up to - date. - _________________________________________________________________ - -4.2 Bugs in gcc/g++ (not libstdc++-v3) - - This is by no means meant to be complete nor exhaustive, but mentions - some problems that users may encounter when building or using - libstdc++. If you are experiencing one of these problems, you can find - more information on the libstdc++ and the GCC mailing lists. - - Before reporting a bug, examine the [83]bugs database with the - category set to "libstdc++". The BUGS file in the source tree also - tracks known serious problems. - * Debugging is problematic, due to bugs in line-number generation - (mostly fixed in the compiler) and gdb lagging behind the compiler - (lack of personnel). We recommend configuring the compiler using - --with-dwarf2 if the DWARF2 debugging format is not already the - default on your platform. Also, [84]changing your GDB settings can - have a profound effect on your C++ debugging experiences. :-) - _________________________________________________________________ - -4.3 Bugs in the C++ language/lib specification - - Yes, unfortunately, there are some. In a [85]message to the list, - Nathan Myers announced that he has started a list of problems in the - ISO C++ Standard itself, especially with regard to the chapters that - concern the library. The list itself is [86]posted on his website. - Developers who are having problems interpreting the Standard may wish - to consult his notes. - - For those people who are not part of the ISO Library Group (i.e., - nearly all of us needing to read this page in the first place :-), a - public list of the library defects is occasionally published [87]here. - Some of these have resulted in [88]code changes. - _________________________________________________________________ - -4.4 Things in libstdc++ that only look like bugs - - There are things which are not bugs in the compiler (4.2) nor the - language specification (4.3), but aren't really bugs in libstdc++, - either. Really! Please do not report these as bugs. - - -Weffc++ The biggest of these is the quadzillions of warnings about - the library headers emitted when -Weffc++ is used. Making libstdc++ - "-Weffc++-clean" is not a goal of the project, for a few reasons. - Mainly, that option tries to enforce object-oriented programming, - while the Standard Library isn't necessarily trying to be OO. - - reopening a stream fails Did I just say that -Weffc++ was our biggest - false-bug report? I lied. (It used to be.) Today it seems to be - reports that after executing a sequence like - #include - ... - std::fstream fs("a_file"); - // . - // . do things with fs... - // . - fs.close(); - fs.open("a_new_file"); - - all operations on the re-opened fs will fail, or at least act very - strangely. Yes, they often will, especially if fs reached the EOF - state on the previous file. The reason is that the state flags are not - cleared on a successful call to open(). The standard unfortunately did - not specify behavior in this case, and to everybody's great sorrow, - the [89]proposed LWG resolution in DR #22 is to leave the flags - unchanged. You must insert a call to fs.clear() between the calls to - close() and open(), and then everything will work like we all expect - it to work. Update: for GCC 4.0 we implemented the resolution of - [90]DR #409 and open() now calls clear() on success! - - rel_ops Another is the rel_ops namespace and the template comparison - operator functions contained therein. If they become visible in the - same namespace as other comparison functions (e.g., 'using' them and - the header), then you will suddenly be faced with huge - numbers of ambiguity errors. This was discussed on the -v3 list; - Nathan Myers [91]sums things up here. The collisions with - vector/string iterator types have been fixed for 3.1. - - The g++-3 headers are not ours - - If you have found an extremely broken header file which is causing - problems for you, look carefully before submitting a "high" priority - bug report (which you probably shouldn't do anyhow; see the last - paragraph of the page describing [92]the GCC bug database). - - If the headers are in ${prefix}/include/g++-3, or if the installed - library's name looks like libstdc++-2.10.a or libstdc++-libc6-2.10.so, - then you are using the old libstdc++-v2 library, which is nonstandard - and unmaintained. Do not report problems with -v2 to the -v3 mailing - list. - - For GCC versions 3.0 and 3.1 the libstdc++-v3 header files are - installed in ${prefix}/include/g++-v3 (see the 'v'?). Starting with - version 3.2 the headers are installed in - ${prefix}/include/c++/${version} as this prevents headers from - previous versions being found by mistake. - - glibc If you're on a GNU/Linux system and have just upgraded to glibc - 2.2, but are still using gcc 2.95.2, then you should have read the - glibc FAQ, specifically 2.34: -2.34. When compiling C++ programs, I get a compilation error in streambuf.h. - -{BH} You are using g++ 2.95.2? After upgrading to glibc 2.2, you need to -apply a patch to the include files in /usr/include/g++, because the fpos_t -type has changed in glibc 2.2. The patch is at -http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff - - - Note that 2.95.x shipped with the [93]old v2 library which is no - longer maintained. Also note that gcc 2.95.3 fixes this problem, but - requires a separate patch for libstdc++-v3. - - concept checks If you see compilation errors containing messages about - fooConcept and a constraints member function, then most likely you - have violated one of the requirements for types used during - instantiation of template containers and functions. For example, - EqualityComparableConcept appears if your types must be comparable - with == and you have not provided this capability (a typo, or wrong - visibility, or you just plain forgot, etc). - - More information, including how to optionally enable/disable the - checks, is available [94]here. - - dlopen/dlsym If you are using the C++ library across - dynamically-loaded objects, make certain that you are passing the - correct options when compiling and linking: - // compile your library components - g++ -fPIC -c a.cc - g++ -fPIC -c b.cc - ... - g++ -fPIC -c z.cc - - // create your library - g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o - - // link the executable - g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl - - "memory leaks" in containers A few people have reported that the - standard containers appear to leak memory when tested with memory - checkers such as [95]valgrind. The library's default allocators keep - free memory in a pool for later reuse, rather than returning it to the - OS. Although this memory is always reachable by the library and is - never lost, memory debugging tools can report it as a leak. If you - want to test the library for memory leaks please read [96]Tips for - memory leak hunting first. - _________________________________________________________________ - -4.5 Aw, that's easy to fix! - - If you have found a bug in the library and you think you have a - working fix, then send it in! The main GCC site has a page on - [97]submitting patches that covers the procedure, but for libstdc++ - you should also send the patch to our mailing list in addition to the - GCC patches mailing list. The libstdc++ [98]contributors' page also - talks about how to submit patches. - - In addition to the description, the patch, and the ChangeLog entry, it - is a Good Thing if you can additionally create a small test program to - test for the presence of the bug that your patch fixes. Bugs have a - way of being reintroduced; if an old bug creeps back in, it will be - caught immediately by the [99]testsuite -- but only if such a test - exists. - _________________________________________________________________ - - 5.0 Miscellaneous - -5.1 string::iterator is not char*; vector::iterator is not T* - - If you have code that depends on container iterators being - implemented as pointer-to-T, your code is broken. - - While there are arguments for iterators to be implemented in that - manner, A) they aren't very good ones in the long term, and B) they - were never guaranteed by the Standard anyway. The type-safety achieved - by making iterators a real class rather than a typedef for T* - outweighs nearly all opposing arguments. - - Code which does assume that a vector iterator i is a pointer can often - be fixed by changing i in certain expressions to &*i . Future - revisions of the Standard are expected to bless this usage for - vector<> (but not for basic_string<>). - _________________________________________________________________ - -5.2 What's next after libstdc++-v3? - - Hopefully, not much. The goal of libstdc++-v3 is to produce a - fully-compliant, fully-portable Standard Library. After that, we're - mostly done: there won't be any more compliance work to do. However: - 1. The ISO Committee will meet periodically to review Defect Reports - in the C++ Standard. Undoubtedly some of these will result in - changes to the Standard, which will be reflected in patches to - libstdc++. Some of that is already happening, see [100]4.3. Some - of those changes are being predicted by the library maintainers, - and we add code to the library based on what the current proposed - resolution specifies. Those additions are listed in [101]the - extensions page. - 2. Performance tuning. Lots of performance tuning. This too is - already underway for post-3.0 releases, starting with memory - expansion in container classes and buffer usage in synchronized - stream objects. - 3. An ABI for libstdc++ is being developed, so that multiple - binary-incompatible copies of the library can be replaced with a - single backwards-compatible library, like libgcc_s.so is. - 4. The current libstdc++ contains extensions to the Library which - must be explicitly requested by client code (for example, the hash - tables from SGI). Other extensions may be added to libstdc++-v3 if - they seem to be "standard" enough. (For example, the "long long" - type from C99.) Bugfixes and rewrites (to improve or fix thread - safety, for instance) will of course be a continuing task. - 5. There is an effort underway to add significant extensions to the - standard library specification. The latest version of this effort - is described in [102]The C++ Library Technical Report 1. See - [103]5.5. - - [104]This question about the next libstdc++ prompted some brief but - interesting [105]speculation. - _________________________________________________________________ - -5.3 What about the STL from SGI? - - The [106]STL from SGI, version 3.3, was the final merge of the STL - codebase. The code in libstdc++ contains many fixes and changes, and - the SGI code is no longer under active development. We expect that no - future merges will take place. - - In particular, string is not from SGI and makes no use of their "rope" - class (which is included as an optional extension), nor is valarray - and some others. Classes like vector<> are, however we have made - significant changes to them since then. - - The FAQ for SGI's STL (one jump off of their main page) is recommended - reading. - _________________________________________________________________ - -5.4 Extensions and Backward Compatibility - - Headers in the ext and backward subdirectories should be referred to - by their relative paths: - #include - - rather than using -I or other options. This is more portable and - forward-compatible. (The situation is the same as that of other - headers whose directories are not searched directly, e.g., - , . - - At this time most of the features of the SGI STL extension have been - replaced by standardized libraries. In particular, the unordered_map - and unordered_set containers of TR1 are suitable replacement for the - non-standard hash_map and hash_set containers in the SGI STL. See - [107]5.5 for more details. - - The extensions are no longer in the global or std namespaces, instead - they are declared in the __gnu_cxx namespace. For maximum portability, - consider defining a namespace alias to use to talk about extensions, - e.g.: - #ifdef __GNUC__ - #if __GNUC__ < 3 - #include - namespace Sgi { using ::hash_map; }; // inherit globals - #else - #include - #if __GNUC_MINOR__ == 0 - namespace Sgi = std; // GCC 3.0 - #else - namespace Sgi = ::__gnu_cxx; // GCC 3.1 and later - #endif - #endif - #else // ... there are other compilers, right? - namespace Sgi = std; - #endif - - Sgi::hash_map my_map; - - This is a bit cleaner than defining typedefs for all the - instantiations you might need. - - Note: explicit template specializations must be declared in the same - namespace as the original template. This means you cannot use a - namespace alias when declaring an explicit specialization. - - Extensions to the library have [108]their own page. - _________________________________________________________________ - -5.5 Does libstdc++ support TR1? - - The C++ Standard Library Technical Report adds many new features to - the library. The latest version of this effort is described in - [109]Technical Report 1. - - libstdc++ strives to implement all of TR1. An [110]overview of the - implementation status is available. - - Briefly, the features of TR1 and the current status are: - - Reference_wrapper - Complete - Useful to pass references to functions - that take their parameters by value. - - Reference-counted smart pointers - Complete - The shared_ptr and - weak_ptr allow several object to know about a pointer and whether it - is valid. When the last reference to the pointer is destroyed the - pointer is freed. - - Function objects - Complete - Function return types (i.e, result_of), - the functions template mem_fn (a generalization of mem_fun and - mem_fun_red), function object binders (e.g, bind, a generalization of - bind1st and bind2nd), and polymorhpic function wrappers (e.g, class - template function). - - Type traits - Complete - The type_traits class gives templates the - ability to probe information about the input type and enable - type-dependent logic to be performed without the need of template - specializations. - - A random number engine - Complete - This library contains randow - number generators with several different choices of distribution. - - Tuples - Complete - The tuple class implements small heterogeneous - arrays. This is an enhanced pair. In fact, the standard pair is - enhanced with a tuple interface. - - Fixed-size arrays - Complete - The array class implements small - fixed-sized arrays with container semantics. - - Unordered containers - Complete - The unordered_set, unordered_map, - unordered_multiset, and unordered_multimap containers are hashed - versions of the map, set, multimap, and multiset containers - respectively. These classes are suitable replacements for the SGI STL - hash_map and hash_set extensions. - - C99 compatibility - Under construction - There are many features - designed to minimize the divergence of the C and the C++ languages. - - Special functions - Under construction - Twenty-three mathematical - functions familiar to physicists and engineers are included: - cylindrical and spherical Bessel and Neumann functions, hypergeometric - functions, Laguerre polynomials, Legendre functions, elliptic - integrals, exponential integrals and the Riemann zeta function all for - your computing pleasure. - - A regular expression engine This library provides for regular - expression objects with traversal of text with return of - subexpressions. - _________________________________________________________________ - -5.6 Is libstdc++-v3 thread-safe? - - libstdc++-v3 strives to be thread-safe when all of the following - conditions are met: - * The system's libc is itself thread-safe, - * gcc -v reports a thread model other than 'single', - * [pre-3.3 only] a non-generic implementation of atomicity.h exists - for the architecture in question. - - The user-code must guard against concurrent method calls which may - access any particular library object's state. Typically, the - application programmer may infer what object locks must be held based - on the objects referenced in a method call. Without getting into great - detail, here is an example which requires user-level locks: - library_class_a shared_object_a; - - thread_main () { - library_class_b *object_b = new library_class_b; - shared_object_a.add_b (object_b); // must hold lock for shared_object_ -a - shared_object_a.mutate (); // must hold lock for shared_object_ -a - } - - // Multiple copies of thread_main() are started in independent threads. - - Under the assumption that object_a and object_b are never exposed to - another thread, here is an example that should not require any - user-level locks: - thread_main () { - library_class_a object_a; - library_class_b *object_b = new library_class_b; - object_a.add_b (object_b); - object_a.mutate (); - } - - All library objects are safe to use in a multithreaded program as long - as each thread carefully locks out access by any other thread while it - uses any object visible to another thread, i.e., treat library objects - like any other shared resource. In general, this requirement includes - both read and write access to objects; unless otherwise documented as - safe, do not assume that two threads may access a shared standard - library object at the same time. - - See chapters [111]17 (library introduction), [112]23 (containers), and - [113]27 (I/O) for more information. - _________________________________________________________________ - -5.7 How do I get a copy of the ISO C++ Standard? - - Copies of the full ISO 14882 standard are available on line via the - ISO mirror site for committee members. Non-members, or those who have - not paid for the privilege of sitting on the committee and sustained - their two-meeting commitment for voting rights, may get a copy of the - standard from their respective national standards organization. In the - USA, this national standards organization is ANSI and their website is - right [114]here. (And if you've already registered with them, clicking - this link will take you to directly to the place where you can - [115]buy the standard on-line. - - Who is your country's member body? Visit the [116]ISO homepage and - find out! - _________________________________________________________________ - -5.8 What's an ABI and why is it so messy? - - "ABI" stands for "Application Binary Interface." Conventionally, it - refers to a great mass of details about how arguments are arranged on - the call stack and/or in registers, and how various types are arranged - and padded in structs. A single CPU design may suffer multiple ABIs - designed by different development tool vendors who made different - choices, or even by the same vendor for different target applications - or compiler versions. In ideal circumstances the CPU designer presents - one ABI and all the OSes and compilers use it. In practice every ABI - omits details that compiler implementers (consciously or accidentally) - must choose for themselves. - - That ABI definition suffices for compilers to generate code so a - program can interact safely with an OS and its lowest-level libraries. - Users usually want an ABI to encompass more detail, allowing libraries - built with different compilers (or different releases of the same - compiler!) to be linked together. For C++, this includes many more - details than for C, and CPU designers (for good reasons elaborated - below) have not stepped up to publish C++ ABIs. The details include - virtual function implementation, struct inheritance layout, name - mangling, and exception handling. Such an ABI has been defined for GNU - C++, and is immediately useful for embedded work relying only on a - "free-standing implementation" that doesn't include (much of) the - standard library. It is a good basis for the work to come. - - A useful C++ ABI must also incorporate many details of the standard - library implementation. For a C ABI, the layouts of a few structs - (such as FILE, stat, jmpbuf, and the like) and a few macros suffice. - For C++, the details include the complete set of names of functions - and types used, the offsets of class members and virtual functions, - and the actual definitions of all inlines. C++ exposes many more - library details to the caller than C does. It makes defining a - complete ABI a much bigger undertaking, and requires not just - documenting library implementation details, but carefully designing - those details so that future bug fixes and optimizations don't force - breaking the ABI. - - There are ways to help isolate library implementation details from the - ABI, but they trade off against speed. Library details used in inner - loops (e.g., getchar) must be exposed and frozen for all time, but - many others may reasonably be kept hidden from user code, so they may - later be changed. Deciding which, and implementing the decisions, must - happen before you can reasonably document a candidate C++ ABI that - encompasses the standard library. - _________________________________________________________________ - -5.9 How do I make std::vector::capacity() == std::vector::size()? - - The standard idiom for deallocating a std::vector's unused memory - is to create a temporary copy of the vector and swap their contents, - e.g. for std::vector v - std::vector(v).swap(v); - - - The copy will take O(n) time and the swap is constant time. - - See [117]Shrink-to-fit strings for a similar solution for strings. - _________________________________________________________________ - - See [118]license.html for copying conditions. Comments and suggestions - are welcome, and may be sent to [119]the libstdc++ mailing list. - -References - - 1. ../documentation.html - 2. ../17_intro/license.html - 3. http://gcc.gnu.org/onlinedocs/libstdc++/faq/ - 4. http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html - 5. http://gcc.gnu.org/libstdc++/ - 6. ../faq/index.html#1_0 - 7. ../faq/index.html#1_1 - 8. ../faq/index.html#1_2 - 9. ../faq/index.html#1_3 - 10. ../faq/index.html#1_4 - 11. ../faq/index.html#1_5 - 12. ../faq/index.html#1_6 - 13. ../faq/index.html#1_7 - 14. ../faq/index.html#1_8 - 15. ../faq/index.html#1_9 - 16. ../faq/index.html#2_0 - 17. ../faq/index.html#2_1 - 18. ../faq/index.html#2_2 - 19. ../faq/index.html#2_3 - 20. ../faq/index.html#2_4 - 21. ../faq/index.html#2_5 - 22. ../faq/index.html#2_6 - 23. ../faq/index.html#3_0 - 24. ../faq/index.html#3_1 - 25. ../faq/index.html#3_2 - 26. ../faq/index.html#3_3 - 27. ../faq/index.html#3_4 - 28. ../faq/index.html#3_5 - 29. ../faq/index.html#3_6 - 30. ../faq/index.html#3_7 - 31. ../faq/index.html#3_8 - 32. ../faq/index.html#3_9 - 33. ../faq/index.html#3_10 - 34. ../faq/index.html#4_0 - 35. ../faq/index.html#4_1 - 36. ../faq/index.html#4_2 - 37. ../faq/index.html#4_3 - 38. ../faq/index.html#4_4 - 39. ../faq/index.html#4_4_iostreamclear - 40. ../faq/index.html#4_4_Weff - 41. ../faq/index.html#4_4_rel_ops - 42. ../faq/index.html#4_4_interface - 43. ../faq/index.html#4_4_glibc - 44. ../faq/index.html#4_4_checks - 45. ../faq/index.html#4_4_dlsym - 46. ../faq/index.html#4_4_leak - 47. ../faq/index.html#4_5 - 48. ../faq/index.html#5_0 - 49. ../faq/index.html#5_1 - 50. ../faq/index.html#5_2 - 51. ../faq/index.html#5_3 - 52. ../faq/index.html#5_4 - 53. ../faq/index.html#5_5 - 54. ../faq/index.html#5_6 - 55. ../faq/index.html#5_7 - 56. ../faq/index.html#5_8 - 57. ../faq/index.html#5_9 - 58. ../faq/index.html#1_4 - 59. ../faq/index.html#4_4_interface - 60. ../17_intro/DESIGN - 61. http://gcc.gnu.org/ - 62. http://gcc.gnu.org/gcc-3.3/buildstat.html - 63. http://gcc.gnu.org/libstdc++/ - 64. http://gcc.gnu.org/libstdc++/ - 65. http://gcc.gnu.org/releases.html - 66. ../17_intro/contribute.html - 67. http://www.boost.org/ - 68. http://gcc.gnu.org/extensions.html - 69. mailto:libstdc++@gcc.gnu.org - 70. mailto:pme@gcc.gnu.org - 71. mailto:gdr@gcc.gnu.org - 72. ../17_intro/license.html - 73. ../documentation.html - 74. ../17_intro/RELEASE-NOTES - 75. http://subversion.tigris.org/ - 76. http://gcc.gnu.org/install/test.html - 77. ../18_support/howto.html - 78. http://gcc.gnu.org/cgi-bin/htsearch?method=and&format=builtin-long&sort=score&words=_XOPEN_SOURCE+Solaris - 79. http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html - 80. http://gcc.gnu.org/ml/libstdc++/2003-02/subjects.html#00286 - 81. http://gcc.gnu.org/install/configure.html - 82. http://gcc.gnu.org/install/ - 83. http://gcc.gnu.org/bugs.html - 84. http://gcc.gnu.org/ml/libstdc++/2002-02/msg00034.html - 85. http://gcc.gnu.org/ml/libstdc++/1998/msg00006.html - 86. http://www.cantrip.org/draft-bugs.txt - 87. http://anubis.dkuug.dk/jtc1/sc22/wg21/ - 88. ../faq/index.html#5_2 - 89. ../ext/howto.html#5 - 90. ../ext/howto.html#5 - 91. http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html - 92. http://gcc.gnu.org/bugs.html - 93. ../faq/index.html#4_4_interface - 94. ../19_diagnostics/howto.html#3 - 95. http://developer.kde.org/~sewardj/ - 96. ../debug.html#mem - 97. http://gcc.gnu.org/contribute.html - 98. ../17_intro/contribute.html - 99. ../faq/index.html#2_4 - 100. ../faq/index.html#4_3 - 101. ../ext/howto.html#5 - 102. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf - 103. ../faq/index.html#5_5 - 104. http://gcc.gnu.org/ml/libstdc++/1999/msg00080.html - 105. http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html - 106. http://www.sgi.com/tech/stl/ - 107. ../faq/index.html#5_5 - 108. ../ext/howto.html - 109. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf - 110. ../ext/tr1.html - 111. ../17_intro/howto.html#3 - 112. ../23_containers/howto.html#3 - 113. ../27_io/howto.html#9 - 114. http://www.ansi.org/ - 115. http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%3A2003 - 116. http://www.iso.ch/ - 117. ../21_strings/howto.html#6 - 118. ../17_intro/license.html - 119. mailto:libstdc++@gcc.gnu.org diff --git a/libstdc++-v3/docs/html/install.html b/libstdc++-v3/docs/html/install.html index ab19b6f..120f0c8 100644 --- a/libstdc++-v3/docs/html/install.html +++ b/libstdc++-v3/docs/html/install.html @@ -6,10 +6,10 @@ - + - libstdc++-v3 Installation Instructions + libstdc++ Installation Instructions @@ -24,7 +24,7 @@

                  - To the libstdc++-v3 homepage. + To the libstdc++ homepage.

                  @@ -32,10 +32,10 @@

                  Contents

                  -

                  Because libstdc++-v3 is part of GCC, the primary source for +

                  Because libstdc++ is part of GCC, the primary source for installation instructions is the GCC install page. - Additional data is given here only where it applies to libstdc++-v3. + Additional data is given here only where it applies to libstdc++.