From: Benjamin Kosnik Date: Sun, 30 Jan 2011 22:39:36 +0000 (+0000) Subject: PR libstdc++/36104 part four X-Git-Tag: releases/gcc-4.6.0~863 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12ffa228443fdfc80e72a5cfaa00604981f1bdaf;p=thirdparty%2Fgcc.git PR libstdc++/36104 part four 2011-01-30 Benjamin Kosnik PR libstdc++/36104 part four * include/bits/c++config (_GLIBCXX_STD): Remove. (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. (_GLIBCXX_P): Now _GLIBCXX_STD_A. (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, _GLIBCXX_INLINE_PROFILE): Remove. (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. (_GLIBCXX_END_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. (_GLIBCXX_END_NESTED_NAMESPACE): Remove. (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. (_GLIBCXX_END_NAMESPACE_ALGO): Add. (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. (_GLIBCXX_END_NAMESPACE_VERSION): Add. (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. * include/*: Use new macros for namespace scope. * config/*: Same. * src/*: Same. * src/Makefile.am (sources): Remove debug_list.cc, add compatibility-debug_list-2.cc. (parallel_sources): Remove parallel_list.cc, add compatibility-parallel_list-2.cc. (compatibility-parallel_list-2.[o,lo]): New rule. * src/Makefile.in: Regenerate. * src/debug_list.cc: Remove. * src/parallel_list.cc: Remove. * src/compatibility-list-2.cc: New. * src/compatibility-debug_list-2.cc: New. * src/compatibility-parallel_list-2.cc: New. * doc/doxygen/user.cfg.in: Adjust macros. * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. * testsuite/20_util/declval/requirements/1_neg.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. * testsuite/20_util/forward/c_neg.cc: Same. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/forward_list/capacity/1.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ assign_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/forward_list/requirements/dr438/ insert_neg.cc: Same. * testsuite/23_containers/list/capacity/29134.cc: Same. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Same. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. * testsuite/25_algorithms/sort/35588.cc: Same. * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. * testsuite/ext/profile/mutex_extensions_neg.cc: Same. * testsuite/ext/profile/profiler_algos.cc: Same. * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. From-SVN: r169421 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 063d57d5a4ae..62bbf8b94522 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,10 +1,105 @@ +2011-01-30 Benjamin Kosnik + + PR libstdc++/36104 part four + * include/bits/c++config (_GLIBCXX_STD): Remove. + (_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C. + (_GLIBCXX_P): Now _GLIBCXX_STD_A. + (_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL, + _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove. + (_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL, + _GLIBCXX_INLINE_PROFILE): Remove. + (_GLIBCXX_BEGIN_NAMESPACE(X)): Remove. + (_GLIBCXX_END_NAMESPACE): Remove. + (_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove. + (_GLIBCXX_END_NESTED_NAMESPACE): Remove. + (_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add. + (_GLIBCXX_END_NAMESPACE_ALGO): Add. + (_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add. + (_GLIBCXX_END_NAMESPACE_CONTAINER): Add. + (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add. + (_GLIBCXX_END_NAMESPACE_VERSION): Add. + (_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL. + (_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL. + (_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY. + * include/*: Use new macros for namespace scope. + * config/*: Same. + * src/*: Same. + + * src/Makefile.am (sources): Remove debug_list.cc, add + compatibility-debug_list-2.cc. + (parallel_sources): Remove parallel_list.cc, add + compatibility-parallel_list-2.cc. + (compatibility-parallel_list-2.[o,lo]): New rule. + * src/Makefile.in: Regenerate. + * src/debug_list.cc: Remove. + * src/parallel_list.cc: Remove. + * src/compatibility-list-2.cc: New. + * src/compatibility-debug_list-2.cc: New. + * src/compatibility-parallel_list-2.cc: New. + + * doc/doxygen/user.cfg.in: Adjust macros. + + * testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros. + * testsuite/20_util/declval/requirements/1_neg.cc: Same. + * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same. + * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same. + * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same. + * testsuite/20_util/forward/c_neg.cc: Same. + * testsuite/20_util/forward/f_neg.cc: Same. + * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. + * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. + * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same. + * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same. + * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same. + * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same. + * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_1_neg.cc: Same. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_2_neg.cc: Same. + * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same. + * testsuite/23_containers/forward_list/capacity/1.cc: Same. + * testsuite/23_containers/forward_list/requirements/dr438/ + assign_neg.cc: Same. + * testsuite/23_containers/forward_list/requirements/dr438/ + constructor_1_neg.cc: Same. + * testsuite/23_containers/forward_list/requirements/dr438/ + constructor_2_neg.cc: Same. + * testsuite/23_containers/forward_list/requirements/dr438/ + insert_neg.cc: Same. + * testsuite/23_containers/list/capacity/29134.cc: Same. + * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same. + * testsuite/23_containers/list/requirements/dr438/ + constructor_1_neg.cc: Same. + * testsuite/23_containers/list/requirements/dr438/ + constructor_2_neg.cc: Same. + * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same. + * testsuite/23_containers/vector/bool/capacity/29134.cc: Same. + * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same. + * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_1_neg.cc: Same. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_2_neg.cc: Same. + * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same. + * testsuite/25_algorithms/sort/35588.cc: Same. + * testsuite/27_io/ios_base/cons/assign_neg.cc: Same. + * testsuite/27_io/ios_base/cons/copy_neg.cc: Same. + * testsuite/ext/profile/mutex_extensions_neg.cc: Same. + * testsuite/ext/profile/profiler_algos.cc: Same. + * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same. + * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same. + * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same. + * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same. + * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same. + 2011-01-30 Gerald Pfeifer * doc/xml/manual/abi.xml: Adjust link to C++ ABI specification. Improve description of one such reference. 2011-01-30 Gerald Pfeifer - + * doc/xml/manual/codecvt.xml: Fix link to The Austin Common Standards Revision Group. * doc/xml/manual/locale.xml: Ditto. @@ -18,20 +113,20 @@ 2011-01-26 Johannes Singler - * include/parallel/numeric (inner_product, partial_sum): - Qualify subsequent call with __gnu_parallel instead of - _GLIBCXX_STD_P to reenable parallel execution without ambiguity. - * include/parallel/algobase.h (equal): Likewise. - * include/parallel/algo.h (find_first_of, search_n, merge, - nth_element, partial_sort, max_element, min_element): Likewise. - * testsuite/25_algorithms/headers/algorithm/ - parallel_algorithm_mixed1.cc (main): Add respective test cases. - * testsuite/25_algorithms/headers/algorithm/ - parallel_algorithm_mixed2.cc (main): Likewise. - * testsuite/26_numerics/headers/numeric/ - parallel_numeric_mixed1.cc (main): Likewise. - * testsuite/26_numerics/headers/numeric/ - parallel_numeric_mixed2.cc (main): Likewise. + * include/parallel/numeric (inner_product, partial_sum): + Qualify subsequent call with __gnu_parallel instead of + _GLIBCXX_STD_P to reenable parallel execution without ambiguity. + * include/parallel/algobase.h (equal): Likewise. + * include/parallel/algo.h (find_first_of, search_n, merge, + nth_element, partial_sort, max_element, min_element): Likewise. + * testsuite/25_algorithms/headers/algorithm/ + parallel_algorithm_mixed1.cc (main): Add respective test cases. + * testsuite/25_algorithms/headers/algorithm/ + parallel_algorithm_mixed2.cc (main): Likewise. + * testsuite/26_numerics/headers/numeric/ + parallel_numeric_mixed1.cc (main): Likewise. + * testsuite/26_numerics/headers/numeric/ + parallel_numeric_mixed2.cc (main): Likewise. 2011-01-24 Graham Reed @@ -41,23 +136,23 @@ 2011-01-24 Johannes Singler - PR libstdc++/47433 - * include/parallel/losertree.h - (_LoserTree<>::__delete_min_insert): - Do not qualify swap with std:: for value type, - but include a using directive instead. - (_LoserTreeUnguarded<>::__delete_min_insert): Likewise. - * include/parallel/balanced_quicksort.h (__qsb_divide): - Use std::iter_swap instead of std::swap. - (__qsb_local_sort_with_helping): Likewise. - * include/parallel/partition.h (__parallel_partition): - Likewise. (__parallel_nth_element): Likewise. + PR libstdc++/47433 + * include/parallel/losertree.h + (_LoserTree<>::__delete_min_insert): + Do not qualify swap with std:: for value type, + but include a using directive instead. + (_LoserTreeUnguarded<>::__delete_min_insert): Likewise. + * include/parallel/balanced_quicksort.h (__qsb_divide): + Use std::iter_swap instead of std::swap. + (__qsb_local_sort_with_helping): Likewise. + * include/parallel/partition.h (__parallel_partition): + Likewise. (__parallel_nth_element): Likewise. 2011-01-24 Johannes Singler - PR libstdc++/47437 - * include/parallel/multiway_merge.h (_UnguardedIterator): - Remove useless "mutable" from reference declaration. + PR libstdc++/47437 + * include/parallel/multiway_merge.h (_UnguardedIterator): + Remove useless "mutable" from reference declaration. 2011-01-21 Benjamin Kosnik diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver index dfb1345b0ce4..ab9380c37058 100644 --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver @@ -35,7 +35,8 @@ GLIBCXX_5.0 { _ZNSt2_69has_facetINS_*; # hash - _ZNSt2_68__detail12__prime_listE; + _ZNSt8__detail2_612__prime_listE; + _ZNSt3tr18__detail2_612__prime_listE; # thread/mutex/condition_variable/future __once_proxy; @@ -71,6 +72,13 @@ GLIBCXX_5.0 { _ZTv0_n*; + # std::__detail::_List_node_base + _ZNSt8__detail2_615_List_node_base7_M_hook*; + _ZNSt8__detail2_615_List_node_base9_M_unhookEv; + _ZNSt8__detail2_615_List_node_base10_M_reverseEv; + _ZNSt8__detail2_615_List_node_base11_M_transfer*; + _ZNSt8__detail2_615_List_node_base4swapER*; + # std::__convert_to_v _ZNSt2_614__convert_to_v*; @@ -102,19 +110,6 @@ GLIBCXX_5.0 { _ZN9__gnu_cxx2_618stdio_sync_filebufI[cw]NSt2_611char_traitsI[cw]EEE[5-9]*; # debug mode -# xxx cxx1998? - _ZN10__gnu_norm15_List_node_base4hook*; - _ZN10__gnu_norm15_List_node_base4swap*; - _ZN10__gnu_norm15_List_node_base6unhookEv; - _ZN10__gnu_norm15_List_node_base7reverseEv; - _ZN10__gnu_norm15_List_node_base8transfer*; - - _ZNSt6__norm15_List_node_base4hook*; - _ZNSt6__norm15_List_node_base4swap*; - _ZNSt6__norm15_List_node_base6unhookEv; - _ZNSt6__norm15_List_node_base7reverseEv; - _ZNSt6__norm15_List_node_base8transfer*; - _ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv; _ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv; _ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv; @@ -136,6 +131,10 @@ GLIBCXX_5.0 { _ZNK11__gnu_debug16_Error_formatter8_M_error*; _ZNK11__gnu_debug16_Error_formatter17_M_get_max_lengthEv; + # parallel mode + _ZN14__gnu_parallel9_Settings3getEv; + _ZN14__gnu_parallel9_Settings3setERS0_; + local: *; }; diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 6633273cbc94..67571395cc5e 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -1199,6 +1199,12 @@ GLIBCXX_3.4.15 { # std::placeholders _ZNSt12placeholders*; + _ZNSt8__detail15_List_node_base7_M_hook*; + _ZNSt8__detail15_List_node_base9_M_unhookEv; + _ZNSt8__detail15_List_node_base10_M_reverseEv; + _ZNSt8__detail15_List_node_base11_M_transfer*; + _ZNSt8__detail15_List_node_base4swapERS0_S1_; + } GLIBCXX_3.4.14; # Symbols in the support library (libsupc++) have their own tag. diff --git a/libstdc++-v3/config/cpu/cris/atomicity.h b/libstdc++-v3/config/cpu/cris/atomicity.h index 92254273e1ee..148a8b61c12a 100644 --- a/libstdc++-v3/config/cpu/cris/atomicity.h +++ b/libstdc++-v3/config/cpu/cris/atomicity.h @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) throw () @@ -83,4 +85,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(volatile _Atomic_word* __mem, int __val) throw () { __exchange_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/generic/atomicity_builtins/atomicity.h b/libstdc++-v3/config/cpu/generic/atomicity_builtins/atomicity.h index 3cd580a82db5..581c41fda0de 100644 --- a/libstdc++-v3/config/cpu/generic/atomicity_builtins/atomicity.h +++ b/libstdc++-v3/config/cpu/generic/atomicity_builtins/atomicity.h @@ -26,7 +26,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __attribute__ ((__unused__)) @@ -38,4 +40,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(volatile _Atomic_word* __mem, int __val) throw () { __sync_fetch_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h b/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h index 3f46e789c25d..dc0a5a065954 100644 --- a/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h +++ b/libstdc++-v3/config/cpu/generic/atomicity_mutex/atomicity.h @@ -36,7 +36,9 @@ namespace } } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __attribute__ ((__unused__)) @@ -54,4 +56,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(volatile _Atomic_word* __mem, int __val) throw () { __exchange_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/hppa/atomicity.h b/libstdc++-v3/config/cpu/hppa/atomicity.h index cf1ceb05ac82..a2ec4f2e97e7 100644 --- a/libstdc++-v3/config/cpu/hppa/atomicity.h +++ b/libstdc++-v3/config/cpu/hppa/atomicity.h @@ -25,7 +25,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Atomicity_lock @@ -88,4 +90,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) : : "r" (&lock), "r" (tmp) : "memory"); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/i386/atomicity.h b/libstdc++-v3/config/cpu/i386/atomicity.h index 8f7619307fe8..97205e42fe5e 100644 --- a/libstdc++-v3/config/cpu/i386/atomicity.h +++ b/libstdc++-v3/config/cpu/i386/atomicity.h @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template struct _Atomicity_lock @@ -67,4 +69,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(volatile _Atomic_word* __mem, int __val) throw () { __exchange_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/i486/atomicity.h b/libstdc++-v3/config/cpu/i486/atomicity.h index d9e68f4d8caf..602cbb7114b0 100644 --- a/libstdc++-v3/config/cpu/i486/atomicity.h +++ b/libstdc++-v3/config/cpu/i486/atomicity.h @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __attribute__ ((__unused__)) @@ -45,5 +47,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) : "=m" (*__mem) : "ir" (__val), "m" (*__mem)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/ia64/atomic_word.h b/libstdc++-v3/config/cpu/ia64/atomic_word.h index e1251c5d1bbb..9dfbf00ec969 100644 --- a/libstdc++-v3/config/cpu/ia64/atomic_word.h +++ b/libstdc++-v3/config/cpu/ia64/atomic_word.h @@ -29,7 +29,7 @@ typedef int _Atomic_word; -namespace __gnu_cxx +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { // Test the first byte of __g and ensure that no loads are hoisted across // the test. diff --git a/libstdc++-v3/config/cpu/m68k/atomicity.h b/libstdc++-v3/config/cpu/m68k/atomicity.h index 5b3692eecefb..5711255844b7 100644 --- a/libstdc++-v3/config/cpu/m68k/atomicity.h +++ b/libstdc++-v3/config/cpu/m68k/atomicity.h @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #if ( defined(__mc68020__) || defined(__mc68030__) \ || defined(__mc68040__) || defined(__mc68060__) ) \ @@ -126,4 +128,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __exchange_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/cpu/sh/atomicity.h b/libstdc++-v3/config/cpu/sh/atomicity.h index 9b240afbcc7c..ece63ce2a48c 100644 --- a/libstdc++-v3/config/cpu/sh/atomicity.h +++ b/libstdc++-v3/config/cpu/sh/atomicity.h @@ -27,7 +27,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION typedef int _Atomic_word; @@ -66,7 +68,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) : "r0"); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #else /* !__SH4A__ */ @@ -80,7 +83,9 @@ namespace __gnu_cxx::__mutex atomic_mutex; } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __attribute__ ((__unused__)) @@ -98,6 +103,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(volatile _Atomic_word* __mem, int __val) throw () { __exchange_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* !__SH4A__ */ diff --git a/libstdc++-v3/config/cpu/sparc/atomicity.h b/libstdc++-v3/config/cpu/sparc/atomicity.h index 1ead48d2788e..c032e540e350 100644 --- a/libstdc++-v3/config/cpu/sparc/atomicity.h +++ b/libstdc++-v3/config/cpu/sparc/atomicity.h @@ -25,7 +25,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef __arch64__ _Atomic_word @@ -119,4 +121,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } #endif /* __arch32__ */ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/io/basic_file_stdio.cc b/libstdc++-v3/config/io/basic_file_stdio.cc index d2de028f099a..1b7e1bba5a94 100644 --- a/libstdc++-v3/config/io/basic_file_stdio.cc +++ b/libstdc++-v3/config/io/basic_file_stdio.cc @@ -179,7 +179,9 @@ namespace } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for __basic_file. __basic_file::__basic_file(__c_lock* /*__lock*/) throw() @@ -378,5 +380,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return 0; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/io/basic_file_stdio.h b/libstdc++-v3/config/io/basic_file_stdio.h index 96939392a9a3..f543a8976d7c 100644 --- a/libstdc++-v3/config/io/basic_file_stdio.h +++ b/libstdc++-v3/config/io/basic_file_stdio.h @@ -41,7 +41,9 @@ #include // for __c_lock and __c_file #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Generic declaration. template @@ -103,6 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) showmanyc(); }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/io/c_io_stdio.h b/libstdc++-v3/config/io/c_io_stdio.h index 6a21a887c657..0843df78d598 100644 --- a/libstdc++-v3/config/io/c_io_stdio.h +++ b/libstdc++-v3/config/io/c_io_stdio.h @@ -36,13 +36,16 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION typedef __gthread_mutex_t __c_lock; // for basic_file.h typedef FILE __c_file; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/locale/darwin/ctype_members.cc b/libstdc++-v3/config/locale/darwin/ctype_members.cc index e1dd0f2a4f91..4b42bc2c00e1 100644 --- a/libstdc++-v3/config/locale/darwin/ctype_members.cc +++ b/libstdc++-v3/config/locale/darwin/ctype_members.cc @@ -35,7 +35,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { // NB: The other ctype specializations are in src/locale.cc and // various /config/os/* files. diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc index 468816092d71..fb9b425daabf 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.cc +++ b/libstdc++-v3/config/locale/generic/c_locale.cc @@ -41,7 +41,9 @@ #include #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> void @@ -229,9 +231,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::facet::_S_lc_ctype_c_locale(__c_locale, const char*) { return __c_locale(); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = { @@ -243,13 +248,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) "LC_MESSAGES" }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION const char* const* const locale::_S_categories = __gnu_cxx::category_names; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h index 29c16a210342..2c7600047e24 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.h +++ b/libstdc++-v3/config/locale/generic/c_locale.h @@ -43,7 +43,9 @@ #define _GLIBCXX_NUM_CATEGORIES 0 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION typedef int* __c_locale; @@ -85,6 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __ret; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/locale/generic/codecvt_members.cc b/libstdc++-v3/config/locale/generic/codecvt_members.cc index 655ce8226669..f0de79e79230 100644 --- a/libstdc++-v3/config/locale/generic/codecvt_members.cc +++ b/libstdc++-v3/config/locale/generic/codecvt_members.cc @@ -34,7 +34,9 @@ #include // For MB_LEN_MAX #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specializations. #ifdef _GLIBCXX_USE_WCHAR_T @@ -214,4 +216,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/collate_members.cc b/libstdc++-v3/config/locale/generic/collate_members.cc index e7753e06f8af..da12ccd138f0 100644 --- a/libstdc++-v3/config/locale/generic/collate_members.cc +++ b/libstdc++-v3/config/locale/generic/collate_members.cc @@ -32,7 +32,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // These are basically extensions to char_traits, and perhaps should // be put there instead of here. @@ -68,4 +70,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return wcsxfrm(__to, __from, __n); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/ctype_members.cc b/libstdc++-v3/config/locale/generic/ctype_members.cc index ae08c3b01696..e6ced3973091 100644 --- a/libstdc++-v3/config/locale/generic/ctype_members.cc +++ b/libstdc++-v3/config/locale/generic/ctype_members.cc @@ -34,7 +34,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // NB: The other ctype specializations are in src/locale.cc and // various /config/os/* files. @@ -266,4 +268,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif // _GLIBCXX_USE_WCHAR_T -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/messages_members.cc b/libstdc++-v3/config/locale/generic/messages_members.cc index f0402ec005b9..b8610ddb3b7c 100644 --- a/libstdc++-v3/config/locale/generic/messages_members.cc +++ b/libstdc++-v3/config/locale/generic/messages_members.cc @@ -30,7 +30,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specializations template<> @@ -45,4 +47,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __dfault; } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/messages_members.h b/libstdc++-v3/config/locale/generic/messages_members.h index 79545f9672b2..f66d4be3b136 100644 --- a/libstdc++-v3/config/locale/generic/messages_members.h +++ b/libstdc++-v3/config/locale/generic/messages_members.h @@ -34,7 +34,9 @@ // Written by Benjamin Kosnik -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Non-virtual member functions. template @@ -87,4 +89,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/monetary_members.cc b/libstdc++-v3/config/locale/generic/monetary_members.cc index 26b435860bef..91f014fee838 100644 --- a/libstdc++-v3/config/locale/generic/monetary_members.cc +++ b/libstdc++-v3/config/locale/generic/monetary_members.cc @@ -31,7 +31,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Construct and return valid pattern consisting of some combination of: // space none symbol sign value @@ -165,4 +167,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { delete _M_data; } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/numeric_members.cc b/libstdc++-v3/config/locale/generic/numeric_members.cc index a40944435e6b..d7d6647d57e9 100644 --- a/libstdc++-v3/config/locale/generic/numeric_members.cc +++ b/libstdc++-v3/config/locale/generic/numeric_members.cc @@ -30,7 +30,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> void @@ -99,5 +101,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { delete _M_data; } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/time_members.cc b/libstdc++-v3/config/locale/generic/time_members.cc index 040e228fd05f..30310752b242 100644 --- a/libstdc++-v3/config/locale/generic/time_members.cc +++ b/libstdc++-v3/config/locale/generic/time_members.cc @@ -34,7 +34,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> void @@ -206,4 +208,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/generic/time_members.h b/libstdc++-v3/config/locale/generic/time_members.h index 785a272aac54..ff26bef230dc 100644 --- a/libstdc++-v3/config/locale/generic/time_members.h +++ b/libstdc++-v3/config/locale/generic/time_members.h @@ -36,7 +36,9 @@ // Written by Benjamin Kosnik -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template __timepunct<_CharT>::__timepunct(size_t __refs) @@ -88,4 +90,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _S_destroy_c_locale(_M_c_locale_timepunct); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/c_locale.cc b/libstdc++-v3/config/locale/gnu/c_locale.cc index 9706e414dd5e..adfeb621977b 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.cc +++ b/libstdc++-v3/config/locale/gnu/c_locale.cc @@ -35,7 +35,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> void @@ -169,9 +171,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __changed; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = { @@ -189,13 +194,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) "LC_IDENTIFICATION" }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION const char* const* const locale::_S_categories = __gnu_cxx::category_names; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h index f3aa2e3cef21..eb0d6714e1e5 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.h +++ b/libstdc++-v3/config/locale/gnu/c_locale.h @@ -46,14 +46,19 @@ #define _GLIBCXX_NUM_CATEGORIES 6 #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION extern "C" __typeof(uselocale) __uselocale; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION typedef __locale_t __c_locale; @@ -104,6 +109,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __ret; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/locale/gnu/codecvt_members.cc b/libstdc++-v3/config/locale/gnu/codecvt_members.cc index 7cc12edc1915..a1029f09a72d 100644 --- a/libstdc++-v3/config/locale/gnu/codecvt_members.cc +++ b/libstdc++-v3/config/locale/gnu/codecvt_members.cc @@ -34,7 +34,9 @@ #include // For MB_LEN_MAX #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specializations. #ifdef _GLIBCXX_USE_WCHAR_T @@ -302,4 +304,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/collate_members.cc b/libstdc++-v3/config/locale/gnu/collate_members.cc index bcd415355f4c..00056ad5a486 100644 --- a/libstdc++-v3/config/locale/gnu/collate_members.cc +++ b/libstdc++-v3/config/locale/gnu/collate_members.cc @@ -31,7 +31,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // These are basically extensions to char_traits, and perhaps should // be put there instead of here. @@ -67,4 +69,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/ctype_members.cc b/libstdc++-v3/config/locale/gnu/ctype_members.cc index 6965694297dd..8a478e97aae4 100644 --- a/libstdc++-v3/config/locale/gnu/ctype_members.cc +++ b/libstdc++-v3/config/locale/gnu/ctype_members.cc @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // NB: The other ctype specializations are in src/locale.cc and // various /config/os/* files. @@ -300,4 +302,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif // _GLIBCXX_USE_WCHAR_T -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/messages_members.cc b/libstdc++-v3/config/locale/gnu/messages_members.cc index 94ebcb5fa7f2..4154e8938110 100644 --- a/libstdc++-v3/config/locale/gnu/messages_members.cc +++ b/libstdc++-v3/config/locale/gnu/messages_members.cc @@ -31,7 +31,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specializations. template<> @@ -80,4 +82,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/messages_members.h b/libstdc++-v3/config/locale/gnu/messages_members.h index 836f76aad878..f81a19fc8a7f 100644 --- a/libstdc++-v3/config/locale/gnu/messages_members.h +++ b/libstdc++-v3/config/locale/gnu/messages_members.h @@ -36,7 +36,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Non-virtual member functions. template @@ -125,4 +127,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc index e5f90ca5b0f3..214c4af7d768 100644 --- a/libstdc++-v3/config/locale/gnu/monetary_members.cc +++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc @@ -32,7 +32,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Construct and return valid pattern consisting of some combination of: // space none symbol sign value @@ -929,4 +931,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/numeric_members.cc b/libstdc++-v3/config/locale/gnu/numeric_members.cc index 637cd59b7115..934511acb027 100644 --- a/libstdc++-v3/config/locale/gnu/numeric_members.cc +++ b/libstdc++-v3/config/locale/gnu/numeric_members.cc @@ -32,7 +32,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> void @@ -212,4 +214,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/time_members.cc b/libstdc++-v3/config/locale/gnu/time_members.cc index cf139716ee97..197474605080 100644 --- a/libstdc++-v3/config/locale/gnu/time_members.cc +++ b/libstdc++-v3/config/locale/gnu/time_members.cc @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> void @@ -395,4 +397,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/gnu/time_members.h b/libstdc++-v3/config/locale/gnu/time_members.h index 7d3ddc27ec7a..3d8e0e91bcbb 100644 --- a/libstdc++-v3/config/locale/gnu/time_members.h +++ b/libstdc++-v3/config/locale/gnu/time_members.h @@ -36,7 +36,9 @@ // Written by Benjamin Kosnik -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template __timepunct<_CharT>::__timepunct(size_t __refs) @@ -85,4 +87,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _S_destroy_c_locale(_M_c_locale_timepunct); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc b/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc index 262681b89831..13af608d9ed7 100644 --- a/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc +++ b/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.cc @@ -30,7 +30,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { void locale::facet::_S_create_c_locale(__c_locale&, const char*, __c_locale*) diff --git a/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.h b/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.h index 70e39b89044e..027a52d93db9 100644 --- a/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.h +++ b/libstdc++-v3/config/locale/ieee_1003.1-2001/c_locale.h @@ -38,9 +38,12 @@ #include // For codecvt using iconv, iconv_t #include // For messages -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION typedef int* __c_locale; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.cc b/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.cc index 156cf3a94a1c..2b4ab2e49e6c 100644 --- a/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.cc +++ b/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.cc @@ -30,7 +30,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { // Specializations template<> diff --git a/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.h b/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.h index 6abd0b3a4c0f..8c658ab8672d 100644 --- a/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.h +++ b/libstdc++-v3/config/locale/ieee_1003.1-2001/messages_members.h @@ -33,7 +33,9 @@ // Written by Benjamin Kosnik -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Non-virtual member functions. template @@ -69,4 +71,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) messages<_CharT>::do_close(catalog __c) const { catclose(reinterpret_cast(__c)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/aix/atomicity.h b/libstdc++-v3/config/os/aix/atomicity.h index 38622b128150..1bd51f1c041d 100644 --- a/libstdc++-v3/config/os/aix/atomicity.h +++ b/libstdc++-v3/config/os/aix/atomicity.h @@ -38,7 +38,9 @@ extern "C" #include } -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __attribute__ ((__unused__)) @@ -50,4 +52,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add (volatile _Atomic_word* __mem, int __val) throw () { (void) ::fetch_and_add(const_cast(__mem), __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/aix/ctype_base.h b/libstdc++-v3/config/os/aix/ctype_base.h index 37009080e62a..865105aecc14 100644 --- a/libstdc++-v3/config/os/aix/ctype_base.h +++ b/libstdc++-v3/config/os/aix/ctype_base.h @@ -28,7 +28,9 @@ // Information as gleaned from /usr/include/ctype.h -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -52,4 +54,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISALPHA | _ISDIGIT; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/aix/ctype_inline.h b/libstdc++-v3/config/os/aix/ctype_inline.h index 8c201a5771a8..14f22be1d866 100644 --- a/libstdc++-v3/config/os/aix/ctype_inline.h +++ b/libstdc++-v3/config/os/aix/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -77,4 +79,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bionic/ctype_base.h b/libstdc++-v3/config/os/bionic/ctype_base.h index 15f00636d3eb..926b23374557 100644 --- a/libstdc++-v3/config/os/bionic/ctype_base.h +++ b/libstdc++-v3/config/os/bionic/ctype_base.h @@ -30,7 +30,9 @@ // Support for Solaris 2.5.1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -54,4 +56,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _U | _L | _N; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bionic/ctype_inline.h b/libstdc++-v3/config/os/bionic/ctype_inline.h index ef12c6586356..e7b8d5c83059 100644 --- a/libstdc++-v3/config/os/bionic/ctype_inline.h +++ b/libstdc++-v3/config/os/bionic/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -68,4 +70,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bsd/darwin/ctype_base.h b/libstdc++-v3/config/os/bsd/darwin/ctype_base.h index 0867a59f55d3..36f71e065083 100644 --- a/libstdc++-v3/config/os/bsd/darwin/ctype_base.h +++ b/libstdc++-v3/config/os/bsd/darwin/ctype_base.h @@ -30,7 +30,9 @@ // 4.0 and all versions of the CVS managed file at: // :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -68,4 +70,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h b/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h index a1833b7af2f1..aa3a83ecfaa3 100644 --- a/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h +++ b/libstdc++-v3/config/os/bsd/darwin/ctype_inline.h @@ -35,7 +35,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -145,4 +147,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bsd/freebsd/ctype_base.h b/libstdc++-v3/config/os/bsd/freebsd/ctype_base.h index 5b5de7aabee0..5d01ad6af847 100644 --- a/libstdc++-v3/config/os/bsd/freebsd/ctype_base.h +++ b/libstdc++-v3/config/os/bsd/freebsd/ctype_base.h @@ -30,7 +30,9 @@ // 4.0 and all versions of the CVS managed file at: // :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -70,4 +72,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h b/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h index 886c6a14fb19..de10c3fbcb8d 100644 --- a/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h +++ b/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h @@ -35,7 +35,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -145,4 +147,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h index 37139812cdd7..d75cb79aaf6d 100644 --- a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h +++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h @@ -33,7 +33,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -72,4 +74,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h index f510d6592e56..a08d4314f304 100644 --- a/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h +++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -68,7 +70,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/djgpp/ctype_base.h b/libstdc++-v3/config/os/djgpp/ctype_base.h index 9db1b1e249c1..aa156f8dd39c 100644 --- a/libstdc++-v3/config/os/djgpp/ctype_base.h +++ b/libstdc++-v3/config/os/djgpp/ctype_base.h @@ -26,7 +26,9 @@ // ISO C++ 14882: 22.1 Locales // -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -51,4 +53,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask graph = __dj_ISALPHA | __dj_ISDIGIT | __dj_ISPUNCT; // Graphical }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/djgpp/ctype_inline.h b/libstdc++-v3/config/os/djgpp/ctype_inline.h index 7112c1bcc9c0..217bbf8758ac 100644 --- a/libstdc++-v3/config/os/djgpp/ctype_inline.h +++ b/libstdc++-v3/config/os/djgpp/ctype_inline.h @@ -35,7 +35,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -71,4 +73,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/djgpp/error_constants.h b/libstdc++-v3/config/os/djgpp/error_constants.h index d3590180de8a..4e87208d831f 100644 --- a/libstdc++-v3/config/os/djgpp/error_constants.h +++ b/libstdc++-v3/config/os/djgpp/error_constants.h @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Most of the commented-out error codes are socket-related and could be // replaced by Winsock WSA-prefixed equivalents. @@ -119,6 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // wrong_protocol_type = EPROTOTYPE }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/os/generic/ctype_base.h b/libstdc++-v3/config/os/generic/ctype_base.h index ac4db76bd005..72aa6f2ccb02 100644 --- a/libstdc++-v3/config/os/generic/ctype_base.h +++ b/libstdc++-v3/config/os/generic/ctype_base.h @@ -29,7 +29,9 @@ // Default information, may not be appropriate for specific host. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -53,4 +55,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/generic/ctype_inline.h b/libstdc++-v3/config/os/generic/ctype_inline.h index 83cdf2a9766a..ae54f2968bed 100644 --- a/libstdc++-v3/config/os/generic/ctype_inline.h +++ b/libstdc++-v3/config/os/generic/ctype_inline.h @@ -41,7 +41,9 @@ // Constructing a synthetic "C" table should be seriously considered... -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -162,4 +164,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/generic/error_constants.h b/libstdc++-v3/config/os/generic/error_constants.h index 2935fec9c82d..88ea56506c23 100644 --- a/libstdc++-v3/config/os/generic/error_constants.h +++ b/libstdc++-v3/config/os/generic/error_constants.h @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION enum class errc { @@ -170,6 +172,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wrong_protocol_type = EPROTOTYPE }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h index 96cd946123e7..eb2b14c58d35 100644 --- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h +++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h @@ -34,7 +34,9 @@ // Information as gleaned from /usr/include/ctype.h -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -58,4 +60,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISalpha | _ISdigit; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_inline.h b/libstdc++-v3/config/os/gnu-linux/ctype_inline.h index 91df62953c2c..7e83a9e75d20 100644 --- a/libstdc++-v3/config/os/gnu-linux/ctype_inline.h +++ b/libstdc++-v3/config/os/gnu-linux/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -70,4 +72,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/hpux/ctype_base.h b/libstdc++-v3/config/os/hpux/ctype_base.h index 33bd5b720562..8e2114f1f433 100644 --- a/libstdc++-v3/config/os/hpux/ctype_base.h +++ b/libstdc++-v3/config/os/hpux/ctype_base.h @@ -28,7 +28,9 @@ // Default information, may not be appropriate for specific host. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -52,4 +54,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISALPHA | _ISDIGIT; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/hpux/ctype_inline.h b/libstdc++-v3/config/os/hpux/ctype_inline.h index cedc9186a00e..d6b8df484611 100644 --- a/libstdc++-v3/config/os/hpux/ctype_inline.h +++ b/libstdc++-v3/config/os/hpux/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -70,4 +72,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/hpux/os_defines.h b/libstdc++-v3/config/os/hpux/os_defines.h index 2a36b7fe0560..a41f30124af8 100644 --- a/libstdc++-v3/config/os/hpux/os_defines.h +++ b/libstdc++-v3/config/os/hpux/os_defines.h @@ -63,7 +63,9 @@ We also force _GLIBCXX_USE_LONG_LONG here so that we don't have to bastardize configure to deal with this sillyness. */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_EXTERN_C #ifndef __LP64__ @@ -79,7 +81,8 @@ _GLIBCXX_BEGIN_EXTERN_C #endif _GLIBCXX_END_EXTERN_C -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #define _GLIBCXX_USE_LONG_LONG 1 diff --git a/libstdc++-v3/config/os/irix/atomicity.h b/libstdc++-v3/config/os/irix/atomicity.h index 9048fb2be67b..0160a1616495 100644 --- a/libstdc++-v3/config/os/irix/atomicity.h +++ b/libstdc++-v3/config/os/irix/atomicity.h @@ -25,7 +25,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) throw () @@ -35,4 +37,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __atomic_add(volatile _Atomic_word* __mem, int __val) throw () { __exchange_and_add(__mem, __val); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h b/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h index 917b06678595..32a8716bc032 100644 --- a/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h +++ b/libstdc++-v3/config/os/irix/irix6.5/ctype_base.h @@ -34,7 +34,9 @@ // Information as gleaned from /usr/include/ctype.h on irix 6.5 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -58,4 +60,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISalpha | _ISdigit; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h b/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h index fe355a15b701..f08eea812ea7 100644 --- a/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h +++ b/libstdc++-v3/config/os/irix/irix6.5/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -68,4 +70,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/mingw32/ctype_base.h b/libstdc++-v3/config/os/mingw32/ctype_base.h index e68f80ea32a7..5fbdff8e7f0c 100644 --- a/libstdc++-v3/config/os/mingw32/ctype_base.h +++ b/libstdc++-v3/config/os/mingw32/ctype_base.h @@ -34,7 +34,9 @@ // masks here, based on the generic masks, and the corresponding // classic_table in ctype_noninline.h. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -58,4 +60,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/mingw32/ctype_inline.h b/libstdc++-v3/config/os/mingw32/ctype_inline.h index 21383973d709..f1b9f6c6617a 100644 --- a/libstdc++-v3/config/os/mingw32/ctype_inline.h +++ b/libstdc++-v3/config/os/mingw32/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -69,4 +71,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h index f9d40e9ad548..f2a9116ba9ea 100644 --- a/libstdc++-v3/config/os/mingw32/error_constants.h +++ b/libstdc++-v3/config/os/mingw32/error_constants.h @@ -34,7 +34,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Most of the commented-out error codes are socket-related and could be // replaced by Winsock WSA-prefixed equivalents. @@ -120,6 +122,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // wrong_protocol_type = EPROTOTYPE }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/config/os/newlib/ctype_base.h b/libstdc++-v3/config/os/newlib/ctype_base.h index 8ae20717686a..4dd150292dfa 100644 --- a/libstdc++-v3/config/os/newlib/ctype_base.h +++ b/libstdc++-v3/config/os/newlib/ctype_base.h @@ -30,7 +30,9 @@ // Support for Solaris 2.5.1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -54,4 +56,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _U | _L | _N; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/newlib/ctype_inline.h b/libstdc++-v3/config/os/newlib/ctype_inline.h index 314762daa0b0..18726dbbd162 100644 --- a/libstdc++-v3/config/os/newlib/ctype_inline.h +++ b/libstdc++-v3/config/os/newlib/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -68,4 +70,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/qnx/qnx6.1/ctype_base.h b/libstdc++-v3/config/os/qnx/qnx6.1/ctype_base.h index 366cca33860b..36aa073435a1 100644 --- a/libstdc++-v3/config/os/qnx/qnx6.1/ctype_base.h +++ b/libstdc++-v3/config/os/qnx/qnx6.1/ctype_base.h @@ -33,7 +33,9 @@ // Information as gleaned from /usr/include/ctype.h. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -57,4 +59,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _DI | _LO | _UP | _XA; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/qnx/qnx6.1/ctype_inline.h b/libstdc++-v3/config/os/qnx/qnx6.1/ctype_inline.h index c64a8b559124..b38bc827c6d9 100644 --- a/libstdc++-v3/config/os/qnx/qnx6.1/ctype_inline.h +++ b/libstdc++-v3/config/os/qnx/qnx6.1/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -68,4 +70,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/solaris/solaris2.7/ctype_base.h b/libstdc++-v3/config/os/solaris/solaris2.7/ctype_base.h index 08f655bda82a..1ae3874a6dbb 100644 --- a/libstdc++-v3/config/os/solaris/solaris2.7/ctype_base.h +++ b/libstdc++-v3/config/os/solaris/solaris2.7/ctype_base.h @@ -30,7 +30,9 @@ // only works with solaris2.7 and solaris2.8. Thanks for not changing // things, sun engineers! -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -54,4 +56,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISALPHA | _ISDIGIT; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/solaris/solaris2.7/ctype_inline.h b/libstdc++-v3/config/os/solaris/solaris2.7/ctype_inline.h index cedc9186a00e..d6b8df484611 100644 --- a/libstdc++-v3/config/os/solaris/solaris2.7/ctype_inline.h +++ b/libstdc++-v3/config/os/solaris/solaris2.7/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -70,4 +72,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/tpf/ctype_base.h b/libstdc++-v3/config/os/tpf/ctype_base.h index 60c7e9abf70e..1c1d37ebce23 100644 --- a/libstdc++-v3/config/os/tpf/ctype_base.h +++ b/libstdc++-v3/config/os/tpf/ctype_base.h @@ -28,7 +28,9 @@ // Information as gleaned from /usr/include/ctype.h -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -52,4 +54,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISalpha | _ISdigit; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/tpf/ctype_inline.h b/libstdc++-v3/config/os/tpf/ctype_inline.h index f0d5188544bc..1785f8cd9199 100644 --- a/libstdc++-v3/config/os/tpf/ctype_inline.h +++ b/libstdc++-v3/config/os/tpf/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -70,4 +72,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/uclibc/ctype_base.h b/libstdc++-v3/config/os/uclibc/ctype_base.h index 7e913c1ee300..d6a742b73402 100644 --- a/libstdc++-v3/config/os/uclibc/ctype_base.h +++ b/libstdc++-v3/config/os/uclibc/ctype_base.h @@ -34,7 +34,9 @@ // Information as gleaned from /usr/include/ctype.h -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -60,4 +62,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _ISalpha | _ISdigit; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/uclibc/ctype_inline.h b/libstdc++-v3/config/os/uclibc/ctype_inline.h index 4c544751068b..0f6406960098 100644 --- a/libstdc++-v3/config/os/uclibc/ctype_inline.h +++ b/libstdc++-v3/config/os/uclibc/ctype_inline.h @@ -34,7 +34,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -70,4 +72,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/vxworks/ctype_base.h b/libstdc++-v3/config/os/vxworks/ctype_base.h index ee0682f8a5f7..f1f92ae43501 100644 --- a/libstdc++-v3/config/os/vxworks/ctype_base.h +++ b/libstdc++-v3/config/os/vxworks/ctype_base.h @@ -28,7 +28,9 @@ // Information extracted from target/h/ctype.h. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// @brief Base class for ctype. struct ctype_base @@ -53,4 +55,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static const mask alnum = _C_UPPER | _C_LOWER | _C_NUMBER; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/config/os/vxworks/ctype_inline.h b/libstdc++-v3/config/os/vxworks/ctype_inline.h index bd72d222f45f..49092083cc31 100644 --- a/libstdc++-v3/config/os/vxworks/ctype_inline.h +++ b/libstdc++-v3/config/os/vxworks/ctype_inline.h @@ -36,7 +36,9 @@ // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION bool ctype:: @@ -72,4 +74,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __low; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 442bba21b063..d9990c97842d 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -1542,17 +1542,17 @@ PREDEFINED = __cplusplus \ "_GLIBCXX_CONST= " \ "_GLIBCXX_NORETURN= " \ "_GLIBCXX_NOTHROW= " \ - "_GLIBCXX_STD_D= " \ - "_GLIBCXX_STD_P= " \ - "_GLIBCXX_STD_PR= " \ - _GLIBCXX_STD=std \ - "_GLIBCXX_TR1= " \ - "_GLIBCXX_BEGIN_NAMESPACE_TR1= " \ - "_GLIBCXX_END_NAMESPACE_TR1= " \ - "_GLIBCXX_BEGIN_NAMESPACE(name)=namespace name { " \ - "_GLIBCXX_BEGIN_NESTED_NAMESPACE(name, unused)=namespace name { " \ - _GLIBCXX_END_NAMESPACE=} \ - _GLIBCXX_END_NESTED_NAMESPACE=} \ + "_GLIBCXX_STD_C= " \ + "_GLIBCXX_STD_A= " \ + "_GLIBCXX_VISIBILITY(V)= " \ + "_GLIBCXX_BEGIN_NAMESPACE_VERSION= " \ + "_GLIBCXX_BEGIN_NAMESPACE_ALGO= " \ + "_GLIBCXX_BEGIN_NAMESPACE_CONTAINER= " \ + "_GLIBCXX_BEGIN_NAMESPACE_LDBL= " \ + "_GLIBCXX_END_NAMESPACE_VERSION= " \ + "_GLIBCXX_END_NAMESPACE_ALGO= " \ + "_GLIBCXX_END_NAMESPACE_CONTAINER= " \ + "_GLIBCXX_END_NAMESPACE_LDBL= " \ "_GLIBCXX_TEMPLATE_ARGS=... " \ _GLIBCXX_DEPRECATED \ _GLIBCXX_CONSTEXPR=constexpr \ diff --git a/libstdc++-v3/include/backward/auto_ptr.h b/libstdc++-v3/include/backward/auto_ptr.h index d60bad3d0885..e14906b36fea 100644 --- a/libstdc++-v3/include/backward/auto_ptr.h +++ b/libstdc++-v3/include/backward/auto_ptr.h @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * A wrapper class to provide auto_ptr with reference semantics. @@ -287,6 +289,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typedef void element_type; } _GLIBCXX_DEPRECATED_ATTR; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _BACKWARD_AUTO_PTR_H */ diff --git a/libstdc++-v3/include/backward/binders.h b/libstdc++-v3/include/backward/binders.h index a65eb8a75d20..faadd0ddebdc 100644 --- a/libstdc++-v3/include/backward/binders.h +++ b/libstdc++-v3/include/backward/binders.h @@ -57,7 +57,9 @@ #ifndef _BACKWARD_BINDERS_H #define _BACKWARD_BINDERS_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 20.3.6 binders /** @defgroup binders Binder Classes @@ -164,6 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } /** @} */ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _BACKWARD_BINDERS_H */ diff --git a/libstdc++-v3/include/backward/hash_fun.h b/libstdc++-v3/include/backward/hash_fun.h index 66e31d844cd2..a76eb730101e 100644 --- a/libstdc++-v3/include/backward/hash_fun.h +++ b/libstdc++-v3/include/backward/hash_fun.h @@ -59,7 +59,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; @@ -163,6 +165,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { return __x; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/backward/hash_map b/libstdc++-v3/include/backward/hash_map index fe6e785c0124..24c439e04767 100644 --- a/libstdc++-v3/include/backward/hash_map +++ b/libstdc++-v3/include/backward/hash_map @@ -65,7 +65,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::equal_to; using std::allocator; @@ -497,9 +499,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2) { __hm1.swap(__hm2); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specialization of insert_iterator so that it will work for hash_map // and hash_multimap. @@ -589,6 +594,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return *this; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/backward/hash_set b/libstdc++-v3/include/backward/hash_set index 1e4f1a9792d8..f110fec68f39 100644 --- a/libstdc++-v3/include/backward/hash_set +++ b/libstdc++-v3/include/backward/hash_set @@ -65,7 +65,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::equal_to; using std::allocator; @@ -465,9 +467,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2) { __hs1.swap(__hs2); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specialization of insert_iterator so that it will work for hash_set // and hash_multiset. @@ -557,6 +562,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator++(int) { return *this; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h index 55c1d99bf5de..0bcaec4fdc23 100644 --- a/libstdc++-v3/include/backward/hashtable.h +++ b/libstdc++-v3/include/backward/hashtable.h @@ -66,7 +66,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -1141,6 +1143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/backward/strstream b/libstdc++-v3/include/backward/strstream index 3221ba93d40c..964c455873a2 100644 --- a/libstdc++-v3/include/backward/strstream +++ b/libstdc++-v3/include/backward/strstream @@ -51,7 +51,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Class strstreambuf, a streambuf class that manages an array of char. // Note that this class is not a template. @@ -172,6 +174,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstreambuf _M_buf; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index f6f4eacd1f65..8632bf5dd630 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -37,7 +37,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /* adjacent_find @@ -577,9 +579,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _FIter upper_bound(_FIter, _FIter, const _Tp&, _Compare); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) +_GLIBCXX_BEGIN_NAMESPACE_ALGO template _FIter @@ -802,7 +804,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) _OIter unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_ALGO +} // namespace std #ifdef _GLIBCXX_PARALLEL # include diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h index 43006799397b..9018b5aa59a6 100644 --- a/libstdc++-v3/include/bits/allocator.h +++ b/libstdc++-v3/include/bits/allocator.h @@ -51,7 +51,9 @@ #include // For _GLIBCXX_HAS_NESTED_TYPE #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup allocators Allocators @@ -232,6 +234,7 @@ _GLIBCXX_HAS_NESTED_TYPE(allocator_type) #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/atomic_0.h b/libstdc++-v3/include/bits/atomic_0.h index eaff2e6f68da..42ff462701f6 100644 --- a/libstdc++-v3/include/bits/atomic_0.h +++ b/libstdc++-v3/include/bits/atomic_0.h @@ -33,7 +33,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 0 == __atomic0 == Never lock-free namespace __atomic0 @@ -732,6 +734,7 @@ namespace __atomic0 #undef _ATOMIC_CMPEXCHNG_ } // namespace __atomic0 -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/atomic_2.h b/libstdc++-v3/include/bits/atomic_2.h index 85f8c0f35f69..26017139cc81 100644 --- a/libstdc++-v3/include/bits/atomic_2.h +++ b/libstdc++-v3/include/bits/atomic_2.h @@ -33,7 +33,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 2 == __atomic2 == Always lock-free // Assumed: @@ -747,6 +749,7 @@ namespace __atomic2 }; } // namespace __atomic2 -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index f70b717b7835..7316d01a1520 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -36,7 +36,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup atomics Atomics @@ -284,6 +286,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group atomics -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h index 6fd0653617bc..29d8ae5d3ed0 100644 --- a/libstdc++-v3/include/bits/basic_ios.h +++ b/libstdc++-v3/include/bits/basic_ios.h @@ -39,7 +39,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template inline const _Facet& @@ -465,7 +467,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_cache_locale(const locale& __loc); }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/bits/basic_ios.tcc b/libstdc++-v3/include/bits/basic_ios.tcc index 8a0fe0bb2cc8..98b227fb95ac 100644 --- a/libstdc++-v3/include/bits/basic_ios.tcc +++ b/libstdc++-v3/include/bits/basic_ios.tcc @@ -33,7 +33,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template void @@ -182,6 +184,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 03c89620ddfc..102ef77a68da 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -42,7 +42,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @class basic_string basic_string.h @@ -2745,14 +2747,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) wchar_t __delim); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \ && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 21.4 Numeric Conversions [string.conversions]. inline int @@ -2959,7 +2964,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* __GXX_EXPERIMENTAL_CXX0X__ && _GLIBCXX_USE_C99 ... */ @@ -2967,7 +2973,9 @@ _GLIBCXX_END_NAMESPACE #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1182. @@ -3020,7 +3028,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* __GXX_EXPERIMENTAL_CXX0X__ */ diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 2b22c6b0acf3..880fc6b34946 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -43,7 +43,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template const typename basic_string<_CharT, _Traits, _Alloc>::size_type @@ -1161,6 +1163,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/boost_concept_check.h b/libstdc++-v3/include/bits/boost_concept_check.h index beabbb56cb08..f1bc16abc389 100644 --- a/libstdc++-v3/include/bits/boost_concept_check.h +++ b/libstdc++-v3/include/bits/boost_concept_check.h @@ -45,7 +45,9 @@ #include #include // for traits and tags -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #define _IsUnused __attribute__ ((__unused__)) @@ -779,7 +781,8 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; }; typename _BackInsertionSequence::value_type __t; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #undef _IsUnused diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 71774e82c276..101d6b50d230 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -35,6 +35,11 @@ #define __GLIBCXX__ // Macros for various attributes. +// _GLIBCXX_PURE +// _GLIBCXX_CONST +// _GLIBCXX_NORETURN +// _GLIBCXX_NOTHROW +// _GLIBCXX_VISIBILITY #ifndef _GLIBCXX_PURE # define _GLIBCXX_PURE __attribute__ ((__pure__)) #endif @@ -55,22 +60,22 @@ # endif #endif -// Macros for visibility. -// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY -// _GLIBCXX_VISIBILITY_ATTR +// Macros for visibility attributes. +// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY +// _GLIBCXX_VISIBILITY #define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY #if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY -# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V))) +# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) #else // If this is not supplied by the OS-specific or CPU-specific // headers included below, it will be defined to an empty default. -# define _GLIBCXX_VISIBILITY_ATTR(V) _GLIBCXX_PSEUDO_VISIBILITY(V) +# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) #endif -// Macros for deprecated. -// _GLIBCXX_DEPRECATED -// _GLIBCXX_DEPRECATED_ATTR +// Macros for deprecated attributes. +// _GLIBCXX_DEPRECATED +// _GLIBCXX_DEPRECATED_ATTR #ifndef _GLIBCXX_DEPRECATED # define _GLIBCXX_DEPRECATED 1 #endif @@ -83,22 +88,6 @@ #if __cplusplus -namespace std -{ - typedef __SIZE_TYPE__ size_t; - typedef __PTRDIFF_TYPE__ ptrdiff_t; - -#ifdef __GXX_EXPERIMENTAL_CXX0X__ - typedef decltype(nullptr) nullptr_t; -#endif -} - -// Macros for C compatibility. In particular, define extern "C" -// linkage only when using C++. -# define _GLIBCXX_BEGIN_EXTERN_C extern "C" { -# define _GLIBCXX_END_EXTERN_C } - - // Macro for constexpr, to support in mixed 03/0x mode. #ifndef _GLIBCXX_CONSTEXPR # ifdef __GXX_EXPERIMENTAL_CXX0X__ @@ -110,201 +99,255 @@ namespace std # endif #endif -// Macros for activating various inline namespaces. -// -// _GLIBCXX_NAMESPACE_DEBUG -// _GLIBCXX_NAMESPACE_PARALLEL -// _GLIBCXX_NAMESPACE_PROFILE -// _GLIBCXX_NAMESPACE_VERSION +// Macro for extern template, ie controling template linkage via use +// of extern keyword on template declaration. As documented in the g++ +// manual, it inhibits all implicit instantiations and is used +// throughout the library to avoid multiple weak definitions for +// required types that are already explicitly instantiated in the +// library binary. This substantially reduces the binary size of +// resulting executables. +// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern +// templates only in basic_string, thus activating its debug-mode +// checks even at -O0. +#ifndef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE 1 +#endif -// Guide to libstdc++ namespaces. /* + Outline of libstdc++ namespaces. + namespace std { namespace __debug { } namespace __parallel { } namespace __profile { } - namespace __norm { } // __normative, __shadow, __replaced namespace __cxx1998 { } - namespace tr1 { } + namespace __detail { } + + namespace rel_ops { } + + namespace tr1 + { + namespace placeholders { } + namespace regex_constants { } + namespace __detail { } + } + + namespace decimal { } + + namespace chrono { } + namespace placeholders { } + namespace regex_constants { } + namespace this_thread { } } -*/ -#ifdef _GLIBCXX_DEBUG -# define _GLIBCXX_INLINE_DEBUG 1 -#endif + namespace abi { } -#ifdef _GLIBCXX_PARALLEL -# define _GLIBCXX_INLINE_PARALLEL 1 -#endif + namespace __gnu_cxx + { + namespace __detail { } + } + + For full details see: + http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html +*/ +namespace std +{ + typedef __SIZE_TYPE__ size_t; + typedef __PTRDIFF_TYPE__ ptrdiff_t; -// Namespace association for profile. -#ifdef _GLIBCXX_PROFILE -# define _GLIBCXX_INLINE_PROFILE 1 +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + typedef decltype(nullptr) nullptr_t; #endif +} + +// Defined if inline namespaces are used for versioning. #define _GLIBCXX_INLINE_VERSION -// Defined if inline namespaces modes are active. -#if _GLIBCXX_INLINE_DEBUG \ - || _GLIBCXX_INLINE_PARALLEL \ - || _GLIBCXX_INLINE_PROFILE \ - || _GLIBCXX_INLINE_VERSION -# define _GLIBCXX_USE_INLINE_NAMESPACES 1 -#endif +// Inline namespace for symbol versioning. +#if _GLIBCXX_INLINE_VERSION +namespace std +{ + inline namespace _6 { } -// Macros for namespace scope. Either namespace std:: or the name -// of some nested namespace within it. -// _GLIBCXX_STD -// _GLIBCXX_STD_D -// _GLIBCXX_STD_P -// _GLIBCXX_STD_PR -// -// Macros for enclosing namespaces and possibly nested namespaces. -// _GLIBCXX_BEGIN_NAMESPACE -// _GLIBCXX_END_NAMESPACE -// _GLIBCXX_BEGIN_NESTED_NAMESPACE -// _GLIBCXX_END_NESTED_NAMESPACE -#ifndef _GLIBCXX_USE_INLINE_NAMESPACES -# define _GLIBCXX_STD_D _GLIBCXX_STD -# define _GLIBCXX_STD_P _GLIBCXX_STD -# define _GLIBCXX_STD_PR _GLIBCXX_STD -# define _GLIBCXX_STD std -# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X) -# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE -# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { -# define _GLIBCXX_END_NAMESPACE } + namespace __detail { inline namespace _6 { } } + + + namespace rel_ops { inline namespace _6 { } } + + namespace tr1 + { + inline namespace _6 { } + namespace placeholders { inline namespace _6 { } } + namespace regex_constants { inline namespace _6 { } } + namespace __detail { inline namespace _6 { } } + } + + namespace decimal { inline namespace _6 { } } + + namespace chrono { inline namespace _6 { } } + namespace placeholders { inline namespace _6 { } } + namespace regex_constants { inline namespace _6 { } } + namespace this_thread { inline namespace _6 { } } +} + +namespace __gnu_cxx +{ + inline namespace _6 { } + namespace __detail { inline namespace _6 { } } +} +# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace _6 { +# define _GLIBCXX_END_NAMESPACE_VERSION } #else +# define _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_VERSION +#endif -# if _GLIBCXX_INLINE_VERSION // && not anything else -# define _GLIBCXX_STD_D _GLIBCXX_STD -# define _GLIBCXX_STD_P _GLIBCXX_STD -# define _GLIBCXX_STD _6 -# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6) -# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE -# endif -// debug -# if _GLIBCXX_INLINE_DEBUG && !_GLIBCXX_INLINE_PARALLEL && !_GLIBCXX_INLINE_PROFILE -# define _GLIBCXX_STD_D __norm -# define _GLIBCXX_STD_P _GLIBCXX_STD -# define _GLIBCXX_STD __cxx1998 -# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { -# define _GLIBCXX_END_NAMESPACE } -# define _GLIBCXX_EXTERN_TEMPLATE -1 +// Inline namespaces for special modes: debug, parallel, profile. +#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ + || defined(_GLIBCXX_PROFILE) +namespace std +{ + // Non-inline namespace for components replaced by alternates in active mode. + namespace __cxx1998 + { +#if _GLIBCXX_INLINE_VERSION + inline namespace _6 { } +#endif + } + + // Inline namespace for debug mode. +# ifdef _GLIBCXX_DEBUG + inline namespace __debug { } # endif -// parallel -# if _GLIBCXX_INLINE_PARALLEL && !_GLIBCXX_INLINE_DEBUG && !_GLIBCXX_INLINE_PROFILE -# define _GLIBCXX_STD_D _GLIBCXX_STD -# define _GLIBCXX_STD_P __norm -# define _GLIBCXX_STD __cxx1998 -# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { -# define _GLIBCXX_END_NAMESPACE } + // Inline namespaces for parallel mode. +# ifdef _GLIBCXX_PARALLEL + inline namespace __parallel { } # endif -// debug + parallel -# if _GLIBCXX_INLINE_PARALLEL && _GLIBCXX_INLINE_DEBUG && !_GLIBCXX_INLINE_PROFILE -# define _GLIBCXX_STD_D __norm -# define _GLIBCXX_STD_P __norm -# define _GLIBCXX_STD __cxx1998 -# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { -# define _GLIBCXX_END_NAMESPACE } -# define _GLIBCXX_EXTERN_TEMPLATE -1 + // Inline namespaces for profile mode +# ifdef _GLIBCXX_PROFILE + inline namespace __profile { } # endif +} -// profile -# if _GLIBCXX_INLINE_PROFILE -# if _GLIBCXX_INLINE_PARALLEL || _GLIBCXX_INLINE_DEBUG -# error Cannot use -D_GLIBCXX_PROFILE with -D_GLIBCXX_DEBUG or \ - -D_GLIBCXX_PARALLEL -# endif -# define _GLIBCXX_STD_D __norm -# define _GLIBCXX_STD_P _GLIBCXX_STD -# define _GLIBCXX_STD_PR __norm -# define _GLIBCXX_STD __cxx1998 -# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { -# define _GLIBCXX_END_NAMESPACE } +// Check for invalid usage and unsupported mixed-mode use. +# if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) +# error illegal use of multiple inlined namespaces +# endif +# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) +# error illegal use of multiple inlined namespaces +# endif +# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) +# error illegal use of multiple inlined namespaces # endif +// Check for invalid use due to lack for weak symbols. # if __NO_INLINE__ && !__GXX_WEAK__ # warning currently using inlined namespace mode which may fail \ without inlining due to lack of weak symbols # endif +#endif + +// Macros for namespace scope. Either namespace std:: or the name +// of some nested namespace within it corresponding to the active mode. +// _GLIBCXX_STD_A +// _GLIBCXX_STD_C +// +// Macros for opening/closing conditional namespaces. +// _GLIBCXX_BEGIN_NAMESPACE_ALGO +// _GLIBCXX_END_NAMESPACE_ALGO +// _GLIBCXX_BEGIN_NAMESPACE_CONTAINER +// _GLIBCXX_END_NAMESPACE_CONTAINER +#if defined(_GLIBCXX_DEBUG) or defined(_GLIBCXX_PROFILE) +# define _GLIBCXX_STD_C __cxx1998 +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ + namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_CONTAINER \ + } _GLIBCXX_END_NAMESPACE_VERSION +# undef _GLIBCXX_EXTERN_TEMPLATE +# define _GLIBCXX_EXTERN_TEMPLATE -1 +#endif -# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) { -# define _GLIBCXX_END_NESTED_NAMESPACE } } +#ifdef _GLIBCXX_PARALLEL +# define _GLIBCXX_STD_A __cxx1998 +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO \ + namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION +# define _GLIBCXX_END_NAMESPACE_ALGO \ + } _GLIBCXX_END_NAMESPACE_VERSION #endif -// Inline namespaces for debug mode. -#if _GLIBCXX_INLINE_DEBUG && !_GLIBCXX_INLINE_PROFILE -namespace std -{ - namespace __norm { } - inline namespace __debug { } - inline namespace __cxx1998 { } -} +#ifndef _GLIBCXX_STD_A +# define _GLIBCXX_STD_A std #endif -// Inline namespaces for parallel mode. -#if _GLIBCXX_INLINE_PARALLEL -namespace std -{ - namespace __norm { } - inline namespace __parallel { } - inline namespace __cxx1998 { } -} +#ifndef _GLIBCXX_STD_C +# define _GLIBCXX_STD_C std #endif -// Inline namespaces for profile mode -#if _GLIBCXX_INLINE_PROFILE -namespace std -{ - namespace __norm { } - inline namespace __profile { } - inline namespace __cxx1998 { } -} +#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO +# define _GLIBCXX_BEGIN_NAMESPACE_ALGO #endif -// Inline namespaces for versioning mode. -#if _GLIBCXX_INLINE_VERSION -namespace std -{ - inline namespace _6 { } -} +#ifndef _GLIBCXX_END_NAMESPACE_ALGO +# define _GLIBCXX_END_NAMESPACE_ALGO +#endif -namespace __gnu_cxx -{ - inline namespace _6 { } -} +#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER +# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER +#endif -namespace std -{ - namespace tr1 - { - inline namespace _6 { } - } -} +#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER +# define _GLIBCXX_END_NAMESPACE_CONTAINER #endif -// XXX GLIBCXX_ABI Deprecated -// Define if compatibility should be provided for -mlong-double-64 +// GLIBCXX_ABI Deprecated +// Define if compatibility should be provided for -mlong-double-64. #undef _GLIBCXX_LONG_DOUBLE_COMPAT -// Inline namespaces for long double 128 mode. +// Inline namespace for long double 128 mode. #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ namespace std { inline namespace __gnu_cxx_ldbl128 { } } -# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128:: -# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 { -# define _GLIBCXX_END_LDBL_NAMESPACE } +# define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128:: +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 { +# define _GLIBCXX_END_NAMESPACE_LDBL } #else -# define _GLIBCXX_LDBL_NAMESPACE -# define _GLIBCXX_BEGIN_LDBL_NAMESPACE -# define _GLIBCXX_END_LDBL_NAMESPACE +# define _GLIBCXX_NAMESPACE_LDBL +# define _GLIBCXX_BEGIN_NAMESPACE_LDBL +# define _GLIBCXX_END_NAMESPACE_LDBL +#endif + +// Assert. +#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL) +# define __glibcxx_assert(_Condition) +#else +namespace std +{ + // Avoid the use of assert, because we're trying to keep the + // include out of the mix. + inline void + __replacement_assert(const char* __file, int __line, + const char* __function, const char* __condition) + { + __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, + __function, __condition); + __builtin_abort(); + } +} +#define __glibcxx_assert(_Condition) \ + do \ + { \ + if (! (_Condition)) \ + std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ + #_Condition); \ + } while (false) #endif // Macros for race detectors. @@ -328,7 +371,6 @@ namespace std // The annotations in this example tell the race detector that all memory // accesses occurred when the refcount was positive do not race with // memory accesses which occurred after the refcount became zero. - #ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE # define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) #endif @@ -336,15 +378,16 @@ namespace std # define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) #endif +// Macros for C linkage: define extern "C" linkage only when using C++. +# define _GLIBCXX_BEGIN_EXTERN_C extern "C" { +# define _GLIBCXX_END_EXTERN_C } + #else // !__cplusplus # define _GLIBCXX_BEGIN_EXTERN_C # define _GLIBCXX_END_EXTERN_C -# undef _GLIBCXX_BEGIN_NAMESPACE -# undef _GLIBCXX_END_NAMESPACE -# define _GLIBCXX_BEGIN_NAMESPACE(X) -# define _GLIBCXX_END_NAMESPACE #endif + // First includes. // Pick up any OS-specific definitions. @@ -356,21 +399,7 @@ namespace std // If platform uses neither visibility nor psuedo-visibility, // specify empty default for namespace annotation macros. #ifndef _GLIBCXX_PSEUDO_VISIBILITY -#define _GLIBCXX_PSEUDO_VISIBILITY(V) -#endif - -// Allow use of the GNU syntax extension, "extern template." This -// extension is fully documented in the g++ manual, but in a nutshell, -// it inhibits all implicit instantiations and is used throughout the -// library to avoid multiple weak definitions for required types that -// are already explicitly instantiated in the library binary. This -// substantially reduces the binary size of resulting executables. - -// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern -// templates only in basic_string, thus activating its debug-mode -// checks even at -O0. -#ifndef _GLIBCXX_EXTERN_TEMPLATE -# define _GLIBCXX_EXTERN_TEMPLATE 1 +# define _GLIBCXX_PSEUDO_VISIBILITY(V) #endif // Certain function definitions that are meant to be overridable from @@ -380,33 +409,6 @@ namespace std # define _GLIBCXX_WEAK_DEFINITION #endif -// Assert. -// Avoid the use of assert, because we're trying to keep the -// include out of the mix. -#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL) -#define __glibcxx_assert(_Condition) -#else -_GLIBCXX_BEGIN_NAMESPACE(std) - // Avoid the use of assert, because we're trying to keep the - // include out of the mix. - inline void - __replacement_assert(const char* __file, int __line, - const char* __function, const char* __condition) - { - __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, - __function, __condition); - __builtin_abort(); - } -_GLIBCXX_END_NAMESPACE - -#define __glibcxx_assert(_Condition) \ - do \ - { \ - if (! (_Condition)) \ - std::__replacement_assert(__FILE__, __LINE__, \ - __PRETTY_FUNCTION__, #_Condition); \ - } while (false) -#endif // The remainder of the prewritten config is automatic; all the // user hooks are listed above. @@ -428,4 +430,4 @@ _GLIBCXX_END_NAMESPACE #undef min #undef max -// End of prewritten config; the discovered settings follow. +// End of prewritten config; the settings discovered at configure time follow. diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h index 4033f6d1424b..07251df0fd33 100644 --- a/libstdc++-v3/include/bits/char_traits.h +++ b/libstdc++-v3/include/bits/char_traits.h @@ -42,7 +42,9 @@ #include // For streampos #include // For WEOF, wmemmove, wmemset, etc. -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Mapping from character type to associated types. @@ -203,9 +205,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) return __s; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 21.1 /** @@ -364,14 +369,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; #endif //_GLIBCXX_USE_WCHAR_T -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if (defined(__GXX_EXPERIMENTAL_CXX0X__) \ && defined(_GLIBCXX_USE_C99_STDINT_TR1)) #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> struct char_traits @@ -559,7 +567,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return eq_int_type(__c, eof()) ? 0 : __c; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/codecvt.h b/libstdc++-v3/include/bits/codecvt.h index cf8ac1020d64..42cc471d9cd2 100644 --- a/libstdc++-v3/include/bits/codecvt.h +++ b/libstdc++-v3/include/bits/codecvt.h @@ -39,7 +39,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// Empty base class for codecvt facet [22.2.1.5]. class codecvt_base @@ -499,6 +501,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _CODECVT_H diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index 3ae964afbe0f..166890fb8fd1 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -66,14 +66,19 @@ // // Forward declaration hack, should really include this from somewhere. -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class __normal_iterator; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION struct __true_type { }; struct __false_type { }; @@ -414,6 +419,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif //_CPP_TYPE_TRAITS_H diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc index 78bb888060a3..389fc80d945f 100644 --- a/libstdc++-v3/include/bits/deque.tcc +++ b/libstdc++-v3/include/bits/deque.tcc @@ -1,7 +1,7 @@ // Deque implementation (out of line) -*- C++ -*- // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -// 2009, 2010 +// 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -58,7 +58,9 @@ #ifndef _DEQUE_TCC #define _DEQUE_TCC 1 -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER #ifdef __GXX_EXPERIMENTAL_CXX0X__ template @@ -1038,6 +1040,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } #endif -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index b7f071f365fd..39c25322817f 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -35,7 +35,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A helper basic node class for %forward_list. @@ -1295,6 +1297,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) forward_list<_Tp, _Alloc>& __ly) { __lx.swap(__ly); } -_GLIBCXX_END_NESTED_NAMESPACE // namespace std +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif // _FORWARD_LIST_H diff --git a/libstdc++-v3/include/bits/forward_list.tcc b/libstdc++-v3/include/bits/forward_list.tcc index a409383e2100..2c319db7c1ec 100644 --- a/libstdc++-v3/include/bits/forward_list.tcc +++ b/libstdc++-v3/include/bits/forward_list.tcc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -30,7 +30,9 @@ #ifndef _FORWARD_LIST_TCC #define _FORWARD_LIST_TCC 1 -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER template _Fwd_list_base<_Tp, _Alloc>:: @@ -494,7 +496,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } -_GLIBCXX_END_NESTED_NAMESPACE // namespace std +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _FORWARD_LIST_TCC */ diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index bd0fa4be0101..edaff970374a 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -40,7 +40,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template void @@ -979,6 +981,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/functexcept.h b/libstdc++-v3/include/bits/functexcept.h index 714d1cfd6b8c..d8e6ae76d49a 100644 --- a/libstdc++-v3/include/bits/functexcept.h +++ b/libstdc++-v3/include/bits/functexcept.h @@ -40,7 +40,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Helper for exception objects in void @@ -99,6 +101,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void __throw_bad_function_call() __attribute__((__noreturn__)); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/functional_hash.h b/libstdc++-v3/include/bits/functional_hash.h index 30754510fca8..e77cb4e17bfb 100644 --- a/libstdc++-v3/include/bits/functional_hash.h +++ b/libstdc++-v3/include/bits/functional_hash.h @@ -34,7 +34,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** @defgroup hashes Hashes * @ingroup functors @@ -183,6 +185,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group hashes -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _FUNCTIONAL_HASH_H diff --git a/libstdc++-v3/include/bits/gslice.h b/libstdc++-v3/include/bits/gslice.h index 1e78cc7dd050..47d177510a36 100644 --- a/libstdc++-v3/include/bits/gslice.h +++ b/libstdc++-v3/include/bits/gslice.h @@ -35,7 +35,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup numeric_arrays @@ -177,6 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GSLICE_H */ diff --git a/libstdc++-v3/include/bits/gslice_array.h b/libstdc++-v3/include/bits/gslice_array.h index 11e037185184..1ae047df2cc5 100644 --- a/libstdc++-v3/include/bits/gslice_array.h +++ b/libstdc++-v3/include/bits/gslice_array.h @@ -35,7 +35,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup numeric_arrays @@ -211,6 +213,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GSLICE_ARRAY_H */ diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index 52f1b318d0e7..2ee85524eff7 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -35,7 +35,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Class template _Hashtable, class definition. @@ -1229,6 +1231,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE // namespace std +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif // _HASHTABLE_H diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 7b13719af303..f6e187616ee2 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -31,10 +31,12 @@ #ifndef _HASHTABLE_POLICY_H #define _HASHTABLE_POLICY_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ namespace __detail { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Helper function: return distance(first, last) for forward // iterators, or 0 for input iterators. template @@ -977,8 +979,9 @@ namespace __detail } return true; } -} // namespace __detail -_GLIBCXX_END_NAMESPACE // namespace std +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __detail +} // namespace std #endif // _HASHTABLE_POLICY_H diff --git a/libstdc++-v3/include/bits/indirect_array.h b/libstdc++-v3/include/bits/indirect_array.h index e6f1430fdd02..d7b7b08271c3 100644 --- a/libstdc++-v3/include/bits/indirect_array.h +++ b/libstdc++-v3/include/bits/indirect_array.h @@ -35,7 +35,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup numeric_arrays @@ -205,6 +207,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _INDIRECT_ARRAY_H */ diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h index 24bddf270adc..8825657a2aec 100644 --- a/libstdc++-v3/include/bits/ios_base.h +++ b/libstdc++-v3/include/bits/ios_base.h @@ -42,7 +42,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // The following definitions of bitmask types are enums, not ints, // as permitted (but not required) in the standard, in order to provide @@ -969,6 +971,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __base; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _IOS_BASE_H */ diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 6fc6b31ad261..5666b11be3da 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -40,7 +40,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template basic_istream<_CharT, _Traits>::sentry:: @@ -1087,6 +1089,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/list.tcc b/libstdc++-v3/include/bits/list.tcc index b06822f1633b..01c1bc644959 100644 --- a/libstdc++-v3/include/bits/list.tcc +++ b/libstdc++-v3/include/bits/list.tcc @@ -1,7 +1,7 @@ // List implementation (out of line) -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -57,7 +57,9 @@ #ifndef _LIST_TCC #define _LIST_TCC 1 -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER template void @@ -461,7 +463,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _LIST_TCC */ diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index 3cdb1b3705f2..80ba735268b0 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -42,7 +42,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 22.1.1 Class locale /** @@ -815,7 +817,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ~collate_byname() { } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace # include diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index 53c0f573198b..e60401343e05 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -36,7 +36,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template locale:: @@ -266,6 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index ec5a51888608..41732f3c4a9e 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -49,7 +49,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // NB: Don't instantiate required wchar_t facets if no wchar_t support. #ifdef _GLIBCXX_USE_WCHAR_T @@ -1503,12 +1505,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // Include host and configuration specific ctype inlines. #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 22.2.2 The numeric category. class __num_base @@ -1892,7 +1897,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ~numpunct_byname() { } }; -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL /** * @brief Primary class template num_get. @@ -2512,7 +2517,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE template locale::id num_put<_CharT, _OutIter>::id; -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL // Subclause convenience interfaces, inlines. // NB: These are inline because, when used in a loop, some compilers @@ -2597,7 +2602,8 @@ _GLIBCXX_END_LDBL_NAMESPACE tolower(_CharT __c, const locale& __loc) { return use_facet >(__loc).tolower(__c); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace # include diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index 076963aaf6e6..114d852e2ae3 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -34,7 +34,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Routine to access a cache for the facet. If the cache didn't // exist before, it gets constructed on the fly. @@ -137,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp) throw (); -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template _InIter @@ -782,7 +784,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE __len = static_cast(__w); } -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL template int @@ -826,7 +828,7 @@ _GLIBCXX_END_LDBL_NAMESPACE return __bufend - __buf; } -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template void @@ -1177,7 +1179,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE return __s; } -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL // Construct correctly padded string, as per 22.2.2.2.2 // Assumes @@ -1278,8 +1280,8 @@ _GLIBCXX_END_LDBL_NAMESPACE #if _GLIBCXX_EXTERN_TEMPLATE extern template class numpunct; extern template class numpunct_byname; - extern template class _GLIBCXX_LDBL_NAMESPACE num_get; - extern template class _GLIBCXX_LDBL_NAMESPACE num_put; + extern template class _GLIBCXX_NAMESPACE_LDBL num_get; + extern template class _GLIBCXX_NAMESPACE_LDBL num_put; extern template class ctype_byname; extern template @@ -1317,8 +1319,8 @@ _GLIBCXX_END_LDBL_NAMESPACE #ifdef _GLIBCXX_USE_WCHAR_T extern template class numpunct; extern template class numpunct_byname; - extern template class _GLIBCXX_LDBL_NAMESPACE num_get; - extern template class _GLIBCXX_LDBL_NAMESPACE num_put; + extern template class _GLIBCXX_NAMESPACE_LDBL num_get; + extern template class _GLIBCXX_NAMESPACE_LDBL num_put; extern template class ctype_byname; extern template @@ -1355,6 +1357,7 @@ _GLIBCXX_END_LDBL_NAMESPACE #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.h b/libstdc++-v3/include/bits/locale_facets_nonio.h index 2c6a8f7cec7e..be7c1a42fd5c 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.h +++ b/libstdc++-v3/include/bits/locale_facets_nonio.h @@ -38,7 +38,9 @@ #include // For struct tm -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Time format ordering data. @@ -339,12 +341,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const tm*) const throw (); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // Include host and configuration specific timepunct functions. #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Primary class template time_get. @@ -1346,7 +1351,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template const bool moneypunct_byname<_CharT, _Intl>::intl; -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL /** * @brief Primary class template money_get. @@ -1654,7 +1659,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE template locale::id money_put<_CharT, _OutIter>::id; -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL /** * @brief Messages facet base class providing catalog typedef. @@ -1919,7 +1924,8 @@ _GLIBCXX_END_LDBL_NAMESPACE { } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // Include host and configuration specific messages functions. #include diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.tcc b/libstdc++-v3/include/bits/locale_facets_nonio.tcc index 35869e3611bf..3039907d750f 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc +++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc @@ -32,7 +32,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __use_cache<__moneypunct_cache<_CharT, _Intl> > @@ -122,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template template @@ -608,7 +610,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE { return __intl ? _M_insert(__s, __io, __fill, __digits) : _M_insert(__s, __io, __fill, __digits); } -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL // NB: Not especially useful. Without an ios_base object or some // kind of locale reference, we are left clawing at the air where @@ -1219,8 +1221,8 @@ _GLIBCXX_END_LDBL_NAMESPACE extern template class moneypunct; extern template class moneypunct_byname; extern template class moneypunct_byname; - extern template class _GLIBCXX_LDBL_NAMESPACE money_get; - extern template class _GLIBCXX_LDBL_NAMESPACE money_put; + extern template class _GLIBCXX_NAMESPACE_LDBL money_get; + extern template class _GLIBCXX_NAMESPACE_LDBL money_put; extern template class __timepunct; extern template class time_put; extern template class time_put_byname; @@ -1294,8 +1296,8 @@ _GLIBCXX_END_LDBL_NAMESPACE extern template class moneypunct; extern template class moneypunct_byname; extern template class moneypunct_byname; - extern template class _GLIBCXX_LDBL_NAMESPACE money_get; - extern template class _GLIBCXX_LDBL_NAMESPACE money_put; + extern template class _GLIBCXX_NAMESPACE_LDBL money_get; + extern template class _GLIBCXX_NAMESPACE_LDBL money_put; extern template class __timepunct; extern template class time_put; extern template class time_put_byname; @@ -1366,6 +1368,7 @@ _GLIBCXX_END_LDBL_NAMESPACE #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/localefwd.h b/libstdc++-v3/include/bits/localefwd.h index b7bf42e53425..38e7dd31426d 100644 --- a/libstdc++-v3/include/bits/localefwd.h +++ b/libstdc++-v3/include/bits/localefwd.h @@ -43,7 +43,9 @@ #include // For ostreambuf_iterator, istreambuf_iterator #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup locales Locales @@ -138,12 +140,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) class codecvt_byname; // 22.2.2 and 22.2.3 numeric -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template > class num_get; template > class num_put; -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL template class numpunct; template class numpunct_byname; @@ -166,12 +168,12 @@ _GLIBCXX_END_LDBL_NAMESPACE // 22.2.6 money class money_base; -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template > class money_get; template > class money_put; -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL template class moneypunct; template @@ -184,6 +186,7 @@ _GLIBCXX_END_LDBL_NAMESPACE template class messages_byname; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/mask_array.h b/libstdc++-v3/include/bits/mask_array.h index e57adcc8aabf..8b652a838725 100644 --- a/libstdc++-v3/include/bits/mask_array.h +++ b/libstdc++-v3/include/bits/mask_array.h @@ -35,7 +35,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup numeric_arrays @@ -201,6 +203,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _MASK_ARRAY_H */ diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 5172f50a7d70..f5918999cf9c 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Used, in C++03 mode too, by allocators, etc. template @@ -44,12 +46,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) (&const_cast(reinterpret_cast(__r))); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #ifdef __GXX_EXPERIMENTAL_CXX0X__ #include // Brings in std::declval too. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// forward (as per N3143) template @@ -91,7 +96,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) addressof(_Tp& __r) { return std::__addressof(__r); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #define _GLIBCXX_MOVE(__val) std::move(__val) #define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val) @@ -100,7 +106,9 @@ _GLIBCXX_END_NAMESPACE #define _GLIBCXX_FORWARD(_Tp, __val) (__val) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Swaps two values. @@ -131,6 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) swap(__a[__n], __b[__n]); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _MOVE_H */ diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index ec41595a7c99..6c59e3e41625 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -40,7 +40,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template basic_ostream<_CharT, _Traits>::sentry:: @@ -402,6 +404,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/ostream_insert.h b/libstdc++-v3/include/bits/ostream_insert.h index 3d7cf2d50420..97608a00d06b 100644 --- a/libstdc++-v3/include/bits/ostream_insert.h +++ b/libstdc++-v3/include/bits/ostream_insert.h @@ -35,7 +35,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template inline void @@ -122,6 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _OSTREAM_INSERT_H */ diff --git a/libstdc++-v3/include/bits/postypes.h b/libstdc++-v3/include/bits/postypes.h index 46ef6711c5f7..69235d9a0991 100644 --- a/libstdc++-v3/include/bits/postypes.h +++ b/libstdc++-v3/include/bits/postypes.h @@ -67,7 +67,9 @@ #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // The types streamoff, streampos and wstreampos and the class // template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2, @@ -236,6 +238,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typedef fpos u32streampos; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h index 9feb0f448c8f..5c406a648c34 100644 --- a/libstdc++-v3/include/bits/random.h +++ b/libstdc++-v3/include/bits/random.h @@ -33,7 +33,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [26.4] Random number generation @@ -55,11 +57,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _RealType generate_canonical(_UniformRandomNumberGenerator& __g); +_GLIBCXX_END_NAMESPACE_VERSION + /* * Implementation-space details. */ namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + template (std::numeric_limits<_UIntType>::digits)> @@ -116,8 +122,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) private: _Engine& _M_g; }; + + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @addtogroup random_generators Random Number Generators * @ingroup random @@ -5376,6 +5386,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /* @} */ // group random_utilities /* @} */ // group random -_GLIBCXX_END_NAMESPACE + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index 43fd0c8e16c9..20f7667e2989 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -1,6 +1,6 @@ // random number generation (out of line) -*- C++ -*- -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 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 @@ -32,13 +32,15 @@ #include // std::accumulate and std::partial_sum -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ /* * (Further) implementation-space details. */ namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + // General case for x = (ax + c) mod m -- use Schrage's algorithm to // avoid integer overflow. // @@ -100,8 +102,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) *__result = __unary_op(*__first); return __result; } + + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail +_GLIBCXX_BEGIN_NAMESPACE_VERSION template constexpr _UIntType @@ -2818,6 +2823,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } return __sum / __tmp; } -_GLIBCXX_END_NAMESPACE + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/range_access.h b/libstdc++-v3/include/bits/range_access.h index 5c898efa9f69..0463791b7181 100644 --- a/libstdc++-v3/include/bits/range_access.h +++ b/libstdc++-v3/include/bits/range_access.h @@ -34,7 +34,9 @@ #ifdef __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Return an iterator pointing to the first element of @@ -95,7 +97,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) end(_Tp (&__arr)[_Nm]) { return __arr + _Nm; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h index ab05fc2d9d03..f21530f743e2 100644 --- a/libstdc++-v3/include/bits/regex.h +++ b/libstdc++-v3/include/bits/regex.h @@ -28,7 +28,9 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup regex Regular Expressions @@ -2421,5 +2423,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif //@} // group regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h index 4219c8b2f5ec..5cfd1929cffa 100644 --- a/libstdc++-v3/include/bits/regex_compiler.h +++ b/libstdc++-v3/include/bits/regex_compiler.h @@ -28,7 +28,9 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __regex { @@ -1111,6 +1113,7 @@ namespace __regex } // namespace __regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace /* vim: set ts=8 sw=2 sts=2: */ diff --git a/libstdc++-v3/include/bits/regex_constants.h b/libstdc++-v3/include/bits/regex_constants.h index 1aeef52d657c..1cdd93c55781 100644 --- a/libstdc++-v3/include/bits/regex_constants.h +++ b/libstdc++-v3/include/bits/regex_constants.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -30,14 +30,16 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ /** * @namespace std::regex_constants * @brief ISO C++-0x entities sub namespace for regex. */ namespace regex_constants { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @name 5.1 Regular Expression Syntax Options */ @@ -293,7 +295,7 @@ namespace regex_constants //@} +_GLIBCXX_END_NAMESPACE_VERSION } // namespace regex_constants - -_GLIBCXX_END_NAMESPACE +} // namespace diff --git a/libstdc++-v3/include/bits/regex_cursor.h b/libstdc++-v3/include/bits/regex_cursor.h index fee7b437468c..d9d555674489 100644 --- a/libstdc++-v3/include/bits/regex_cursor.h +++ b/libstdc++-v3/include/bits/regex_cursor.h @@ -28,7 +28,9 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __regex { @@ -88,4 +90,5 @@ namespace __regex } // namespace __regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/include/bits/regex_error.h b/libstdc++-v3/include/bits/regex_error.h index 6308c30093ef..ffbedd51fae2 100644 --- a/libstdc++-v3/include/bits/regex_error.h +++ b/libstdc++-v3/include/bits/regex_error.h @@ -1,6 +1,6 @@ // class template regex -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -30,10 +30,12 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ namespace regex_constants { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @name 5.3 Error Types */ @@ -114,7 +116,10 @@ namespace regex_constants static const error_type error_stack(_S_error_stack); //@} -} +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace regex_constants + +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [7.8] Class regex_error /** @@ -155,4 +160,5 @@ namespace regex_constants __throw_regex_error(regex_constants::error_type __ecode) { throw regex_error(__ecode); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std diff --git a/libstdc++-v3/include/bits/regex_grep_matcher.h b/libstdc++-v3/include/bits/regex_grep_matcher.h index 67770e9d29a0..04d06e5f0f67 100644 --- a/libstdc++-v3/include/bits/regex_grep_matcher.h +++ b/libstdc++-v3/include/bits/regex_grep_matcher.h @@ -28,7 +28,9 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class sub_match; @@ -124,6 +126,7 @@ namespace __regex } // namespace __regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/bits/regex_grep_matcher.tcc b/libstdc++-v3/include/bits/regex_grep_matcher.tcc index 804473fea55c..1c1259450220 100644 --- a/libstdc++-v3/include/bits/regex_grep_matcher.tcc +++ b/libstdc++-v3/include/bits/regex_grep_matcher.tcc @@ -30,7 +30,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace { @@ -175,4 +177,5 @@ namespace __regex } // namespace __regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/include/bits/regex_nfa.h b/libstdc++-v3/include/bits/regex_nfa.h index 4a771ee20c24..b1ae3fb3ea0d 100644 --- a/libstdc++-v3/include/bits/regex_nfa.h +++ b/libstdc++-v3/include/bits/regex_nfa.h @@ -28,7 +28,9 @@ * Do not attempt to use it directly. @headername{regex} */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __regex { @@ -398,7 +400,8 @@ namespace __regex } // namespace __regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/bits/regex_nfa.tcc b/libstdc++-v3/include/bits/regex_nfa.tcc index 392b2c3f083f..211ddc7aed44 100644 --- a/libstdc++-v3/include/bits/regex_nfa.tcc +++ b/libstdc++-v3/include/bits/regex_nfa.tcc @@ -29,7 +29,9 @@ */ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __regex { @@ -169,4 +171,5 @@ _M_clone() } // namespace __regex -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h index c9095d5f614b..628863c12644 100644 --- a/libstdc++-v3/include/bits/shared_ptr.h +++ b/libstdc++-v3/include/bits/shared_ptr.h @@ -51,7 +51,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup pointer_abstractions @@ -557,6 +559,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group pointer_abstractions -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _SHARED_PTR_H diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index ba2f004c7713..fa85280a4908 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -49,7 +49,9 @@ #ifndef _SHARED_PTR_BASE_H #define _SHARED_PTR_BASE_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Exception possibly thrown by @c shared_ptr. @@ -1376,6 +1378,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return std::hash<_Tp*>()(__s.get()); } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _SHARED_PTR_BASE_H diff --git a/libstdc++-v3/include/bits/slice_array.h b/libstdc++-v3/include/bits/slice_array.h index b3df3c2d3c06..3afae22d6c4b 100644 --- a/libstdc++-v3/include/bits/slice_array.h +++ b/libstdc++-v3/include/bits/slice_array.h @@ -35,7 +35,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup numeric_arrays @@ -267,6 +269,7 @@ _DEFINE_VALARRAY_OPERATOR(>>, __shift_right) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _SLICE_ARRAY_H */ diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc index bbeee7195068..8956e9ee7586 100644 --- a/libstdc++-v3/include/bits/sstream.tcc +++ b/libstdc++-v3/include/bits/sstream.tcc @@ -38,7 +38,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type @@ -268,6 +270,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index c55c44ff2d0a..707021bdc8f9 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -70,7 +70,9 @@ // See concept_check.h for the __glibcxx_*_requires macros. -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// Swaps the median value of *__a, *__b and *__c to *__a template @@ -327,7 +329,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _Integer __count, const _Tp& __val, std::forward_iterator_tag) { - __first = _GLIBCXX_STD_P::find(__first, __last, __val); + __first = _GLIBCXX_STD_A::find(__first, __last, __val); while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type @@ -343,7 +345,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __first; if (__i == __last) return __last; - __first = _GLIBCXX_STD_P::find(++__i, __last, __val); + __first = _GLIBCXX_STD_A::find(++__i, __last, __val); } return __last; } @@ -506,7 +508,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) while (1) { _ForwardIterator1 __new_result - = _GLIBCXX_STD_P::search(__first1, __last1, __first2, __last2); + = _GLIBCXX_STD_A::search(__first1, __last1, __first2, __last2); if (__new_result == __last1) return __result; else @@ -535,7 +537,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) while (1) { _ForwardIterator1 __new_result - = _GLIBCXX_STD_P::search(__first1, __last1, __first2, + = _GLIBCXX_STD_A::search(__first1, __last1, __first2, __last2, __comp); if (__new_result == __last1) return __result; @@ -569,7 +571,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); - _RevIterator1 __rresult = _GLIBCXX_STD_P::search(_RevIterator1(__last1), + _RevIterator1 __rresult = _GLIBCXX_STD_A::search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2); @@ -745,7 +747,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template inline bool none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) - { return __last == _GLIBCXX_STD_P::find_if(__first, __last, __pred); } + { return __last == _GLIBCXX_STD_A::find_if(__first, __last, __pred); } /** * @brief Checks that a predicate is false for at least an element @@ -1093,7 +1095,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename iterator_traits<_ForwardIterator>::value_type, _Tp>) __glibcxx_requires_valid_range(__first, __last); - __first = _GLIBCXX_STD_P::find(__first, __last, __value); + __first = _GLIBCXX_STD_A::find(__first, __last, __value); if(__first == __last) return __first; _ForwardIterator __result = __first; @@ -1136,7 +1138,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typename iterator_traits<_ForwardIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); - __first = _GLIBCXX_STD_P::find_if(__first, __last, __pred); + __first = _GLIBCXX_STD_A::find_if(__first, __last, __pred); if(__first == __last) return __first; _ForwardIterator __result = __first; @@ -1176,7 +1178,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __glibcxx_requires_valid_range(__first, __last); // Skip the beginning, if already unique. - __first = _GLIBCXX_STD_P::adjacent_find(__first, __last); + __first = _GLIBCXX_STD_A::adjacent_find(__first, __last); if (__first == __last) return __last; @@ -1218,7 +1220,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __glibcxx_requires_valid_range(__first, __last); // Skip the beginning, if already unique. - __first = _GLIBCXX_STD_P::adjacent_find(__first, __last, __binary_pred); + __first = _GLIBCXX_STD_A::adjacent_find(__first, __last, __binary_pred); if (__first == __last) return __last; @@ -2274,7 +2276,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { if (__depth_limit == 0) { - _GLIBCXX_STD_P::partial_sort(__first, __last, __last); + _GLIBCXX_STD_A::partial_sort(__first, __last, __last); return; } --__depth_limit; @@ -2296,7 +2298,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { if (__depth_limit == 0) { - _GLIBCXX_STD_P::partial_sort(__first, __last, __last, __comp); + _GLIBCXX_STD_A::partial_sort(__first, __last, __last, __comp); return; } --__depth_limit; @@ -2830,7 +2832,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer); - _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer), + _GLIBCXX_STD_A::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer), _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end), _GLIBCXX_MAKE_MOVE_ITERATOR(__middle), _GLIBCXX_MAKE_MOVE_ITERATOR(__last), @@ -2893,7 +2895,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer); - _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer), + _GLIBCXX_STD_A::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__buffer), _GLIBCXX_MAKE_MOVE_ITERATOR(__buffer_end), _GLIBCXX_MAKE_MOVE_ITERATOR(__middle), _GLIBCXX_MAKE_MOVE_ITERATOR(__last), @@ -3155,7 +3157,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) while (__last - __first >= __two_step) { - __result = _GLIBCXX_STD_P::merge( + __result = _GLIBCXX_STD_A::merge( _GLIBCXX_MAKE_MOVE_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size), @@ -3165,7 +3167,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } __step_size = std::min(_Distance(__last - __first), __step_size); - _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first), + _GLIBCXX_STD_A::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + @@ -3186,7 +3188,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) while (__last - __first >= __two_step) { - __result = _GLIBCXX_STD_P::merge( + __result = _GLIBCXX_STD_A::merge( _GLIBCXX_MAKE_MOVE_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size), @@ -3196,7 +3198,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } __step_size = std::min(_Distance(__last - __first), __step_size); - _GLIBCXX_STD_P::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first), + _GLIBCXX_STD_A::merge(_GLIBCXX_MAKE_MOVE_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + __step_size), _GLIBCXX_MAKE_MOVE_ITERATOR(__first + @@ -4143,7 +4145,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::advance(__last2, std::distance(__first1, __last1)); for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) { - if (__scan != _GLIBCXX_STD_P::find(__first1, __scan, *__scan)) + if (__scan != _GLIBCXX_STD_A::find(__first1, __scan, *__scan)) continue; // We've seen this one before. auto __matches = std::count(__first2, __last2, *__scan); @@ -4190,7 +4192,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { using std::placeholders::_1; - if (__scan != _GLIBCXX_STD_P::find_if(__first1, __scan, + if (__scan != _GLIBCXX_STD_A::find_if(__first1, __scan, std::bind(__pred, _1, *__scan))) continue; // We've seen this one before. @@ -4246,9 +4248,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif // __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) +_GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Apply a function to every element of a sequence. @@ -4557,7 +4559,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) // Test for a pattern of length 1. _ForwardIterator2 __p1(__first2); if (++__p1 == __last2) - return _GLIBCXX_STD_P::find(__first1, __last1, *__first2); + return _GLIBCXX_STD_A::find(__first1, __last1, *__first2); // General case. _ForwardIterator2 __p; @@ -4565,7 +4567,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) for (;;) { - __first1 = _GLIBCXX_STD_P::find(__first1, __last1, *__first2); + __first1 = _GLIBCXX_STD_A::find(__first1, __last1, *__first2); if (__first1 == __last1) return __last1; @@ -4695,7 +4697,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) if (__count <= 0) return __first; if (__count == 1) - return _GLIBCXX_STD_P::find(__first, __last, __val); + return _GLIBCXX_STD_A::find(__first, __last, __val); return std::__search_n(__first, __last, __count, __val, std::__iterator_category(__first)); } @@ -6166,6 +6168,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) return __result; } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_ALGO +} // namespace std #endif /* _STL_ALGO_H */ diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index 2c3b6af5e57e..626d5bf1c8d5 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -1,7 +1,7 @@ // Core algorithmic facilities -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -70,7 +70,9 @@ #include #include // For std::swap and _GLIBCXX_MOVE -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a // nutshell, we are partially implementing the resolution of DR 187, @@ -987,9 +989,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __lg(long long __n) { return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) +_GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Tests a range for element-wise equality. @@ -1196,7 +1198,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_ALGO +} // namespace std // NB: This file is included within many other C++ includes, as a way // of getting the base algorithms. So, make sure that parallel bits diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index f35fd0ae0586..3cd53e7fad77 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -1,7 +1,7 @@ // vector specialization -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -59,7 +59,9 @@ #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef unsigned long _Bit_type; enum { _S_word_bit = int(__CHAR_BIT__ * sizeof(_Bit_type)) }; @@ -446,12 +448,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } }; -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std // Declare a partial specialization of vector. #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A specialization of vector for booleans which offers fixed time @@ -1026,25 +1031,29 @@ template { this->_M_impl._M_finish = __pos; } }; -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #ifdef __GXX_EXPERIMENTAL_CXX0X__ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1182. /// std::hash specialization for vector. template - struct hash<_GLIBCXX_STD_D::vector> - : public __hash_base> + struct hash<_GLIBCXX_STD_C::vector> + : public __hash_base> { size_t - operator()(const _GLIBCXX_STD_D::vector& __b) const; + operator()(const _GLIBCXX_STD_C::vector& __b) const; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +}// namespace std #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/bits/stl_construct.h b/libstdc++-v3/include/bits/stl_construct.h index 31f65ee975e3..2efba9378b19 100644 --- a/libstdc++-v3/include/bits/stl_construct.h +++ b/libstdc++-v3/include/bits/stl_construct.h @@ -61,7 +61,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * Constructs an object in existing memory by invoking an allocated @@ -151,7 +153,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _Destroy(__first, __last); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_CONSTRUCT_H */ diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index c3b5d0067b14..0d9b5b44cb92 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -1,7 +1,7 @@ // Deque implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -62,7 +62,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief This function controls the size of memory nodes. @@ -1971,6 +1973,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) #undef _GLIBCXX_DEQUE_BUF_SIZE -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _STL_DEQUE_H */ diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h index 630ca0340db1..7660d15b3aec 100644 --- a/libstdc++-v3/include/bits/stl_function.h +++ b/libstdc++-v3/include/bits/stl_function.h @@ -57,7 +57,9 @@ #ifndef _STL_FUNCTION_H #define _STL_FUNCTION_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 20.3.1 base classes /** @defgroup functors Function Objects @@ -722,7 +724,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** @} */ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED # include diff --git a/libstdc++-v3/include/bits/stl_heap.h b/libstdc++-v3/include/bits/stl_heap.h index 512ad5f9e8e0..b00fc69fcb53 100644 --- a/libstdc++-v3/include/bits/stl_heap.h +++ b/libstdc++-v3/include/bits/stl_heap.h @@ -59,7 +59,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup heap_algorithms Heap @@ -573,6 +575,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return std::is_heap_until(__first, __last, __comp) == __last; } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_HEAP_H */ diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 4de1b0e3ef7f..b23107d3577d 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -65,7 +65,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup iterators @@ -680,9 +682,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group iterators -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // This iterator adapter is @a normal in the sense that it does not // change the semantics of any of the operators of its iterator @@ -892,11 +897,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __n, const __normal_iterator<_Iterator, _Container>& __i) { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #ifdef __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup iterators @@ -1112,7 +1120,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group iterators -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter) #else diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h index aa7b348c71bd..836aa9223ba4 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h @@ -64,7 +64,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template inline typename iterator_traits<_InputIterator>::difference_type @@ -195,6 +197,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif // __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_ITERATOR_BASE_FUNCS_H */ diff --git a/libstdc++-v3/include/bits/stl_iterator_base_types.h b/libstdc++-v3/include/bits/stl_iterator_base_types.h index 4125272aebff..9944dc44102b 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_types.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_types.h @@ -68,7 +68,9 @@ # include // For _GLIBCXX_HAS_NESTED_TYPE #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup iterators Iterators @@ -220,7 +222,8 @@ _GLIBCXX_HAS_NESTED_TYPE(iterator_category) { return __it.base(); } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_ITERATOR_BASE_TYPES_H */ diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index aafd5dc0e930..126de00b3b08 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -1,7 +1,7 @@ // List implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -60,39 +60,49 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) - - // Supporting structures are split into common and templated types; the - // latter publicly inherits from the former in an effort to reduce code - // duplication. This results in some "needless" static_cast'ing later on, - // but it's all safe downcasting. - - /// Common part of a node in the %list. - struct _List_node_base +namespace std _GLIBCXX_VISIBILITY(default) +{ + namespace __detail { - _List_node_base* _M_next; - _List_node_base* _M_prev; + _GLIBCXX_BEGIN_NAMESPACE_VERSION - static void - swap(_List_node_base& __x, _List_node_base& __y) throw (); + // Supporting structures are split into common and templated + // types; the latter publicly inherits from the former in an + // effort to reduce code duplication. This results in some + // "needless" static_cast'ing later on, but it's all safe + // downcasting. - void - _M_transfer(_List_node_base * const __first, - _List_node_base * const __last) throw (); - - void - _M_reverse() throw (); + /// Common part of a node in the %list. + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + + void + _M_transfer(_List_node_base* const __first, + _List_node_base* const __last) throw (); + + void + _M_reverse() throw (); + + void + _M_hook(_List_node_base* const __position) throw (); + + void + _M_unhook() throw (); + }; - void - _M_hook(_List_node_base * const __position) throw (); + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace detail - void - _M_unhook() throw (); - }; +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// An actual node in the %list. template - struct _List_node : public _List_node_base + struct _List_node : public __detail::_List_node_base { ///< User's data. _Tp _M_data; @@ -100,7 +110,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) #ifdef __GXX_EXPERIMENTAL_CXX0X__ template _List_node(_Args&&... __args) - : _List_node_base(), _M_data(std::forward<_Args>(__args)...) { } + : __detail::_List_node_base(), _M_data(std::forward<_Args>(__args)...) + { } #endif }; @@ -125,7 +136,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) : _M_node() { } explicit - _List_iterator(_List_node_base* __x) + _List_iterator(__detail::_List_node_base* __x) : _M_node(__x) { } // Must downcast from _List_node_base to _List_node to get to _M_data. @@ -176,7 +187,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) { return _M_node != __x._M_node; } // The only member points to the %list element. - _List_node_base* _M_node; + __detail::_List_node_base* _M_node; }; /** @@ -201,7 +212,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) : _M_node() { } explicit - _List_const_iterator(const _List_node_base* __x) + _List_const_iterator(const __detail::_List_node_base* __x) : _M_node(__x) { } _List_const_iterator(const iterator& __x) @@ -256,7 +267,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) { return _M_node != __x._M_node; } // The only member points to the %list element. - const _List_node_base* _M_node; + const __detail::_List_node_base* _M_node; }; template @@ -298,7 +309,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) struct _List_impl : public _Node_alloc_type { - _List_node_base _M_node; + __detail::_List_node_base _M_node; _List_impl() : _Node_alloc_type(), _M_node() @@ -351,7 +362,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) : _M_impl(__x._M_get_Node_allocator()) { _M_init(); - _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); + __detail::_List_node_base::swap(this->_M_impl._M_node, + __x._M_impl._M_node); } #endif @@ -1164,7 +1176,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) void swap(list& __x) { - _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); + __detail::_List_node_base::swap(this->_M_impl._M_node, + __x._M_impl._M_node); // _GLIBCXX_RESOLVE_LIB_DEFECTS // 431. Swapping containers with unequal allocators. @@ -1611,6 +1624,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _STL_LIST_H */ diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index d3bab26c0b8a..a84b4b61dfb1 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -1,7 +1,7 @@ // Map implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -61,7 +61,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A standard container made up of (key,value) pairs, which can be @@ -928,6 +930,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) map<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _STL_MAP_H */ diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index 6c6f356e00d0..ca37f359e1b8 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -1,7 +1,7 @@ // Multimap implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -60,7 +60,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A standard container made up of (key,value) pairs, which can be @@ -846,6 +848,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) multimap<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _STL_MULTIMAP_H */ diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index 62e82dc26d96..9a48916c3c34 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -1,7 +1,7 @@ // Multiset implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -60,7 +60,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A standard container made up of elements, which can be retrieved @@ -730,6 +732,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) multiset<_Key, _Compare, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _STL_MULTISET_H */ diff --git a/libstdc++-v3/include/bits/stl_numeric.h b/libstdc++-v3/include/bits/stl_numeric.h index 86ae2cfd7628..1b6998d97354 100644 --- a/libstdc++-v3/include/bits/stl_numeric.h +++ b/libstdc++-v3/include/bits/stl_numeric.h @@ -1,7 +1,7 @@ // Numeric functions implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -63,7 +63,9 @@ #ifdef __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Create a range of sequentially increasing values. @@ -94,11 +96,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Accumulate values in a range. @@ -375,6 +380,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P) return ++__result; } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_ALGO +} // namespace std #endif /* _STL_NUMERIC_H */ diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 5334e1a5477a..8d137b29a13d 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -63,7 +63,9 @@ #include // for std::__decay_and_strip too #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef __GXX_EXPERIMENTAL_CXX0X__ /// piecewise_construct_t @@ -271,6 +273,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return pair<_T1, _T2>(__x, __y); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_PAIR_H */ diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h index 2f8853a88aed..5f20072b62f6 100644 --- a/libstdc++-v3/include/bits/stl_queue.h +++ b/libstdc++-v3/include/bits/stl_queue.h @@ -61,7 +61,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A standard container giving FIFO behavior. @@ -551,6 +553,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : public uses_allocator<_Sequence, _Alloc>::type { }; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_QUEUE_H */ diff --git a/libstdc++-v3/include/bits/stl_raw_storage_iter.h b/libstdc++-v3/include/bits/stl_raw_storage_iter.h index 29374c74ad54..87c9a660b94a 100644 --- a/libstdc++-v3/include/bits/stl_raw_storage_iter.h +++ b/libstdc++-v3/include/bits/stl_raw_storage_iter.h @@ -57,7 +57,9 @@ #ifndef _STL_RAW_STORAGE_ITERATOR_H #define _STL_RAW_STORAGE_ITERATOR_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * This iterator class lets algorithms store their results into @@ -101,6 +103,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/stl_relops.h b/libstdc++-v3/include/bits/stl_relops.h index e927678c9dc9..4e79e54b3596 100644 --- a/libstdc++-v3/include/bits/stl_relops.h +++ b/libstdc++-v3/include/bits/stl_relops.h @@ -1,6 +1,6 @@ // std::rel_ops implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2004, 2005, 2008, 2010 +// Copyright (C) 2001, 2002, 2004, 2005, 2008, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -65,10 +65,12 @@ #ifndef _STL_RELOPS_H #define _STL_RELOPS_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ namespace rel_ops { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + /** @namespace std::rel_ops * @brief The generated relational operators are sequestered here. */ @@ -125,8 +127,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace rel_ops -_GLIBCXX_END_NAMESPACE +} // namespace std #endif /* _STL_RELOPS_H */ diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index 243de964582f..77d0f8022c3f 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -1,7 +1,7 @@ // Set implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -60,7 +60,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A standard container made up of unique keys, which can be @@ -91,7 +93,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __glibcxx_class_requires(_Key, _SGIAssignableConcept) __glibcxx_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept) - __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept) + __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept) public: // typedefs: @@ -156,9 +158,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) * otherwise (where N is distance(first,last)). */ template - set(_InputIterator __first, _InputIterator __last) + set(_InputIterator __first, _InputIterator __last) : _M_t() - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } /** * @brief Builds a %set from a range. @@ -172,11 +174,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) * otherwise (where N is distance(first,last)). */ template - set(_InputIterator __first, _InputIterator __last, + set(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) - { _M_t._M_insert_unique(__first, __last); } + { _M_t._M_insert_unique(__first, __last); } /** * @brief %Set copy constructor. @@ -384,7 +386,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) * std::swap(s1,s2) will feed to this function. */ void - swap(set& __x) + swap(set& __x) { _M_t.swap(__x._M_t); } // insert/erase @@ -435,7 +437,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) * * For more on @a hinting, see: * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html - * + * * Insertion requires logarithmic time (if the hint is not taken). */ iterator @@ -458,9 +460,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) * Complexity similar to that of the range constructor. */ template - void - insert(_InputIterator __first, _InputIterator __last) - { _M_t._M_insert_unique(__first, __last); } + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } #ifdef __GXX_EXPERIMENTAL_CXX0X__ /** @@ -482,7 +484,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) * @brief Erases an element from a %set. * @param position An iterator pointing to the element to be erased. * @return An iterator pointing to the element immediately following - * @a position prior to the element being erased. If no such + * @a position prior to the element being erased. If no such * element exists, end() is returned. * * This function erases an element, pointed to by the given iterator, @@ -670,12 +672,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) //@} template - friend bool - operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + friend bool + operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); template - friend bool - operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + friend bool + operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); }; @@ -746,6 +748,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NESTED_NAMESPACE - +_GLIBCXX_END_NAMESPACE_CONTAINER +} //namespace std #endif /* _STL_SET_H */ diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h index 7f7ad9d0189a..73c8bbd5d460 100644 --- a/libstdc++-v3/include/bits/stl_stack.h +++ b/libstdc++-v3/include/bits/stl_stack.h @@ -61,7 +61,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A standard container giving FILO behavior. @@ -292,6 +294,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) : public uses_allocator<_Seq, _Alloc>::type { }; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_STACK_H */ diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index 44dcbf5000c3..a99dac93095e 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -60,7 +60,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Allocates a temporary buffer. @@ -264,7 +266,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_TEMPBUF_H */ diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index 80246dc63965..1960f9c8a45e 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -65,7 +65,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Red-black tree class, designed for use in implementing STL // associative containers (set, multiset, map, and multimap). The @@ -1585,6 +1587,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return true; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index fd9f24361730..f15be3aee3b6 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -58,7 +58,9 @@ #ifndef _STL_UNINITIALIZED_H #define _STL_UNINITIALIZED_H 1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __uninitialized_copy @@ -632,6 +634,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) std::__iterator_category(__first)); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _STL_UNINITIALIZED_H */ diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index feabb24ea3ba..5f71aa5cd007 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -1,7 +1,7 @@ // Vector implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -62,7 +62,9 @@ #include #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// See bits/stl_deque.h's _Deque_base for an explanation. template @@ -1319,6 +1321,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _STL_VECTOR_H */ diff --git a/libstdc++-v3/include/bits/stream_iterator.h b/libstdc++-v3/include/bits/stream_iterator.h index 9d3b799f3d5f..57ca96111464 100644 --- a/libstdc++-v3/include/bits/stream_iterator.h +++ b/libstdc++-v3/include/bits/stream_iterator.h @@ -34,7 +34,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup iterators @@ -213,6 +215,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group iterators -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/streambuf.tcc b/libstdc++-v3/include/bits/streambuf.tcc index efb4c707902e..253f308dc88b 100644 --- a/libstdc++-v3/include/bits/streambuf.tcc +++ b/libstdc++-v3/include/bits/streambuf.tcc @@ -37,7 +37,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template streamsize @@ -169,6 +171,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h index c385ec65a20e..6032a29e6f80 100644 --- a/libstdc++-v3/include/bits/streambuf_iterator.h +++ b/libstdc++-v3/include/bits/streambuf_iterator.h @@ -37,7 +37,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup iterators @@ -394,6 +396,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group iterators -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/bits/stringfwd.h b/libstdc++-v3/include/bits/stringfwd.h index 796200a1d69e..5f2d49c55790 100644 --- a/libstdc++-v3/include/bits/stringfwd.h +++ b/libstdc++-v3/include/bits/stringfwd.h @@ -40,7 +40,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class allocator; @@ -80,6 +82,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif /** @} */ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _STRINGFWD_H diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h index 12ced5cb537b..339176a4bd53 100644 --- a/libstdc++-v3/include/bits/unique_ptr.h +++ b/libstdc++-v3/include/bits/unique_ptr.h @@ -36,7 +36,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup pointer_abstractions @@ -501,6 +503,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group pointer_abstractions -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _UNIQUE_PTR_H */ diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h index 3960f8e56b86..c77bab12fbaf 100644 --- a/libstdc++-v3/include/bits/unordered_map.h +++ b/libstdc++-v3/include/bits/unordered_map.h @@ -1,6 +1,6 @@ // unordered_map implementation -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -30,9 +30,11 @@ #ifndef _UNORDERED_MAP_H #define _UNORDERED_MAP_H -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER - // XXX When we get typedef templates these class definitions + // NB: When we get typedef templates these class definitions // will be unnecessary. template, @@ -401,6 +403,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _UNORDERED_MAP_H */ diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h index 90b30f07c677..38350bc390d0 100644 --- a/libstdc++-v3/include/bits/unordered_set.h +++ b/libstdc++-v3/include/bits/unordered_set.h @@ -1,6 +1,6 @@ // unordered_set implementation -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -30,9 +30,11 @@ #ifndef _UNORDERED_SET_H #define _UNORDERED_SET_H -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER - // XXX When we get typedef templates these class definitions + // NB: When we get typedef templates these class definitions // will be unnecessary. template, @@ -392,7 +394,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #endif /* _UNORDERED_SET_H */ diff --git a/libstdc++-v3/include/bits/valarray_after.h b/libstdc++-v3/include/bits/valarray_after.h index 1206655a9904..6440fae43d90 100644 --- a/libstdc++-v3/include/bits/valarray_after.h +++ b/libstdc++-v3/include/bits/valarray_after.h @@ -35,7 +35,9 @@ #pragma GCC system_header -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // // gslice_array closure. @@ -544,6 +546,7 @@ _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow) #undef _DEFINE_EXPR_BINARY_FUNCTION -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _CPP_VALARRAY_AFTER_H */ diff --git a/libstdc++-v3/include/bits/valarray_array.h b/libstdc++-v3/include/bits/valarray_array.h index 46d5987736d4..cba9f3fbdbed 100644 --- a/libstdc++-v3/include/bits/valarray_array.h +++ b/libstdc++-v3/include/bits/valarray_array.h @@ -41,7 +41,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // // Helper functions on raw pointers @@ -685,7 +687,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #undef _DEFINE_ARRAY_FUNCTION -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace # include diff --git a/libstdc++-v3/include/bits/valarray_array.tcc b/libstdc++-v3/include/bits/valarray_array.tcc index 0ea079b5821c..7720707656c7 100644 --- a/libstdc++-v3/include/bits/valarray_array.tcc +++ b/libstdc++-v3/include/bits/valarray_array.tcc @@ -33,7 +33,9 @@ #ifndef _VALARRAY_ARRAY_TCC #define _VALARRAY_ARRAY_TCC 1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template void @@ -237,6 +239,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _VALARRAY_ARRAY_TCC */ diff --git a/libstdc++-v3/include/bits/valarray_before.h b/libstdc++-v3/include/bits/valarray_before.h index b7efefe03fda..0755f768b789 100644 --- a/libstdc++-v3/include/bits/valarray_before.h +++ b/libstdc++-v3/include/bits/valarray_before.h @@ -37,7 +37,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // // Implementing a loosened valarray return value is tricky. @@ -726,6 +728,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {} }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _CPP_VALARRAY_BEFORE_H */ diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc index bc10b9217a71..3aaee392e55f 100644 --- a/libstdc++-v3/include/bits/vector.tcc +++ b/libstdc++-v3/include/bits/vector.tcc @@ -1,7 +1,7 @@ // Vector implementation (out of line) -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -57,7 +57,9 @@ #ifndef _VECTOR_TCC #define _VECTOR_TCC 1 -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER template void @@ -729,20 +731,23 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #ifdef __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template size_t - hash<_GLIBCXX_STD_D::vector>:: - operator()(const _GLIBCXX_STD_D::vector& __b) const + hash<_GLIBCXX_STD_C::vector>:: + operator()(const _GLIBCXX_STD_C::vector& __b) const { size_t __hash = 0; - using _GLIBCXX_STD_D::_S_word_bit; - using _GLIBCXX_STD_D::_Bit_type; + using _GLIBCXX_STD_C::_S_word_bit; + using _GLIBCXX_STD_C::_Bit_type; const size_t __words = __b.size() / _S_word_bit; if (__words) @@ -768,7 +773,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __hash; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/c/cmath b/libstdc++-v3/include/c/cmath index fd3013b70ada..1e9ade9f0ad0 100644 --- a/libstdc++-v3/include/c/cmath +++ b/libstdc++-v3/include/c/cmath @@ -74,7 +74,7 @@ #undef islessgreater #undef isunordered -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { inline double abs(double __x) diff --git a/libstdc++-v3/include/c/cwchar b/libstdc++-v3/include/c/cwchar index 7d9c61ea2f4f..2324b5b96899 100644 --- a/libstdc++-v3/include/c/cwchar +++ b/libstdc++-v3/include/c/cwchar @@ -42,7 +42,7 @@ // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #ifndef _GLIBCXX_HAVE_MBSTATE_T -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { extern "C" { diff --git a/libstdc++-v3/include/c_compatibility/fenv.h b/libstdc++-v3/include/c_compatibility/fenv.h index 9f3898ca0354..2096e393cc77 100644 --- a/libstdc++-v3/include/c_compatibility/fenv.h +++ b/libstdc++-v3/include/c_compatibility/fenv.h @@ -52,8 +52,8 @@ #undef fesetenv #undef feupdateenv -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ // types using ::fenv_t; using ::fexcept_t; @@ -72,8 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::feholdexcept; using ::fesetenv; using ::feupdateenv; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif // _GLIBCXX_USE_C99_FENV_TR1 diff --git a/libstdc++-v3/include/c_compatibility/inttypes.h b/libstdc++-v3/include/c_compatibility/inttypes.h index 971d0d59f6d5..54c220c2f68c 100644 --- a/libstdc++-v3/include/c_compatibility/inttypes.h +++ b/libstdc++-v3/include/c_compatibility/inttypes.h @@ -50,8 +50,8 @@ #ifdef _GLIBCXX_USE_C99_INTTYPES_TR1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ // types using ::imaxdiv_t; @@ -76,8 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::wcstoimax; using ::wcstoumax; #endif - -_GLIBCXX_END_NAMESPACE +} // namespace #endif _GLIBCXX_USE_C99_INTTYPES_TR1 diff --git a/libstdc++-v3/include/c_compatibility/stdint.h b/libstdc++-v3/include/c_compatibility/stdint.h index 41a28b1f0826..32538c6c82b1 100644 --- a/libstdc++-v3/include/c_compatibility/stdint.h +++ b/libstdc++-v3/include/c_compatibility/stdint.h @@ -58,8 +58,8 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::int8_t; using ::int16_t; using ::int32_t; @@ -95,8 +95,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::uintmax_t; using ::uintptr_t; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif // _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/c_global/cctype b/libstdc++-v3/include/c_global/cctype index cab2a5089f68..0fed691ecefc 100644 --- a/libstdc++-v3/include/c_global/cctype +++ b/libstdc++-v3/include/c_global/cctype @@ -61,8 +61,8 @@ #undef tolower #undef toupper -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::isalnum; using ::isalpha; using ::iscntrl; @@ -76,8 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::isxdigit; using ::tolower; using ::toupper; - -_GLIBCXX_END_NAMESPACE +} // namespace std #ifdef __GXX_EXPERIMENTAL_CXX0X__ @@ -85,11 +84,10 @@ _GLIBCXX_END_NAMESPACE #undef isblank -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::isblank; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99_CTYPE_TR1 diff --git a/libstdc++-v3/include/c_global/cfenv b/libstdc++-v3/include/c_global/cfenv index 9686e8d35ec0..35010a0ba205 100644 --- a/libstdc++-v3/include/c_global/cfenv +++ b/libstdc++-v3/include/c_global/cfenv @@ -55,8 +55,8 @@ #undef fesetenv #undef feupdateenv -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ // types using ::fenv_t; using ::fexcept_t; @@ -75,8 +75,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::feholdexcept; using ::fesetenv; using ::feupdateenv; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99_FENV_TR1 diff --git a/libstdc++-v3/include/c_global/cinttypes b/libstdc++-v3/include/c_global/cinttypes index 0017e75d5091..df733407bd37 100644 --- a/libstdc++-v3/include/c_global/cinttypes +++ b/libstdc++-v3/include/c_global/cinttypes @@ -52,8 +52,8 @@ #ifdef _GLIBCXX_USE_C99_INTTYPES_TR1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ // types using ::imaxdiv_t; @@ -78,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::wcstoimax; using ::wcstoumax; #endif - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99_INTTYPES_TR1 diff --git a/libstdc++-v3/include/c_global/clocale b/libstdc++-v3/include/c_global/clocale index 7cf42e239ef0..3f16bffe666d 100644 --- a/libstdc++-v3/include/c_global/clocale +++ b/libstdc++-v3/include/c_global/clocale @@ -50,12 +50,11 @@ #undef setlocale #undef localeconv -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::lconv; using ::setlocale; using ::localeconv; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath index 69d424c2721b..a333eb583c05 100644 --- a/libstdc++-v3/include/c_global/cmath +++ b/libstdc++-v3/include/c_global/cmath @@ -74,7 +74,9 @@ #undef tan #undef tanh -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION inline double abs(double __x) @@ -462,7 +464,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) tanh(_Tp __x) { return __builtin_tanh(__x); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99_MATH #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC @@ -481,7 +484,9 @@ _GLIBCXX_END_NAMESPACE #undef islessgreater #undef isunordered -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef __GXX_EXPERIMENTAL_CXX0X__ inline int @@ -840,7 +845,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */ #endif @@ -955,7 +961,9 @@ _GLIBCXX_END_NAMESPACE #undef truncf #undef truncl -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // types using ::double_t; @@ -1648,7 +1656,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return trunc(__type(__x)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _GLIBCXX_USE_C99_MATH_TR1 diff --git a/libstdc++-v3/include/c_global/csetjmp b/libstdc++-v3/include/c_global/csetjmp index 16c3de6b00bb..2832801e4dc1 100644 --- a/libstdc++-v3/include/c_global/csetjmp +++ b/libstdc++-v3/include/c_global/csetjmp @@ -54,11 +54,10 @@ #define setjmp(env) setjmp (env) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::jmp_buf; using ::longjmp; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_global/csignal b/libstdc++-v3/include/c_global/csignal index bbd58ca0420c..98f0d665267f 100644 --- a/libstdc++-v3/include/c_global/csignal +++ b/libstdc++-v3/include/c_global/csignal @@ -49,12 +49,11 @@ // Get rid of those macros defined in in lieu of real functions. #undef raise -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::sig_atomic_t; using ::signal; using ::raise; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_global/cstdarg b/libstdc++-v3/include/c_global/cstdarg index 82ca4e811920..fb27389bc304 100644 --- a/libstdc++-v3/include/c_global/cstdarg +++ b/libstdc++-v3/include/c_global/cstdarg @@ -51,10 +51,9 @@ #define va_end(ap) va_end (ap) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::va_list; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_global/cstdint b/libstdc++-v3/include/c_global/cstdint index 45aa7fa84f09..ce8143ea2bd4 100644 --- a/libstdc++-v3/include/c_global/cstdint +++ b/libstdc++-v3/include/c_global/cstdint @@ -60,8 +60,8 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::int8_t; using ::int16_t; using ::int32_t; @@ -97,8 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::uintmax_t; using ::uintptr_t; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio index c7eb129cc5fd..049704d83b90 100644 --- a/libstdc++-v3/include/c_global/cstdio +++ b/libstdc++-v3/include/c_global/cstdio @@ -89,8 +89,8 @@ #undef vprintf #undef vsprintf -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::FILE; using ::fpos_t; @@ -135,8 +135,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::vfprintf; using ::vprintf; using ::vsprintf; - -_GLIBCXX_END_NAMESPACE +} // namespace #if _GLIBCXX_USE_C99 @@ -146,8 +145,8 @@ _GLIBCXX_END_NAMESPACE #undef vsnprintf #undef vsscanf -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx +{ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" int (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...) @@ -170,18 +169,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::vsnprintf; using ::vsscanf; #endif +} // namespace __gnu_cxx -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99 diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib index 31fad41bdd6d..aa7530d380ab 100644 --- a/libstdc++-v3/include/c_global/cstdlib +++ b/libstdc++-v3/include/c_global/cstdlib @@ -54,13 +54,12 @@ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ extern "C" void abort(void) throw () _GLIBCXX_NORETURN; extern "C" int atexit(void (*)()) throw (); extern "C" void exit(int) throw () _GLIBCXX_NORETURN; - -_GLIBCXX_END_NAMESPACE +} // namespace std #else @@ -96,7 +95,9 @@ _GLIBCXX_END_NAMESPACE #undef wcstombs #undef wctomb -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::div_t; using ::ldiv_t; @@ -140,7 +141,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99 @@ -153,7 +155,9 @@ _GLIBCXX_END_NAMESPACE #undef strtof #undef strtold -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::lldiv_t; @@ -193,10 +197,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::strtof; using ::strtold; -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __gnu_cxx +namespace std +{ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::__gnu_cxx::lldiv_t; #endif @@ -212,13 +217,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; - -_GLIBCXX_END_NAMESPACE +} // namespace std #ifdef __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC // types using std::lldiv_t; @@ -240,8 +244,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using std::div; #endif - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/c_global/cstring b/libstdc++-v3/include/c_global/cstring index 21721be67ed5..ea33fa122604 100644 --- a/libstdc++-v3/include/c_global/cstring +++ b/libstdc++-v3/include/c_global/cstring @@ -70,7 +70,9 @@ #undef strtok #undef strxfrm -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::memchr; using ::memcmp; @@ -117,6 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __builtin_strstr(__s1, __s2); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/c_global/ctime b/libstdc++-v3/include/c_global/ctime index f5bb49ccbc94..085e792c8f05 100644 --- a/libstdc++-v3/include/c_global/ctime +++ b/libstdc++-v3/include/c_global/ctime @@ -57,8 +57,8 @@ #undef localtime #undef strftime -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::clock_t; using ::time_t; using ::tm; @@ -72,7 +72,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::gmtime; using ::localtime; using ::strftime; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif diff --git a/libstdc++-v3/include/c_global/cwchar b/libstdc++-v3/include/c_global/cwchar index bbfcb64cb441..5a33965777e2 100644 --- a/libstdc++-v3/include/c_global/cwchar +++ b/libstdc++-v3/include/c_global/cwchar @@ -61,11 +61,10 @@ extern "C" } #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::mbstate_t; - -_GLIBCXX_END_NAMESPACE +} // namespace std // Get rid of those macros defined in in lieu of real functions. #undef btowc @@ -135,8 +134,8 @@ _GLIBCXX_END_NAMESPACE #if _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ using ::wint_t; using ::btowc; @@ -208,6 +207,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::wcsstr; using ::wmemchr; +_GLIBCXX_BEGIN_NAMESPACE_VERSION + #ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) @@ -230,7 +231,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return wmemchr(const_cast(__p), __c, __n); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99 @@ -238,8 +240,8 @@ _GLIBCXX_END_NAMESPACE #undef wcstoll #undef wcstoull -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx +{ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" long double (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); @@ -257,16 +259,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::wcstoll; using ::wcstoull; #endif +} // namespace __gnu_cxx -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif @@ -276,8 +276,8 @@ _GLIBCXX_END_NAMESPACE #ifdef _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ #if _GLIBCXX_HAVE_WCSTOF using std::wcstof; #endif @@ -296,8 +296,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using std::wcstoll; using std::wcstoull; #endif - -_GLIBCXX_END_NAMESPACE +} // namespace #endif // _GLIBCXX_USE_WCHAR_T diff --git a/libstdc++-v3/include/c_global/cwctype b/libstdc++-v3/include/c_global/cwctype index ff196434c821..e417b6874178 100644 --- a/libstdc++-v3/include/c_global/cwctype +++ b/libstdc++-v3/include/c_global/cwctype @@ -79,8 +79,8 @@ #if _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::wctrans_t; using ::wctype_t; using ::wint_t; @@ -105,8 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::towupper; using ::wctrans; using ::wctype; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif //_GLIBCXX_USE_WCHAR_T @@ -114,13 +113,12 @@ _GLIBCXX_END_NAMESPACE #ifdef _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ #if _GLIBCXX_HAVE_ISWBLANK using std::iswblank; #endif - -_GLIBCXX_END_NAMESPACE +} // namespace #endif // _GLIBCXX_USE_WCHAR_T diff --git a/libstdc++-v3/include/c_std/cctype b/libstdc++-v3/include/c_std/cctype index 7ba540b5b8a8..7aa4b3108a04 100644 --- a/libstdc++-v3/include/c_std/cctype +++ b/libstdc++-v3/include/c_std/cctype @@ -60,8 +60,8 @@ #undef tolower #undef toupper -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::isalnum; using ::isalpha; using ::iscntrl; @@ -75,7 +75,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::isxdigit; using ::tolower; using ::toupper; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/clocale b/libstdc++-v3/include/c_std/clocale index 36d8bd77ff50..c37631369954 100644 --- a/libstdc++-v3/include/c_std/clocale +++ b/libstdc++-v3/include/c_std/clocale @@ -49,12 +49,11 @@ #undef setlocale #undef localeconv -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::lconv; using ::setlocale; using ::localeconv; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cmath b/libstdc++-v3/include/c_std/cmath index fcdfa15b95ca..13eef4084021 100644 --- a/libstdc++-v3/include/c_std/cmath +++ b/libstdc++-v3/include/c_std/cmath @@ -75,7 +75,9 @@ #undef tan #undef tanh -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION inline double abs(double __x) @@ -442,7 +444,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) tanh(_Tp __x) { return __builtin_tanh(__x); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99_MATH #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC @@ -461,7 +464,9 @@ _GLIBCXX_END_NAMESPACE #undef islessgreater #undef isunordered -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, @@ -572,7 +577,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __builtin_isunordered(__type(__f1), __type(__f2)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */ #endif diff --git a/libstdc++-v3/include/c_std/csetjmp b/libstdc++-v3/include/c_std/csetjmp index c5a91bd06833..e2cb388403e9 100644 --- a/libstdc++-v3/include/c_std/csetjmp +++ b/libstdc++-v3/include/c_std/csetjmp @@ -53,11 +53,10 @@ #define setjmp(env) setjmp (env) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::jmp_buf; using ::longjmp; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/csignal b/libstdc++-v3/include/c_std/csignal index 7cba945b5970..c1cff8e36820 100644 --- a/libstdc++-v3/include/c_std/csignal +++ b/libstdc++-v3/include/c_std/csignal @@ -48,12 +48,11 @@ // Get rid of those macros defined in in lieu of real functions. #undef raise -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::sig_atomic_t; using ::signal; using ::raise; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cstdarg b/libstdc++-v3/include/c_std/cstdarg index b033d9eb4e76..5053e4f80be1 100644 --- a/libstdc++-v3/include/c_std/cstdarg +++ b/libstdc++-v3/include/c_std/cstdarg @@ -50,10 +50,9 @@ #define va_end(ap) va_end (ap) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::va_list; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 6f648ad10a61..510f599d876d 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -88,8 +88,8 @@ #undef vprintf #undef vsprintf -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::FILE; using ::fpos_t; @@ -134,8 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::vfprintf; using ::vprintf; using ::vsprintf; - -_GLIBCXX_END_NAMESPACE +} // namespace std #if _GLIBCXX_USE_C99 @@ -145,8 +144,8 @@ _GLIBCXX_END_NAMESPACE #undef vsnprintf #undef vsscanf -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx +{ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" int (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...) @@ -169,18 +168,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::vsnprintf; using ::vsscanf; #endif +} // namespace __gnu_cxx -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cstdlib b/libstdc++-v3/include/c_std/cstdlib index 443f1e7df75f..c3fe8aa4507d 100644 --- a/libstdc++-v3/include/c_std/cstdlib +++ b/libstdc++-v3/include/c_std/cstdlib @@ -53,13 +53,12 @@ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ extern "C" void abort(void) throw () _GLIBCXX_NORETURN; extern "C" int atexit(void (*)()) throw (); extern "C" void exit(int) throw () _GLIBCXX_NORETURN; - -_GLIBCXX_END_NAMESPACE +} // namespace #else @@ -95,7 +94,9 @@ _GLIBCXX_END_NAMESPACE #undef wcstombs #undef wctomb -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::div_t; using ::ldiv_t; @@ -139,7 +140,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99 @@ -152,7 +154,9 @@ _GLIBCXX_END_NAMESPACE #undef strtof #undef strtold -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::lldiv_t; @@ -192,10 +196,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::strtof; using ::strtold; -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __gnu_cxx +namespace std +{ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::__gnu_cxx::lldiv_t; #endif @@ -211,8 +216,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99 diff --git a/libstdc++-v3/include/c_std/cstring b/libstdc++-v3/include/c_std/cstring index 06bf12fba9d2..6dd8ab6c27f4 100644 --- a/libstdc++-v3/include/c_std/cstring +++ b/libstdc++-v3/include/c_std/cstring @@ -70,7 +70,9 @@ #undef strerror #undef strlen -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::memcpy; using ::memmove; @@ -117,6 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __builtin_strstr(__s1, __s2); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/c_std/ctime b/libstdc++-v3/include/c_std/ctime index 459c8fc7b60a..766d0929b724 100644 --- a/libstdc++-v3/include/c_std/ctime +++ b/libstdc++-v3/include/c_std/ctime @@ -56,8 +56,8 @@ #undef localtime #undef strftime -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::clock_t; using ::time_t; using ::tm; @@ -71,7 +71,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::gmtime; using ::localtime; using ::strftime; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar index f6676aa0402b..8480dac46a8a 100644 --- a/libstdc++-v3/include/c_std/cwchar +++ b/libstdc++-v3/include/c_std/cwchar @@ -61,11 +61,10 @@ extern "C" } #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::mbstate_t; - -_GLIBCXX_END_NAMESPACE +} // namespace std // Get rid of those macros defined in in lieu of real functions. #undef btowc @@ -135,7 +134,9 @@ _GLIBCXX_END_NAMESPACE #if _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::wint_t; @@ -226,7 +227,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return wmemchr(const_cast(__p), __c, __n); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99 @@ -234,8 +236,8 @@ _GLIBCXX_END_NAMESPACE #undef wcstoll #undef wcstoull -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx +{ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" long double (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); @@ -253,16 +255,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::wcstoll; using ::wcstoull; #endif +} // namespace __gnu_cxx -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cwctype b/libstdc++-v3/include/c_std/cwctype index d6750390a0a2..efaa338b9741 100644 --- a/libstdc++-v3/include/c_std/cwctype +++ b/libstdc++-v3/include/c_std/cwctype @@ -78,8 +78,8 @@ #if _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::wint_t; // cwchar using ::wctype_t; @@ -105,8 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::towupper; using ::wctrans; using ::wctype; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif //_GLIBCXX_USE_WCHAR_T diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset index 340bf1e9e1b2..c1875454255f 100644 --- a/libstdc++-v3/include/debug/bitset +++ b/libstdc++-v3/include/debug/bitset @@ -34,19 +34,19 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { /// Class std::bitset with additional safety/checking/debug instrumentation. template class bitset - : public _GLIBCXX_STD_D::bitset<_Nb> + : public _GLIBCXX_STD_C::bitset<_Nb> #ifndef __GXX_EXPERIMENTAL_CXX0X__ , public __gnu_debug::_Safe_sequence_base #endif { - typedef _GLIBCXX_STD_D::bitset<_Nb> _Base; + typedef _GLIBCXX_STD_C::bitset<_Nb> _Base; public: // In C++0x we rely on normal reference type to preserve the property @@ -410,7 +410,7 @@ namespace __debug { size_t operator()(const __debug::bitset<_Nb>& __b) const - { return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); } + { return std::hash<_GLIBCXX_STD_C::bitset<_Nb>>()(__b._M_base()); } }; #endif diff --git a/libstdc++-v3/include/debug/debug.h b/libstdc++-v3/include/debug/debug.h index dd21e9c530e5..6ea8e2addba5 100644 --- a/libstdc++-v3/include/debug/debug.h +++ b/libstdc++-v3/include/debug/debug.h @@ -44,7 +44,7 @@ * @namespace std::__debug * @brief GNU debug code, replaces standard behavior with debug behavior. */ -namespace std +namespace std { namespace __debug { } } diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index cf63c3af090c..ee17f204132b 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -34,17 +34,17 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { /// Class std::deque with safety/checking/debug instrumentation. template > class deque - : public _GLIBCXX_STD_D::deque<_Tp, _Allocator>, + : public _GLIBCXX_STD_C::deque<_Tp, _Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::deque<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::deque<_Tp, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/forward_list b/libstdc++-v3/include/debug/forward_list index 09b0b8659f44..70bd75a86b9d 100644 --- a/libstdc++-v3/include/debug/forward_list +++ b/libstdc++-v3/include/debug/forward_list @@ -35,17 +35,17 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { /// Class std::forward_list with safety/checking/debug instrumentation. template > class forward_list - : public _GLIBCXX_STD_D::forward_list<_Tp, _Alloc>, + : public _GLIBCXX_STD_C::forward_list<_Tp, _Alloc>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::forward_list<_Tp, _Alloc> _Base; + typedef _GLIBCXX_STD_C::forward_list<_Tp, _Alloc> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::iterator _Base_iterator; diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 54b736c8a9c5..a7a2c5499180 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -34,17 +34,17 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { /// Class std::list with safety/checking/debug instrumentation. template > class list - : public _GLIBCXX_STD_D::list<_Tp, _Allocator>, + : public _GLIBCXX_STD_C::list<_Tp, _Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::list<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::list<_Tp, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::iterator _Base_iterator; diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 79f9b8287d43..c550db14984f 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -34,7 +34,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -42,10 +42,10 @@ namespace __debug template, typename _Allocator = std::allocator > > class map - : public _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator>, + : public _GLIBCXX_STD_C::map<_Key, _Tp, _Compare, _Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::map<_Key, _Tp, _Compare, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index 58673cc7adf5..a9d742b04450 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -34,7 +34,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -42,11 +42,11 @@ namespace __debug template, typename _Allocator = std::allocator > > class multimap - : public _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator>, + : public _GLIBCXX_STD_C::multimap<_Key, _Tp, _Compare, _Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::multimap<_Key, _Tp, _Compare, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index 8462586b8443..6808fb80411f 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -34,7 +34,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -42,10 +42,10 @@ namespace __debug template, typename _Allocator = std::allocator<_Key> > class multiset - : public _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator>, + : public _GLIBCXX_STD_C::multiset<_Key, _Compare, _Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::multiset<_Key, _Compare, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 60fbd38f26b9..7ca4c7788816 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -34,7 +34,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -42,10 +42,10 @@ namespace __debug template, typename _Allocator = std::allocator<_Key> > class set - : public _GLIBCXX_STD_D::set<_Key,_Compare,_Allocator>, + : public _GLIBCXX_STD_C::set<_Key,_Compare,_Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::set<_Key, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::set<_Key, _Compare, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 5ea35acfac12..2d7e100c43eb 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -38,7 +38,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -48,11 +48,11 @@ namespace __debug typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key> > class unordered_map - : public _GLIBCXX_STD_D::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>, + : public _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::unordered_map<_Key, _Tp, _Hash, + typedef _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; @@ -335,12 +335,12 @@ namespace __debug typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key> > class unordered_multimap - : public _GLIBCXX_STD_D::unordered_multimap<_Key, _Tp, _Hash, + : public _GLIBCXX_STD_C::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::unordered_multimap<_Key, _Tp, _Hash, + typedef _GLIBCXX_STD_C::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 3e771a86dafb..e30f976d3d62 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -38,7 +38,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -48,11 +48,11 @@ namespace __debug typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value> > class unordered_set - : public _GLIBCXX_STD_D::unordered_set<_Value, _Hash, _Pred, _Alloc>, + : public _GLIBCXX_STD_C::unordered_set<_Value, _Hash, _Pred, _Alloc>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::unordered_set<_Value, _Hash, + typedef _GLIBCXX_STD_C::unordered_set<_Value, _Hash, _Pred, _Alloc> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; @@ -325,11 +325,11 @@ namespace __debug typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value> > class unordered_multiset - : public _GLIBCXX_STD_D::unordered_multiset<_Value, _Hash, _Pred, _Alloc>, + : public _GLIBCXX_STD_C::unordered_multiset<_Value, _Hash, _Pred, _Alloc>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::unordered_multiset<_Value, _Hash, + typedef _GLIBCXX_STD_C::unordered_multiset<_Value, _Hash, _Pred, _Alloc> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::const_iterator _Base_const_iterator; diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index 322c170289a8..e2dd71a7e84f 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -35,7 +35,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug { @@ -43,10 +43,10 @@ namespace __debug template > class vector - : public _GLIBCXX_STD_D::vector<_Tp, _Allocator>, + : public _GLIBCXX_STD_C::vector<_Tp, _Allocator>, public __gnu_debug::_Safe_sequence > { - typedef _GLIBCXX_STD_D::vector<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator> _Base; typedef __gnu_debug::_Safe_sequence _Safe_base; typedef typename _Base::iterator _Base_iterator; @@ -595,7 +595,7 @@ namespace __debug { size_t operator()(const __debug::vector& __b) const - { return std::hash<_GLIBCXX_STD_D::vector>() + { return std::hash<_GLIBCXX_STD_C::vector>() (__b._M_base()); } }; #endif diff --git a/libstdc++-v3/include/decimal/decimal b/libstdc++-v3/include/decimal/decimal index 1f104b766294..d65b814ea65a 100644 --- a/libstdc++-v3/include/decimal/decimal +++ b/libstdc++-v3/include/decimal/decimal @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 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 @@ -40,7 +40,7 @@ that is currently not available. #endif -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { /** * @defgroup decimal Decimal Floating-Point Arithmetic @@ -55,6 +55,8 @@ namespace std */ namespace decimal { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + class decimal32; class decimal64; class decimal128; @@ -473,6 +475,7 @@ namespace decimal #define _GLIBCXX_USE_DECIMAL_ 1 + _GLIBCXX_END_NAMESPACE_VERSION } // namespace decimal // @} group decimal } // namespace std diff --git a/libstdc++-v3/include/decimal/decimal.h b/libstdc++-v3/include/decimal/decimal.h index 45a6fbc20a83..f8f05734ba8f 100644 --- a/libstdc++-v3/include/decimal/decimal.h +++ b/libstdc++-v3/include/decimal/decimal.h @@ -1,6 +1,6 @@ // decimal classes -*- C++ -*- -// Copyright (C) 2009 Free Software Foundation, Inc. +// Copyright (C) 2009, 2011 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 @@ -22,9 +22,9 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -/** @file bits/decimal.h +/** @file decimal/decimal.h * This is an internal header file, included by other library headers. - * You should not attempt to use it directly. + * Do not attempt to use it directly. @headername{decimal} */ // ISO/IEC TR 24733 @@ -35,10 +35,12 @@ #pragma GCC system_header -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace decimal { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + // ISO/IEC TR 24733 3.2.[234].1 Construct/copy/destroy. inline decimal32::decimal32(decimal64 __r) : __val(__r.__getval()) {} @@ -459,7 +461,7 @@ namespace decimal #undef _DEFINE_DECIMAL_COMPARISON_LHS #undef _DEFINE_DECIMAL_COMPARISON_RHS #undef _DEFINE_DECIMAL_COMPARISONS - + _GLIBCXX_END_NAMESPACE_VERSION } // namespace decimal } // namespace std diff --git a/libstdc++-v3/include/ext/algorithm b/libstdc++-v3/include/ext/algorithm index cac4ff70e8e8..bfe454cecd40 100644 --- a/libstdc++-v3/include/ext/algorithm +++ b/libstdc++-v3/include/ext/algorithm @@ -61,7 +61,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::ptrdiff_t; using std::min; @@ -588,6 +590,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) return __b; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _EXT_ALGORITHM */ diff --git a/libstdc++-v3/include/ext/array_allocator.h b/libstdc++-v3/include/ext/array_allocator.h index ca4d0d19b017..9c61d7431b1a 100644 --- a/libstdc++-v3/include/ext/array_allocator.h +++ b/libstdc++-v3/include/ext/array_allocator.h @@ -36,7 +36,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -149,6 +151,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) const array_allocator<_Tp, _Array>&) { return false; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/atomicity.h b/libstdc++-v3/include/ext/atomicity.h index 50ebadb0c5ff..f0c775216c5d 100644 --- a/libstdc++-v3/include/ext/atomicity.h +++ b/libstdc++-v3/include/ext/atomicity.h @@ -34,7 +34,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Functions for portable atomic access. // To abstract locking primitives across all thread policies, use: @@ -98,7 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #endif } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // Even if the CPU doesn't need a memory barrier, we need to ensure // that the compiler doesn't reorder memory accesses across the diff --git a/libstdc++-v3/include/ext/bitmap_allocator.h b/libstdc++-v3/include/ext/bitmap_allocator.h index 2aa08706c9d5..4993c2c57803 100644 --- a/libstdc++-v3/include/ext/bitmap_allocator.h +++ b/libstdc++-v3/include/ext/bitmap_allocator.h @@ -1,6 +1,6 @@ // Bitmap Allocator. -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -43,13 +43,14 @@ */ #define _BALLOC_ALIGN_BYTES 8 -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ using std::size_t; using std::ptrdiff_t; namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** @class __mini_vector bitmap_allocator.h bitmap_allocator.h * * @brief __mini_vector<> is a stripped down version of the @@ -504,8 +505,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) size_t __mask = 1 << __pos; *__pbmap |= __mask; } + + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** @brief Generic Version of the bsf instruction. */ inline size_t @@ -1100,7 +1105,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) bitmap_allocator<_Tp>::_S_mut; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __gnu_cxx #endif diff --git a/libstdc++-v3/include/ext/cast.h b/libstdc++-v3/include/ext/cast.h index 3242d4ba7610..f3384f9a596f 100644 --- a/libstdc++-v3/include/ext/cast.h +++ b/libstdc++-v3/include/ext/cast.h @@ -30,7 +30,9 @@ #ifndef _GLIBCXX_CAST_H #define _GLIBCXX_CAST_H 1 -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * These functions are here to allow containers to support non standard @@ -113,6 +115,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { return _ToType(reinterpret_cast:: type>(__arg)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GLIBCXX_CAST_H diff --git a/libstdc++-v3/include/ext/codecvt_specializations.h b/libstdc++-v3/include/ext/codecvt_specializations.h index 53295891bac4..38b95efc107c 100644 --- a/libstdc++-v3/include/ext/codecvt_specializations.h +++ b/libstdc++-v3/include/ext/codecvt_specializations.h @@ -41,7 +41,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// Extension to use iconv for dealing with character encodings. // This includes conversions and comparisons between various character @@ -213,10 +215,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) typedef typename std::fpos pos_type; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using __gnu_cxx::encoding_state; @@ -503,6 +508,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) do_max_length() const throw() { return 1; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/concurrence.h b/libstdc++-v3/include/ext/concurrence.h index b6f86a41c51b..fc8f63f827e8 100644 --- a/libstdc++-v3/include/ext/concurrence.h +++ b/libstdc++-v3/include/ext/concurrence.h @@ -38,7 +38,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Available locking policies: // _S_single single-threaded code that doesn't need to be locked. @@ -381,6 +383,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) }; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/debug_allocator.h b/libstdc++-v3/include/ext/debug_allocator.h index cc8c567af0b1..12a5ea6ba927 100644 --- a/libstdc++-v3/include/ext/debug_allocator.h +++ b/libstdc++-v3/include/ext/debug_allocator.h @@ -45,7 +45,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; @@ -119,6 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/enc_filebuf.h b/libstdc++-v3/include/ext/enc_filebuf.h index 4f835679122e..058d330c106b 100644 --- a/libstdc++-v3/include/ext/enc_filebuf.h +++ b/libstdc++-v3/include/ext/enc_filebuf.h @@ -33,7 +33,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// class enc_filebuf. template @@ -57,6 +59,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __glibcxx_class_requires(state_type, _SGIAssignableConcept) }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/extptr_allocator.h b/libstdc++-v3/include/ext/extptr_allocator.h index d3caf8a4101f..dfb76ac09591 100644 --- a/libstdc++-v3/include/ext/extptr_allocator.h +++ b/libstdc++-v3/include/ext/extptr_allocator.h @@ -40,7 +40,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief An example allocator which uses a non-standard pointer type. @@ -173,6 +175,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __larg._M_real_alloc = __tmp; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _EXTPTR_ALLOCATOR_H */ diff --git a/libstdc++-v3/include/ext/functional b/libstdc++-v3/include/ext/functional index 7cf6a45a0a30..7e8acdfb4e63 100644 --- a/libstdc++-v3/include/ext/functional +++ b/libstdc++-v3/include/ext/functional @@ -61,7 +61,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::unary_function; @@ -418,7 +420,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/iterator b/libstdc++-v3/include/ext/iterator index 83b4b578acef..3e8f438ad314 100644 --- a/libstdc++-v3/include/ext/iterator +++ b/libstdc++-v3/include/ext/iterator @@ -61,7 +61,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // There are two signatures for distance. In addition to the one // taking two iterators and returning a result, there is another @@ -107,7 +109,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __distance(__first, __last, __n, std::__iterator_category(__first)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/malloc_allocator.h b/libstdc++-v3/include/ext/malloc_allocator.h index ed3c3b2b0ac9..3aa994d9f70e 100644 --- a/libstdc++-v3/include/ext/malloc_allocator.h +++ b/libstdc++-v3/include/ext/malloc_allocator.h @@ -35,7 +35,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -129,6 +131,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) operator!=(const malloc_allocator<_Tp>&, const malloc_allocator<_Tp>&) { return false; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/memory b/libstdc++-v3/include/ext/memory index 7776d730a4a0..ddcfe22b5bed 100644 --- a/libstdc++-v3/include/ext/memory +++ b/libstdc++-v3/include/ext/memory @@ -62,7 +62,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::ptrdiff_t; using std::pair; @@ -189,7 +191,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ~temporary_buffer() { } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h index 1f6561db464a..91eac24f223b 100644 --- a/libstdc++-v3/include/ext/mt_allocator.h +++ b/libstdc++-v3/include/ext/mt_allocator.h @@ -36,7 +36,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -746,6 +748,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #undef __thread_default -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/new_allocator.h b/libstdc++-v3/include/ext/new_allocator.h index 545056542071..35d5cdccd58e 100644 --- a/libstdc++-v3/include/ext/new_allocator.h +++ b/libstdc++-v3/include/ext/new_allocator.h @@ -35,7 +35,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -126,6 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return false; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/numeric b/libstdc++-v3/include/ext/numeric index 5df5ee2692c1..d4a367fca52f 100644 --- a/libstdc++-v3/include/ext/numeric +++ b/libstdc++-v3/include/ext/numeric @@ -63,7 +63,9 @@ #include // For identity_element -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Returns __x ** __n, where __n >= 0. _Note that "multiplication" // is required to be associative, but not necessarily commutative. @@ -140,7 +142,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *__first++ = __value++; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/numeric_traits.h b/libstdc++-v3/include/ext/numeric_traits.h index ab66a4935809..e84e29821478 100644 --- a/libstdc++-v3/include/ext/numeric_traits.h +++ b/libstdc++-v3/include/ext/numeric_traits.h @@ -34,7 +34,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Compile time constants for builtin types. // Sadly std::numeric_limits member functions cannot be used for this. @@ -125,7 +127,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __numeric_traits_floating<_Value> >::__type { }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #undef __glibcxx_floating #undef __glibcxx_max_digits10 diff --git a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp index 39a12c5a1b1f..9dc763595607 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp @@ -75,7 +75,7 @@ namespace __gnu_pbds typedef typename std::allocator key_allocator; typedef typename key_allocator::size_type size_type; typedef Const_Key_Reference const_key_reference; - typedef std::__norm::list key_set; + typedef std::_GLIBCXX_STD_C::list key_set; typedef typename key_set::iterator key_set_iterator; typedef typename key_set::const_iterator const_key_set_iterator; typedef __gnu_cxx::throw_allocator_random key_db_allocator; diff --git a/libstdc++-v3/include/ext/pod_char_traits.h b/libstdc++-v3/include/ext/pod_char_traits.h index 2797c1bf25c1..3c9f0988a688 100644 --- a/libstdc++-v3/include/ext/pod_char_traits.h +++ b/libstdc++-v3/include/ext/pod_char_traits.h @@ -34,7 +34,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // POD character abstraction. // NB: The char_type parameter is a subset of int_type, as to allow @@ -79,9 +81,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) operator<(const character& lhs, const character& rhs) { return lhs.value < rhs.value; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /// char_traits<__gnu_cxx::character> specialization. template @@ -177,6 +182,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return eq_int_type(__c, eof()) ? int_type() : __c; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/pointer.h b/libstdc++-v3/include/ext/pointer.h index 692a1c8d1d6e..158ae52e3b81 100644 --- a/libstdc++-v3/include/ext/pointer.h +++ b/libstdc++-v3/include/ext/pointer.h @@ -43,7 +43,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A storage policy for use with _Pointer_adapter<> which yields a @@ -562,6 +564,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) const _Pointer_adapter<_StoreT>& __p) { return (__os << __p.get()); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _POINTER_H diff --git a/libstdc++-v3/include/ext/pool_allocator.h b/libstdc++-v3/include/ext/pool_allocator.h index 66cda84b42d3..66ddced8054e 100644 --- a/libstdc++-v3/include/ext/pool_allocator.h +++ b/libstdc++-v3/include/ext/pool_allocator.h @@ -51,7 +51,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -258,6 +260,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/rb_tree b/libstdc++-v3/include/ext/rb_tree index 185d02efe760..4293a7555777 100644 --- a/libstdc++-v3/include/ext/rb_tree +++ b/libstdc++-v3/include/ext/rb_tree @@ -60,7 +60,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::_Rb_tree; using std::allocator; @@ -88,6 +90,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ~rb_tree() { } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h index b4037d60558a..4a27ff6ef5bb 100644 --- a/libstdc++-v3/include/ext/rc_string_base.h +++ b/libstdc++-v3/include/ext/rc_string_base.h @@ -34,7 +34,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * Documentation? What's that? @@ -725,6 +727,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _RC_STRING_BASE_H */ diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope index 462c8f5db2ba..42921516e40b 100644 --- a/libstdc++-v3/include/ext/rope +++ b/libstdc++-v3/include/ext/rope @@ -62,8 +62,8 @@ #include // For uninitialized_copy_n -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ namespace __detail { enum { _S_max_rope_depth = 45 }; @@ -75,6 +75,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using std::allocator; using std::_Destroy; +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // See libstdc++/36832. template void @@ -2917,13 +2919,16 @@ protected: swap(rope<_CharT, _Alloc>& __x, rope<_CharT, _Alloc>& __y) { __x.swap(__y); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template<> struct hash<__gnu_cxx::crope> { @@ -2950,6 +2955,8 @@ namespace tr1 return 13 * __str[0] + 5 * __str[__size - 1] + __size; } }; + +_GLIBCXX_END_NAMESPACE_VERSION } // namespace tr1 } // namespace std diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index 46299cb94de7..467b8fd93d2d 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -49,7 +49,9 @@ #include // For uninitialized_copy_n #include // For power -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::printf; @@ -1698,4 +1700,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) { _Rope_rotate(__first, __middle, __last); } # endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist index a34e36e310a8..e678190bf1de 100644 --- a/libstdc++-v3/include/ext/slist +++ b/libstdc++-v3/include/ext/slist @@ -51,7 +51,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; @@ -1021,9 +1023,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Specialization of insert_iterator so that insertions will be constant // time rather than linear time. @@ -1072,6 +1077,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return *this; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h index 4899e1fdcb70..053f514838de 100644 --- a/libstdc++-v3/include/ext/sso_string_base.h +++ b/libstdc++-v3/include/ext/sso_string_base.h @@ -31,7 +31,9 @@ #ifndef _SSO_STRING_BASE_H #define _SSO_STRING_BASE_H 1 -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class __sso_string_base @@ -570,6 +572,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _M_set_length(_M_length() - __n); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _SSO_STRING_BASE_H */ diff --git a/libstdc++-v3/include/ext/stdio_filebuf.h b/libstdc++-v3/include/ext/stdio_filebuf.h index 09c3c268de09..5ab2ff7adb83 100644 --- a/libstdc++-v3/include/ext/stdio_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_filebuf.h @@ -34,7 +34,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Provides a layer of compatibility for C/POSIX. @@ -154,6 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/stdio_sync_filebuf.h b/libstdc++-v3/include/ext/stdio_sync_filebuf.h index 84a8c26f18dd..4b6014954181 100644 --- a/libstdc++-v3/include/ext/stdio_sync_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_sync_filebuf.h @@ -41,7 +41,9 @@ #include #endif -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Provides a layer of compatibility for C. @@ -282,6 +284,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/string_conversions.h b/libstdc++-v3/include/ext/string_conversions.h index 196295c839d4..f85ab99235c8 100644 --- a/libstdc++-v3/include/ext/string_conversions.h +++ b/libstdc++-v3/include/ext/string_conversions.h @@ -39,7 +39,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Helper for all the sto* functions. template #endif -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Thown by exception safety machinery. @@ -721,13 +723,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ~throw_allocator_random() throw() { } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #ifdef __GXX_EXPERIMENTAL_CXX0X__ # include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { /// Explicit specialization of std::hash for __gnu_cxx::throw_value_limit. template<> diff --git a/libstdc++-v3/include/ext/type_traits.h b/libstdc++-v3/include/ext/type_traits.h index b24ce4e5b921..92747268a06f 100644 --- a/libstdc++-v3/include/ext/type_traits.h +++ b/libstdc++-v3/include/ext/type_traits.h @@ -34,7 +34,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Define a nested type if some predicate holds. template @@ -199,6 +201,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/typelist.h b/libstdc++-v3/include/ext/typelist.h index 6a9c851d18ba..7f94ecd72823 100644 --- a/libstdc++-v3/include/ext/typelist.h +++ b/libstdc++-v3/include/ext/typelist.h @@ -45,7 +45,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** @namespace __gnu_cxx::typelist * @brief GNU typelist extensions for public compile-time use. @@ -127,10 +129,13 @@ namespace typelist struct create6; } // namespace typelist -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace typelist { @@ -363,7 +368,8 @@ namespace detail } // namespace detail } // namespace typelist -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #define _GLIBCXX_TYPELIST_CHAIN1(X0) __gnu_cxx::typelist::chain #define _GLIBCXX_TYPELIST_CHAIN2(X0, X1) __gnu_cxx::typelist::chain @@ -381,7 +387,9 @@ _GLIBCXX_END_NAMESPACE #define _GLIBCXX_TYPELIST_CHAIN14(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) __gnu_cxx::typelist::chain #define _GLIBCXX_TYPELIST_CHAIN15(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) __gnu_cxx::typelist::chain -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace typelist { @@ -539,7 +547,8 @@ namespace typelist typedef node<_GLIBCXX_TYPELIST_CHAIN6(T1,T2,T3,T4,T5,T6)> type; }; } // namespace typelist -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 735e82c64188..46959787c2d8 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -37,7 +37,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @class __versa_string vstring.h @@ -2420,9 +2422,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs) { __lhs.swap(__rhs); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Read stream into a string. @@ -2505,13 +2510,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str) { return getline(__is, __str, __is.widen('\n')); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99)) #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 21.4 Numeric Conversions [string.conversions]. inline int @@ -2718,7 +2726,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/ext/vstring.tcc b/libstdc++-v3/include/ext/vstring.tcc index 95d4cc36cc49..e36058bcebf9 100644 --- a/libstdc++-v3/include/ext/vstring.tcc +++ b/libstdc++-v3/include/ext/vstring.tcc @@ -35,7 +35,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class _Base> @@ -537,9 +539,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) return __r; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class _Base> @@ -691,6 +696,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __in; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _VSTRING_TCC diff --git a/libstdc++-v3/include/ext/vstring_fwd.h b/libstdc++-v3/include/ext/vstring_fwd.h index fd3f4f8faaa3..ce8cf53fb607 100644 --- a/libstdc++-v3/include/ext/vstring_fwd.h +++ b/libstdc++-v3/include/ext/vstring_fwd.h @@ -37,7 +37,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class __sso_string_base; @@ -82,6 +84,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _VSTRING_FWD_H */ diff --git a/libstdc++-v3/include/ext/vstring_util.h b/libstdc++-v3/include/ext/vstring_util.h index d9307cc58fab..fdf39812052f 100644 --- a/libstdc++-v3/include/ext/vstring_util.h +++ b/libstdc++-v3/include/ext/vstring_util.h @@ -44,7 +44,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __vstring_utility @@ -176,6 +178,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _VSTRING_UTIL_H */ diff --git a/libstdc++-v3/include/parallel/algo.h b/libstdc++-v3/include/parallel/algo.h index a24e557ad90d..89b7f6d827f4 100644 --- a/libstdc++-v3/include/parallel/algo.h +++ b/libstdc++-v3/include/parallel/algo.h @@ -58,7 +58,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __parallel { @@ -67,7 +67,7 @@ namespace __parallel inline _Function for_each(_IIter __begin, _IIter __end, _Function __f, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::for_each(__begin, __end, __f); } + { return _GLIBCXX_STD_A::for_each(__begin, __end, __f); } // Sequential fallback for input iterator case @@ -130,14 +130,14 @@ namespace __parallel inline _IIter find(_IIter __begin, _IIter __end, const _Tp& __val, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::find(__begin, __end, __val); } + { return _GLIBCXX_STD_A::find(__begin, __end, __val); } // Sequential fallback for input iterator case template inline _IIter __find_switch(_IIter __begin, _IIter __end, const _Tp& __val, _IteratorTag) - { return _GLIBCXX_STD_P::find(__begin, __end, __val); } + { return _GLIBCXX_STD_A::find(__begin, __end, __val); } // Parallel find for random access iterators template @@ -157,7 +157,7 @@ namespace __parallel __gnu_parallel::__find_if_selector()).first; } else - return _GLIBCXX_STD_P::find(__begin, __end, __val); + return _GLIBCXX_STD_A::find(__begin, __end, __val); } // Public interface @@ -175,14 +175,14 @@ namespace __parallel inline _IIter find_if(_IIter __begin, _IIter __end, _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::find_if(__begin, __end, __pred); } + { return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } // Sequential fallback for input iterator case template inline _IIter __find_if_switch(_IIter __begin, _IIter __end, _Predicate __pred, _IteratorTag) - { return _GLIBCXX_STD_P::find_if(__begin, __end, __pred); } + { return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } // Parallel find_if for random access iterators template @@ -195,7 +195,7 @@ namespace __parallel __gnu_parallel:: __find_if_selector()).first; else - return _GLIBCXX_STD_P::find_if(__begin, __end, __pred); + return _GLIBCXX_STD_A::find_if(__begin, __end, __pred); } // Public interface @@ -214,7 +214,7 @@ namespace __parallel find_first_of(_IIter __begin1, _IIter __end1, _FIterator __begin2, _FIterator __end2, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::find_first_of(__begin1, __end1, __begin2, __end2); + { return _GLIBCXX_STD_A::find_first_of(__begin1, __end1, __begin2, __end2); } // Sequential fallback @@ -224,7 +224,7 @@ namespace __parallel find_first_of(_IIter __begin1, _IIter __end1, _FIterator __begin2, _FIterator __end2, _BinaryPredicate __comp, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::find_first_of( + { return _GLIBCXX_STD_A::find_first_of( __begin1, __end1, __begin2, __end2, __comp); } // Sequential fallback for input iterator type @@ -301,7 +301,7 @@ namespace __parallel inline _OutputIterator unique_copy(_IIter __begin1, _IIter __end1, _OutputIterator __out, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::unique_copy(__begin1, __end1, __out); } + { return _GLIBCXX_STD_A::unique_copy(__begin1, __end1, __out); } // Sequential fallback template @@ -802,7 +802,7 @@ namespace __parallel adjacent_find(_FIterator __begin, _FIterator __end, _BinaryPredicate __binary_pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::adjacent_find(__begin, __end, __binary_pred); } + { return _GLIBCXX_STD_A::adjacent_find(__begin, __end, __binary_pred); } // Parallel algorithm for random access iterators template @@ -887,7 +887,7 @@ namespace __parallel inline typename iterator_traits<_IIter>::difference_type count(_IIter __begin, _IIter __end, const _Tp& __value, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::count(__begin, __end, __value); } + { return _GLIBCXX_STD_A::count(__begin, __end, __value); } // Parallel code for random access iterators template @@ -957,7 +957,7 @@ namespace __parallel inline typename iterator_traits<_IIter>::difference_type count_if(_IIter __begin, _IIter __end, _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::count_if(__begin, __end, __pred); } + { return _GLIBCXX_STD_A::count_if(__begin, __end, __pred); } // Parallel count_if for random access iterators template @@ -1029,7 +1029,7 @@ namespace __parallel search(_FIterator1 __begin1, _FIterator1 __end1, _FIterator2 __begin2, _FIterator2 __end2, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::search(__begin1, __end1, __begin2, __end2); } + { return _GLIBCXX_STD_A::search(__begin1, __end1, __begin2, __end2); } // Parallel algorithm for random access iterator template @@ -1087,7 +1087,7 @@ namespace __parallel search(_FIterator1 __begin1, _FIterator1 __end1, _FIterator2 __begin2, _FIterator2 __end2, _BinaryPredicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::search( + { return _GLIBCXX_STD_A::search( __begin1, __end1, __begin2, __end2, __pred); } // Parallel algorithm for random access iterator. @@ -1141,7 +1141,7 @@ namespace __parallel inline _FIterator search_n(_FIterator __begin, _FIterator __end, _Integer __count, const _Tp& __val, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::search_n(__begin, __end, __count, __val); } + { return _GLIBCXX_STD_A::search_n(__begin, __end, __count, __val); } // Sequential fallback template @@ -1459,7 +1459,7 @@ namespace __parallel inline void replace_if(_FIterator __begin, _FIterator __end, _Predicate __pred, const _Tp& __new_value, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::replace_if(__begin, __end, __pred, __new_value); } + { _GLIBCXX_STD_A::replace_if(__begin, __end, __pred, __new_value); } // Sequential fallback for input iterator case template @@ -1590,7 +1590,7 @@ namespace __parallel inline _OutputIterator generate_n(_OutputIterator __begin, _Size __n, _Generator __gen, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::generate_n(__begin, __n, __gen); } + { return _GLIBCXX_STD_A::generate_n(__begin, __n, __gen); } // Sequential fallback for input iterator case. template @@ -1648,7 +1648,7 @@ namespace __parallel random_shuffle(_RAIter __begin, _RAIter __end, _RandomNumberGenerator& __rand, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::random_shuffle(__begin, __end, __rand); } + { _GLIBCXX_STD_A::random_shuffle(__begin, __end, __rand); } /** @brief Functor wrapper for std::rand(). */ @@ -1695,7 +1695,7 @@ namespace __parallel inline _FIterator partition(_FIterator __begin, _FIterator __end, _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::partition(__begin, __end, __pred); } + { return _GLIBCXX_STD_A::partition(__begin, __end, __pred); } // Sequential fallback for input iterator case. template @@ -1744,14 +1744,14 @@ namespace __parallel inline void sort(_RAIter __begin, _RAIter __end, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::sort(__begin, __end); } + { _GLIBCXX_STD_A::sort(__begin, __end); } // Sequential fallback template inline void sort(_RAIter __begin, _RAIter __end, _Compare __comp, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::sort<_RAIter, _Compare>(__begin, __end, + { _GLIBCXX_STD_A::sort<_RAIter, _Compare>(__begin, __end, __comp); } // Public interface @@ -1883,14 +1883,14 @@ namespace __parallel inline void stable_sort(_RAIter __begin, _RAIter __end, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::stable_sort(__begin, __end); } + { _GLIBCXX_STD_A::stable_sort(__begin, __end); } // Sequential fallback template inline void stable_sort(_RAIter __begin, _RAIter __end, _Compare __comp, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::stable_sort<_RAIter, _Compare>( + { _GLIBCXX_STD_A::stable_sort<_RAIter, _Compare>( __begin, __end, __comp); } // Public interface @@ -2001,7 +2001,7 @@ namespace __parallel merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, _OutputIterator __result, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::merge( + { return _GLIBCXX_STD_A::merge( __begin1, __end1, __begin2, __end2, __result); } // Sequential fallback @@ -2011,7 +2011,7 @@ namespace __parallel merge(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, _OutputIterator __result, _Compare __comp, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::merge( + { return _GLIBCXX_STD_A::merge( __begin1, __end1, __begin2, __end2, __result, __comp); } // Sequential fallback for input iterator case @@ -2023,7 +2023,7 @@ namespace __parallel _IIter2 __begin2, _IIter2 __end2, _OutputIterator __result, _Compare __comp, _IteratorTag1, _IteratorTag2, _IteratorTag3) - { return _GLIBCXX_STD_P::merge(__begin1, __end1, __begin2, __end2, + { return _GLIBCXX_STD_A::merge(__begin1, __end1, __begin2, __end2, __result, __comp); } // Parallel algorithm for random access iterators @@ -2095,7 +2095,7 @@ namespace __parallel inline void nth_element(_RAIter __begin, _RAIter __nth, _RAIter __end, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::nth_element(__begin, __nth, __end); } + { return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end); } // Sequential fallback template @@ -2103,7 +2103,7 @@ namespace __parallel nth_element(_RAIter __begin, _RAIter __nth, _RAIter __end, _Compare __comp, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::nth_element(__begin, __nth, __end, __comp); } + { return _GLIBCXX_STD_A::nth_element(__begin, __nth, __end, __comp); } // Public interface template @@ -2138,14 +2138,14 @@ namespace __parallel partial_sort(_RAIter __begin, _RAIter __middle, _RAIter __end, _Compare __comp, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::partial_sort(__begin, __middle, __end, __comp); } + { _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end, __comp); } // Sequential fallback template inline void partial_sort(_RAIter __begin, _RAIter __middle, _RAIter __end, __gnu_parallel::sequential_tag) - { _GLIBCXX_STD_P::partial_sort(__begin, __middle, __end); } + { _GLIBCXX_STD_A::partial_sort(__begin, __middle, __end); } // Public interface, parallel algorithm for random access iterators template @@ -2180,14 +2180,14 @@ namespace __parallel inline _FIterator max_element(_FIterator __begin, _FIterator __end, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::max_element(__begin, __end); } + { return _GLIBCXX_STD_A::max_element(__begin, __end); } // Sequential fallback template inline _FIterator max_element(_FIterator __begin, _FIterator __end, _Compare __comp, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::max_element(__begin, __end, __comp); } + { return _GLIBCXX_STD_A::max_element(__begin, __end, __comp); } // Sequential fallback for input iterator case template @@ -2272,14 +2272,14 @@ namespace __parallel inline _FIterator min_element(_FIterator __begin, _FIterator __end, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::min_element(__begin, __end); } + { return _GLIBCXX_STD_A::min_element(__begin, __end); } // Sequential fallback template inline _FIterator min_element(_FIterator __begin, _FIterator __end, _Compare __comp, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::min_element(__begin, __end, __comp); } + { return _GLIBCXX_STD_A::min_element(__begin, __end, __comp); } // Sequential fallback for input iterator case template diff --git a/libstdc++-v3/include/parallel/algobase.h b/libstdc++-v3/include/parallel/algobase.h index a6fd6cd43310..20456b57b2f1 100644 --- a/libstdc++-v3/include/parallel/algobase.h +++ b/libstdc++-v3/include/parallel/algobase.h @@ -43,7 +43,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __parallel { @@ -54,14 +54,14 @@ namespace __parallel inline pair<_IIter1, _IIter2> mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2); } + { return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2); } // Sequential fallback template inline pair<_IIter1, _IIter2> mismatch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2, __pred); } + { return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2, __pred); } // Sequential fallback for input iterator case template __mismatch_switch(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _Predicate __pred, _IteratorTag1, _IteratorTag2) - { return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2, __pred); } + { return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2, __pred); } // Parallel mismatch for random access iterators template @@ -87,7 +87,7 @@ namespace __parallel return make_pair(__res , __begin2 + (__res - __begin1)); } else - return _GLIBCXX_STD_P::mismatch(__begin1, __end1, __begin2, __pred); + return _GLIBCXX_STD_A::mismatch(__begin1, __end1, __begin2, __pred); } // Public interface @@ -128,14 +128,14 @@ namespace __parallel inline bool equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::equal(__begin1, __end1, __begin2); } + { return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2); } // Sequential fallback template inline bool equal(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::equal(__begin1, __end1, __begin2, __pred); } + { return _GLIBCXX_STD_A::equal(__begin1, __end1, __begin2, __pred); } // Public interface template @@ -162,7 +162,7 @@ namespace __parallel lexicographical_compare(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::lexicographical_compare(__begin1, __end1, + { return _GLIBCXX_STD_A::lexicographical_compare(__begin1, __end1, __begin2, __end2); } // Sequential fallback @@ -171,7 +171,7 @@ namespace __parallel lexicographical_compare(_IIter1 __begin1, _IIter1 __end1, _IIter2 __begin2, _IIter2 __end2, _Predicate __pred, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::lexicographical_compare( + { return _GLIBCXX_STD_A::lexicographical_compare( __begin1, __end1, __begin2, __end2, __pred); } // Sequential fallback for input iterator case @@ -182,7 +182,7 @@ namespace __parallel _IIter2 __begin2, _IIter2 __end2, _Predicate __pred, _IteratorTag1, _IteratorTag2) - { return _GLIBCXX_STD_P::lexicographical_compare( + { return _GLIBCXX_STD_A::lexicographical_compare( __begin1, __end1, __begin2, __end2, __pred); } // Parallel lexicographical_compare for random access iterators @@ -232,7 +232,7 @@ namespace __parallel } } else - return _GLIBCXX_STD_P::lexicographical_compare( + return _GLIBCXX_STD_A::lexicographical_compare( __begin1, __end1, __begin2, __end2, __pred); } diff --git a/libstdc++-v3/include/parallel/algorithmfwd.h b/libstdc++-v3/include/parallel/algorithmfwd.h index f2749b89eb12..7d4a792cb590 100644 --- a/libstdc++-v3/include/parallel/algorithmfwd.h +++ b/libstdc++-v3/include/parallel/algorithmfwd.h @@ -34,7 +34,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __parallel { diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h index 3e3041d27dfe..86adea8161d8 100644 --- a/libstdc++-v3/include/parallel/base.h +++ b/libstdc++-v3/include/parallel/base.h @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011 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 @@ -45,7 +45,7 @@ * @namespace std::__parallel * @brief GNU parallel code, replaces standard behavior with parallel behavior. */ -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __parallel { } } @@ -68,7 +68,7 @@ namespace __gnu_sequential { // Import whatever is the serial version. #ifdef _GLIBCXX_PARALLEL - using namespace std::__norm; + using namespace std::_GLIBCXX_STD_A; #else using namespace std; #endif diff --git a/libstdc++-v3/include/parallel/numeric b/libstdc++-v3/include/parallel/numeric index b779aae8d6d1..64624a742bdc 100644 --- a/libstdc++-v3/include/parallel/numeric +++ b/libstdc++-v3/include/parallel/numeric @@ -46,7 +46,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __parallel { @@ -55,13 +55,13 @@ namespace __parallel inline _Tp accumulate(_IIter __begin, _IIter __end, _Tp __init, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::accumulate(__begin, __end, __init); } + { return _GLIBCXX_STD_A::accumulate(__begin, __end, __init); } template inline _Tp accumulate(_IIter __begin, _IIter __end, _Tp __init, _BinaryOperation __binary_op, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::accumulate(__begin, __end, __init, __binary_op); } + { return _GLIBCXX_STD_A::accumulate(__begin, __end, __init, __binary_op); } // Sequential fallback for input iterator case. template @@ -169,7 +169,7 @@ namespace __parallel inner_product(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _Tp __init, __gnu_parallel::sequential_tag) - { return _GLIBCXX_STD_P::inner_product( + { return _GLIBCXX_STD_A::inner_product( __first1, __last1, __first2, __init); } template #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __parallel { diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h index dbe01f55f9ed..ef17443b37e8 100644 --- a/libstdc++-v3/include/profile/base.h +++ b/libstdc++-v3/include/profile/base.h @@ -47,7 +47,7 @@ * @namespace std::__profile * @brief GNU profile code, replaces standard behavior with profile behavior. */ -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { } } diff --git a/libstdc++-v3/include/profile/bitset b/libstdc++-v3/include/profile/bitset index d7ecf81ff43e..a995afa9723c 100644 --- a/libstdc++-v3/include/profile/bitset +++ b/libstdc++-v3/include/profile/bitset @@ -31,16 +31,16 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { /// Class std::bitset wrapper with performance instrumentation. template class bitset - : public _GLIBCXX_STD_D::bitset<_Nb> + : public _GLIBCXX_STD_C::bitset<_Nb> { - typedef _GLIBCXX_STD_D::bitset<_Nb> _Base; + typedef _GLIBCXX_STD_C::bitset<_Nb> _Base; public: // bit reference: @@ -368,7 +368,7 @@ namespace __profile { size_t operator()(const __profile::bitset<_Nb>& __b) const - { return std::hash<_GLIBCXX_STD_D::bitset<_Nb>>()(__b._M_base()); } + { return std::hash<_GLIBCXX_STD_C::bitset<_Nb>>()(__b._M_base()); } }; #endif diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque index b404d972f8fc..1c0e53c723e9 100644 --- a/libstdc++-v3/include/profile/deque +++ b/libstdc++-v3/include/profile/deque @@ -31,16 +31,16 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { /// Class std::deque wrapper with performance instrumentation. template > class deque - : public _GLIBCXX_STD_D::deque<_Tp, _Allocator> + : public _GLIBCXX_STD_C::deque<_Tp, _Allocator> { - typedef _GLIBCXX_STD_D::deque<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::deque<_Tp, _Allocator> _Base; public: typedef typename _Base::reference reference; diff --git a/libstdc++-v3/include/profile/forward_list b/libstdc++-v3/include/profile/forward_list index 5ae5bd590fe1..00af855d782b 100644 --- a/libstdc++-v3/include/profile/forward_list +++ b/libstdc++-v3/include/profile/forward_list @@ -35,16 +35,16 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { /// Class std::forward_list wrapper with performance instrumentation. template > class forward_list - : public _GLIBCXX_STD_D::forward_list<_Tp, _Alloc> + : public _GLIBCXX_STD_C::forward_list<_Tp, _Alloc> { - typedef _GLIBCXX_STD_D::forward_list<_Tp, _Alloc> _Base; + typedef _GLIBCXX_STD_C::forward_list<_Tp, _Alloc> _Base; public: typedef typename _Base::size_type size_type; diff --git a/libstdc++-v3/include/profile/impl/profiler_node.h b/libstdc++-v3/include/profile/impl/profiler_node.h index 86f541f59d7b..c32b94e23191 100644 --- a/libstdc++-v3/include/profile/impl/profiler_node.h +++ b/libstdc++-v3/include/profile/impl/profiler_node.h @@ -48,7 +48,7 @@ namespace __gnu_profile { typedef const void* __object_t; typedef void* __instruction_address_t; - typedef std::_GLIBCXX_STD_PR::vector<__instruction_address_t> __stack_npt; + typedef std::_GLIBCXX_STD_C::vector<__instruction_address_t> __stack_npt; typedef __stack_npt* __stack_t; std::size_t __stack_max_depth(); diff --git a/libstdc++-v3/include/profile/impl/profiler_trace.h b/libstdc++-v3/include/profile/impl/profiler_trace.h index 1dfdd013b081..1e0054208ca5 100644 --- a/libstdc++-v3/include/profile/impl/profiler_trace.h +++ b/libstdc++-v3/include/profile/impl/profiler_trace.h @@ -42,7 +42,7 @@ #include // atof, atoi, strtol, getenv, atexit, abort #ifdef __GXX_EXPERIMENTAL_CXX0X__ -#define _GLIBCXX_IMPL_UNORDERED_MAP std::_GLIBCXX_STD_PR::unordered_map +#define _GLIBCXX_IMPL_UNORDERED_MAP std::_GLIBCXX_STD_C::unordered_map #include #else #include @@ -97,7 +97,7 @@ namespace __gnu_profile { return __magnitude < __other.__magnitude; } }; - typedef std::_GLIBCXX_STD_PR::vector<__warning_data> __warning_vector_t; + typedef std::_GLIBCXX_STD_C::vector<__warning_data> __warning_vector_t; // Defined in profiler_.h. class __trace_hash_func; @@ -128,7 +128,7 @@ namespace __gnu_profile float __value; }; - typedef std::_GLIBCXX_STD_PR::vector<__cost_factor*> __cost_factor_vector; + typedef std::_GLIBCXX_STD_C::vector<__cost_factor*> __cost_factor_vector; _GLIBCXX_PROFILE_DEFINE_DATA(__trace_hash_func*, _S_hash_func, 0); _GLIBCXX_PROFILE_DEFINE_DATA(__trace_hashtable_size*, _S_hashtable_size, 0); diff --git a/libstdc++-v3/include/profile/iterator_tracker.h b/libstdc++-v3/include/profile/iterator_tracker.h index faad9e572797..733429daad3d 100644 --- a/libstdc++-v3/include/profile/iterator_tracker.h +++ b/libstdc++-v3/include/profile/iterator_tracker.h @@ -31,7 +31,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list index 564fc8c16f12..21279d2ccb1d 100644 --- a/libstdc++-v3/include/profile/list +++ b/libstdc++-v3/include/profile/list @@ -33,16 +33,16 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { /** @brief List wrapper with performance instrumentation. */ template > class list - : public _GLIBCXX_STD_D::list<_Tp, _Allocator> + : public _GLIBCXX_STD_C::list<_Tp, _Allocator> { - typedef _GLIBCXX_STD_D::list<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::list<_Tp, _Allocator> _Base; public: typedef typename _Base::reference reference; diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 555f43863498..d66d2be5d778 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -37,7 +37,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { @@ -45,9 +45,9 @@ namespace __profile template, typename _Allocator = std::allocator > > class map - : public _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator> + : public _GLIBCXX_STD_C::map<_Key, _Tp, _Compare, _Allocator> { - typedef _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::map<_Key, _Tp, _Compare, _Allocator> _Base; public: // types: diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h index 7f1db940b89a..e4c839f54ade 100644 --- a/libstdc++-v3/include/profile/multimap.h +++ b/libstdc++-v3/include/profile/multimap.h @@ -31,7 +31,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { @@ -39,9 +39,9 @@ namespace __profile template, typename _Allocator = std::allocator > > class multimap - : public _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator> + : public _GLIBCXX_STD_C::multimap<_Key, _Tp, _Compare, _Allocator> { - typedef _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::multimap<_Key, _Tp, _Compare, _Allocator> _Base; public: // types: diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h index ff95f881addc..c6902a0fed48 100644 --- a/libstdc++-v3/include/profile/multiset.h +++ b/libstdc++-v3/include/profile/multiset.h @@ -31,7 +31,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { @@ -39,9 +39,9 @@ namespace __profile template, typename _Allocator = std::allocator<_Key> > class multiset - : public _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator> + : public _GLIBCXX_STD_C::multiset<_Key, _Compare, _Allocator> { - typedef _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::multiset<_Key, _Compare, _Allocator> _Base; public: // types: diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h index 96b7be42ba54..d10a11f2e596 100644 --- a/libstdc++-v3/include/profile/set.h +++ b/libstdc++-v3/include/profile/set.h @@ -31,7 +31,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { @@ -39,9 +39,9 @@ namespace __profile template, typename _Allocator = std::allocator<_Key> > class set - : public _GLIBCXX_STD_D::set<_Key,_Compare,_Allocator> + : public _GLIBCXX_STD_C::set<_Key,_Compare,_Allocator> { - typedef _GLIBCXX_STD_D::set<_Key, _Compare, _Allocator> _Base; + typedef _GLIBCXX_STD_C::set<_Key, _Compare, _Allocator> _Base; public: // types: diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 6d6a8b7e58ed..cc54009e3f48 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -42,9 +42,9 @@ #include #define _GLIBCXX_BASE unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> -#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE +#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { @@ -320,7 +320,7 @@ namespace __profile #undef _GLIBCXX_BASE #undef _GLIBCXX_STD_BASE #define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> -#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE +#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE /// Class std::unordered_multimap wrapper with performance instrumentation. template #define _GLIBCXX_BASE unordered_set<_Key, _Hash, _Pred, _Alloc> -#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE +#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { @@ -291,7 +291,7 @@ namespace __profile #undef _GLIBCXX_BASE #undef _GLIBCXX_STD_BASE -#define _GLIBCXX_STD_BASE _GLIBCXX_STD_PR::_GLIBCXX_BASE +#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE #define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc> /** @brief Unordered_multiset wrapper with performance instrumentation. */ diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index cd04b5155996..f8a9622e8ba1 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -39,16 +39,16 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace __profile { template > class vector - : public _GLIBCXX_STD_PR::vector<_Tp, _Allocator> + : public _GLIBCXX_STD_C::vector<_Tp, _Allocator> { - typedef _GLIBCXX_STD_PR::vector<_Tp, _Allocator> _Base; + typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator> _Base; public: typedef typename _Base::reference reference; @@ -509,7 +509,7 @@ namespace __profile { size_t operator()(const __profile::vector& __b) const - { return std::hash<_GLIBCXX_STD_D::vector>() + { return std::hash<_GLIBCXX_STD_C::vector>() (__b._M_base()); } }; #endif diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array index 3cad7e8f5add..a0bdd24a85a0 100644 --- a/libstdc++-v3/include/std/array +++ b/libstdc++-v3/include/std/array @@ -38,7 +38,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A standard container for storing a fixed size sequence of elements. @@ -264,7 +266,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) get(const array<_Tp, _Nm>& __arr) { return __arr[_Int]; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index 71cd4445e118..aafa28243e15 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -42,7 +42,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup atomics @@ -1347,6 +1349,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group atomics -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index 29b06d52e721..e0e8f1340f41 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -57,7 +57,9 @@ ((__n) / _GLIBCXX_BITSET_BITS_PER_WORD + \ ((__n) % _GLIBCXX_BITSET_BITS_PER_WORD == 0 ? 0 : 1)) -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * Base class, general case. It is a class invariant that _Nw will be @@ -1502,7 +1504,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } //@} -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_CONTAINER +} // namespace std #undef _GLIBCXX_BITSET_WORDS #undef _GLIBCXX_BITSET_BITS_PER_WORD @@ -1511,16 +1514,18 @@ _GLIBCXX_END_NESTED_NAMESPACE #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1182. /// std::hash specialization for bitset. template - struct hash<_GLIBCXX_STD_D::bitset<_Nb>> - : public __hash_base> + struct hash<_GLIBCXX_STD_C::bitset<_Nb>> + : public __hash_base> { size_t - operator()(const _GLIBCXX_STD_D::bitset<_Nb>& __b) const + operator()(const _GLIBCXX_STD_C::bitset<_Nb>& __b) const { const size_t __clength = (_Nb + __CHAR_BIT__ - 1) / __CHAR_BIT__; return std::_Hash_impl::hash(__b._M_getdata(), __clength); @@ -1528,15 +1533,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; template<> - struct hash<_GLIBCXX_STD_D::bitset<0>> - : public __hash_base> + struct hash<_GLIBCXX_STD_C::bitset<0>> + : public __hash_base> { size_t - operator()(const _GLIBCXX_STD_D::bitset<0>&) const + operator()(const _GLIBCXX_STD_C::bitset<0>&) const { return 0; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index b93671f3855c..89ded2c80d42 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -42,8 +42,8 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ /** * @defgroup chrono Time * @ingroup utilities @@ -57,13 +57,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) */ namespace chrono { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + template> struct duration; template struct time_point; + + _GLIBCXX_END_NAMESPACE_VERSION } +_GLIBCXX_BEGIN_NAMESPACE_VERSION // 20.8.2.3 specialization of common_type (for duration) template struct common_type, @@ -91,9 +96,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) public: typedef chrono::time_point<_Clock, __ct> type; }; +_GLIBCXX_END_NAMESPACE_VERSION namespace chrono { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + // Primary template for duration_cast impl. template @@ -212,7 +220,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template struct duration { - typedef _Rep rep; + typedef _Rep rep; typedef _Period period; static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); @@ -649,7 +657,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #elif defined(_GLIBCXX_USE_GETTIMEOFDAY) typedef chrono::microseconds duration; #else - typedef chrono::seconds duration; + typedef chrono::seconds duration; #endif typedef duration::rep rep; @@ -687,8 +695,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) struct monotonic_clock { typedef chrono::nanoseconds duration; - typedef duration::rep rep; - typedef duration::period period; + typedef duration::rep rep; + typedef duration::period period; typedef chrono::time_point time_point; static constexpr bool is_monotonic = true; @@ -701,10 +709,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif typedef system_clock high_resolution_clock; + + _GLIBCXX_END_NAMESPACE_VERSION } // namespace chrono // @} group chrono -_GLIBCXX_END_NAMESPACE +} // namespace #endif //_GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 4bd8e8c42e14..d36eddca5a6d 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -46,7 +46,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup complex_numbers Complex Numbers @@ -1494,9 +1496,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group complex_numbers -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // See ext/type_traits.h for the primary template. template @@ -1520,11 +1525,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) typedef std::complex::__type> __type; }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #ifdef __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Forward declarations. template std::complex<_Tp> acos(const std::complex<_Tp>&); @@ -1890,7 +1898,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) conj(_Tp __x) { return __x; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index 6b46fe71d8fe..a0a3c08794a1 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -40,7 +40,9 @@ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup condition_variables Condition Variables @@ -254,7 +256,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; // @} group condition_variables -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream index 64623f5ba96c..8ad6e5ca11a3 100644 --- a/libstdc++-v3/include/std/fstream +++ b/libstdc++-v3/include/std/fstream @@ -46,7 +46,9 @@ #include // For std::string overloads. #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [27.8.1.1] template class basic_filebuf /** @@ -913,7 +915,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index a781dbee28f8..3ae955023416 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1,7 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +// 2011 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 @@ -58,7 +58,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_HAS_NESTED_TYPE(result_type) @@ -835,6 +837,8 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) /// The type of placeholder objects defined by libstdc++. template struct _Placeholder { }; + _GLIBCXX_END_NAMESPACE_VERSION + /** @namespace std::placeholders * @brief ISO C++ 0x entities sub namespace for functional. * @ingroup binders @@ -845,6 +849,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) */ namespace placeholders { + _GLIBCXX_BEGIN_NAMESPACE_VERSION extern const _Placeholder<1> _1; extern const _Placeholder<2> _2; extern const _Placeholder<3> _3; @@ -874,8 +879,11 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) extern const _Placeholder<27> _27; extern const _Placeholder<28> _28; extern const _Placeholder<29> _29; + _GLIBCXX_END_NAMESPACE_VERSION } + _GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * Partial specialization of is_placeholder that provides the placeholder * number for the placeholder objects defined by libstdc++. @@ -2242,7 +2250,8 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) { __x.swap(__y); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index 7b22b783867e..f268d4ab06a9 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -45,7 +45,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup futures Futures @@ -1375,7 +1377,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // && _GLIBCXX_ATOMIC_BUILTINS_4 // @} group futures -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/iomanip b/libstdc++-v3/include/std/iomanip index 8fc2e72fd7a7..91f90e5cb62b 100644 --- a/libstdc++-v3/include/std/iomanip +++ b/libstdc++-v3/include/std/iomanip @@ -45,7 +45,9 @@ #include #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [27.6.3] standard manipulators // Also see DR 183. @@ -344,6 +346,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GLIBCXX_IOMANIP */ diff --git a/libstdc++-v3/include/std/iosfwd b/libstdc++-v3/include/std/iosfwd index 4cbd8359b2aa..8906a1d34b59 100644 --- a/libstdc++-v3/include/std/iosfwd +++ b/libstdc++-v3/include/std/iosfwd @@ -41,7 +41,9 @@ #include // For string forward declarations. #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup io I/O @@ -204,6 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif /** @} */ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GLIBCXX_IOSFWD */ diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream index 6a991caee007..7c71ba493583 100644 --- a/libstdc++-v3/include/std/iostream +++ b/libstdc++-v3/include/std/iostream @@ -40,7 +40,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @name Standard Stream Objects @@ -72,6 +74,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // For construction of filebuffers for cout, cin, cerr, clog et. al. static ios_base::Init __ioinit; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GLIBCXX_IOSTREAM */ diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream index 7b6d1520bf21..ded483349b18 100644 --- a/libstdc++-v3/include/std/istream +++ b/libstdc++-v3/include/std/istream @@ -40,7 +40,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [27.6.1.1] Template class basic_istream /** @@ -848,7 +850,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return (__is >> __x); } #endif // __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits index 77190060bb7c..9a311973c4a1 100644 --- a/libstdc++-v3/include/std/limits +++ b/libstdc++-v3/include/std/limits @@ -145,7 +145,9 @@ #define __glibcxx_max_digits10(T) \ (2 + (T) * 643L / 2136) -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Describes the rounding style for floating-point types. @@ -1617,7 +1619,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #undef __glibcxx_long_double_traps #undef __glibcxx_long_double_tinyness_before -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #undef __glibcxx_signed #undef __glibcxx_min diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index e8f64a446458..36f894efebb4 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -48,7 +48,9 @@ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup mutexes Mutexes @@ -818,7 +820,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } // @} group mutexes -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index b25bdb0f5bc4..3004d4b69c87 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -40,7 +40,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [27.6.2.1] Template class basic_ostream /** @@ -580,7 +582,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return (__os << __x); } #endif // __GXX_EXPERIMENTAL_CXX0X__ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/std/ratio b/libstdc++-v3/include/std/ratio index 2eefdb705da1..69c0b6e14bbc 100644 --- a/libstdc++-v3/include/std/ratio +++ b/libstdc++-v3/include/std/ratio @@ -40,7 +40,9 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup ratio Rational Arithmetic @@ -339,7 +341,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) typedef ratio< 1000000000000000000, 1> exa; // @} group ratio -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif //_GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream index c30a5b74b16d..6dd0a3d8f56e 100644 --- a/libstdc++-v3/include/std/sstream +++ b/libstdc++-v3/include/std/sstream @@ -39,7 +39,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [27.7.1] template class basic_stringbuf /** @@ -567,7 +569,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { _M_stringbuf.str(__s); } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept index 62c5578619d3..de023d12bb84 100644 --- a/libstdc++-v3/include/std/stdexcept +++ b/libstdc++-v3/include/std/stdexcept @@ -39,7 +39,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup exceptions @@ -146,6 +148,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group exceptions -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GLIBCXX_STDEXCEPT */ diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf index 9b05e04af210..51d89ce9a893 100644 --- a/libstdc++-v3/include/std/streambuf +++ b/libstdc++-v3/include/std/streambuf @@ -43,7 +43,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template streamsize @@ -793,7 +795,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) basic_streambuf* __sbout, bool& __ineof); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error index 73aaa79dc7b8..187c03f01d13 100644 --- a/libstdc++-v3/include/std/system_error +++ b/libstdc++-v3/include/std/system_error @@ -40,7 +40,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION class error_code; class error_condition; @@ -341,13 +343,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) code() const throw() { return _M_code; } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #ifndef _GLIBCXX_COMPATIBILITY_CXX0X #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1182. /// std::hash specialization for error_code. @@ -363,7 +368,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _GLIBCXX_COMPATIBILITY_CXX0X diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread index 8a626feb73f8..de58e8141001 100644 --- a/libstdc++-v3/include/std/thread +++ b/libstdc++-v3/include/std/thread @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -46,7 +46,9 @@ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup threads Threads @@ -236,12 +238,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __out << __id._M_thread; } +_GLIBCXX_END_NAMESPACE_VERSION + /** @namespace std::this_thread * @brief ISO C++ 0x entities sub namespace for thread. * 30.2.2 Namespace this_thread. */ namespace this_thread { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + /// get_id inline thread::id get_id() { return thread::id(__gthread_self()); } @@ -280,10 +286,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ::nanosleep(&__ts, 0); } #endif + + _GLIBCXX_END_NAMESPACE_VERSION } // @} group threads -_GLIBCXX_END_NAMESPACE + +} // namespace #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 87dbcb78df6b..69513283f93f 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -37,7 +37,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Adds a const reference to a non-reference type. template @@ -797,7 +799,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const _Index_tuple<_Indexes...>&) { return _Tp(std::forward<_Args>(get<_Indexes>(__tuple))...); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 8f5b5c993e27..f5d867b6bfb1 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -37,7 +37,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup metaprogramming @@ -1181,7 +1183,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #undef _DEFINE_SPEC // @} group metaprogramming -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/typeindex b/libstdc++-v3/include/std/typeindex index d40306421d41..79b3eadf7a1e 100644 --- a/libstdc++-v3/include/std/typeindex +++ b/libstdc++-v3/include/std/typeindex @@ -37,7 +37,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** @brief The class type_index provides a simple wrapper for type_info @@ -99,7 +101,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __ti.hash_code(); } }; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index e54a5868c907..245c41fa75dd 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -74,7 +74,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class tuple_size; @@ -136,7 +138,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) get(const std::pair<_Tp1, _Tp2>& __in) { return __pair_get<_Int>::__const_get(__in); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index 40e78e769143..9c18e0503107 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -41,7 +41,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class _Expr; @@ -81,12 +83,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template class mask_array; // masked array template class indirect_array; // indirected array -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup numeric_arrays Numeric Arrays @@ -556,7 +561,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #include #include @@ -565,7 +571,9 @@ _GLIBCXX_END_NAMESPACE #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup numeric_arrays @@ -1151,6 +1159,7 @@ _DEFINE_BINARY_OPERATOR(>=, __greater_equal) // @} group numeric_arrays -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif /* _GLIBCXX_VALARRAY */ diff --git a/libstdc++-v3/include/tr1/array b/libstdc++-v3/include/tr1/array index 3a1ff4caa8c7..058fcfad60e7 100644 --- a/libstdc++-v3/include/tr1/array +++ b/libstdc++-v3/include/tr1/array @@ -34,10 +34,12 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @brief A standard container for storing a fixed size sequence of elements. * @@ -242,6 +244,8 @@ namespace tr1 inline const _Tp& get(const array<_Tp, _Nm>& __arr) { return __arr[_Int]; } + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/bessel_function.tcc b/libstdc++-v3/include/tr1/bessel_function.tcc index 4fb0b89cd410..b525ebc104b7 100644 --- a/libstdc++-v3/include/tr1/bessel_function.tcc +++ b/libstdc++-v3/include/tr1/bessel_function.tcc @@ -49,16 +49,16 @@ #include "special_function_util.h" -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Compute the gamma functions required by the Temme series @@ -525,8 +525,8 @@ namespace tr1 * @param __x The argument of the spherical Bessel function. * @param __j_n The output spherical Bessel function. * @param __n_n The output spherical Neumann function. - * @param __jp_n The output derivative of the spherical Bessel function. - * @param __np_n The output derivative of the spherical Neumann function. + * @param __jp_n The output derivative of the spherical Bessel function. + * @param __np_n The output derivative of the spherical Neumann function. */ template void @@ -620,6 +620,7 @@ namespace tr1 } } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/beta_function.tcc b/libstdc++-v3/include/tr1/beta_function.tcc index e387d23f3e6f..219f3cbd4d2d 100644 --- a/libstdc++-v3/include/tr1/beta_function.tcc +++ b/libstdc++-v3/include/tr1/beta_function.tcc @@ -47,16 +47,16 @@ #ifndef _GLIBCXX_TR1_BETA_FUNCTION_TCC #define _GLIBCXX_TR1_BETA_FUNCTION_TCC 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Return the beta function: \f$B(x,y)\f$. @@ -190,6 +190,7 @@ namespace tr1 return __beta_lgamma(__x, __y); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/cctype b/libstdc++-v3/include/tr1/cctype index ca9d18b669b7..0cec3d9f4553 100644 --- a/libstdc++-v3/include/tr1/cctype +++ b/libstdc++-v3/include/tr1/cctype @@ -36,7 +36,7 @@ #undef isblank -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cfenv b/libstdc++-v3/include/tr1/cfenv index 14db2ca3f75f..980a06c38a27 100644 --- a/libstdc++-v3/include/tr1/cfenv +++ b/libstdc++-v3/include/tr1/cfenv @@ -51,7 +51,7 @@ #undef fesetenv #undef feupdateenv -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cinttypes b/libstdc++-v3/include/tr1/cinttypes index e0cd1718e6de..f1ca292790f6 100644 --- a/libstdc++-v3/include/tr1/cinttypes +++ b/libstdc++-v3/include/tr1/cinttypes @@ -48,7 +48,7 @@ #ifdef _GLIBCXX_USE_C99_INTTYPES_TR1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cmath b/libstdc++-v3/include/tr1/cmath index 36c9a733a6d7..3cf1a106b0f0 100644 --- a/libstdc++-v3/include/tr1/cmath +++ b/libstdc++-v3/include/tr1/cmath @@ -143,10 +143,12 @@ #endif -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + #if _GLIBCXX_USE_C99_MATH_TR1 // types @@ -997,13 +999,16 @@ namespace tr1 } #endif +_GLIBCXX_END_NAMESPACE_VERSION } } -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // DR 550. What should the return type of pow(float,int) be? // NB: C++0x and TR1 != C++03. inline double @@ -1025,6 +1030,8 @@ namespace tr1 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return std::pow(__type(__x), __type(__y)); } + +_GLIBCXX_END_NAMESPACE_VERSION } } @@ -1044,10 +1051,12 @@ namespace tr1 #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @defgroup tr1_math_spec_func Mathematical Special Functions * @ingroup numerics @@ -1450,6 +1459,7 @@ namespace tr1 } /* @} */ // tr1_math_spec_func +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/complex b/libstdc++-v3/include/tr1/complex index 8cec0b11d8e0..908b522e60a1 100644 --- a/libstdc++-v3/include/tr1/complex +++ b/libstdc++-v3/include/tr1/complex @@ -33,10 +33,12 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @addtogroup complex_numbers * @{ @@ -401,6 +403,8 @@ namespace tr1 { return std::pow(__x, __y); } // @} group complex_numbers + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/cstdint b/libstdc++-v3/include/tr1/cstdint index d9675267055e..55ce4bcefd03 100644 --- a/libstdc++-v3/include/tr1/cstdint +++ b/libstdc++-v3/include/tr1/cstdint @@ -56,7 +56,7 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cstdio b/libstdc++-v3/include/tr1/cstdio index e7963ae425ca..415e8a4d67ff 100644 --- a/libstdc++-v3/include/tr1/cstdio +++ b/libstdc++-v3/include/tr1/cstdio @@ -35,7 +35,7 @@ #if _GLIBCXX_USE_C99 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cstdlib b/libstdc++-v3/include/tr1/cstdlib index a4b8eb1c0d68..6e3e16d0fa40 100644 --- a/libstdc++-v3/include/tr1/cstdlib +++ b/libstdc++-v3/include/tr1/cstdlib @@ -37,7 +37,7 @@ #if _GLIBCXX_USE_C99 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cwchar b/libstdc++-v3/include/tr1/cwchar index c14111b0cf67..8bf775be196c 100644 --- a/libstdc++-v3/include/tr1/cwchar +++ b/libstdc++-v3/include/tr1/cwchar @@ -35,7 +35,7 @@ #ifdef _GLIBCXX_USE_WCHAR_T -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/cwctype b/libstdc++-v3/include/tr1/cwctype index f9de1bea684d..452a7b456310 100644 --- a/libstdc++-v3/include/tr1/cwctype +++ b/libstdc++-v3/include/tr1/cwctype @@ -35,7 +35,7 @@ #ifdef _GLIBCXX_USE_WCHAR_T -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/include/tr1/ell_integral.tcc b/libstdc++-v3/include/tr1/ell_integral.tcc index c6b48d6a7f67..4dfe6169c64b 100644 --- a/libstdc++-v3/include/tr1/ell_integral.tcc +++ b/libstdc++-v3/include/tr1/ell_integral.tcc @@ -43,16 +43,16 @@ #ifndef _GLIBCXX_TR1_ELL_INTEGRAL_TCC #define _GLIBCXX_TR1_ELL_INTEGRAL_TCC 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Return the Carlson elliptic function @f$ R_F(x,y,z) @f$ @@ -742,6 +742,7 @@ namespace tr1 } } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/exp_integral.tcc b/libstdc++-v3/include/tr1/exp_integral.tcc index e4f2847119bd..cf3bd63536ba 100644 --- a/libstdc++-v3/include/tr1/exp_integral.tcc +++ b/libstdc++-v3/include/tr1/exp_integral.tcc @@ -48,16 +48,16 @@ #include "special_function_util.h" -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Return the exponential integral @f$ E_1(x) @f$ @@ -517,6 +517,7 @@ namespace tr1 return __expint_Ei(__x); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional index 869150fd4c30..31e72d63ab56 100644 --- a/libstdc++-v3/include/tr1/functional +++ b/libstdc++-v3/include/tr1/functional @@ -1,6 +1,6 @@ // TR1 functional header -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -44,10 +44,12 @@ #include #include // for std::__addressof -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template class _Mem_fn; @@ -840,6 +842,8 @@ namespace tr1 /// The type of placeholder objects defined by libstdc++. template struct _Placeholder { }; +_GLIBCXX_END_NAMESPACE_VERSION + /** @namespace std::placeholders * @brief ISO C++ 0x entities sub namespace for functional. * @@ -849,6 +853,7 @@ namespace tr1 */ namespace placeholders { + _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace { _Placeholder<1> _1; @@ -881,8 +886,10 @@ namespace tr1 _Placeholder<28> _28; _Placeholder<29> _29; } + _GLIBCXX_END_NAMESPACE_VERSION } +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * Partial specialization of is_placeholder that provides the placeholder * number for the placeholder objects defined by libstdc++. @@ -2134,6 +2141,8 @@ namespace tr1 inline void swap(function<_Signature>& __x, function<_Signature>& __y) { __x.swap(__y); } + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/functional_hash.h b/libstdc++-v3/include/tr1/functional_hash.h index e555acea4d3a..1742e1527886 100644 --- a/libstdc++-v3/include/tr1/functional_hash.h +++ b/libstdc++-v3/include/tr1/functional_hash.h @@ -32,10 +32,12 @@ #pragma GCC system_header -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /// Class template hash. // Declaration of default hash functor std::tr1::hash. The types for // which std::tr1::hash is well-defined is in clause 6.3.3. of the PDTR. @@ -186,6 +188,8 @@ namespace tr1 _GLIBCXX_PURE size_t hash::operator()(const wstring&) const; #endif + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/gamma.tcc b/libstdc++-v3/include/tr1/gamma.tcc index 6ded87b625ea..a7c399cd4454 100644 --- a/libstdc++-v3/include/tr1/gamma.tcc +++ b/libstdc++-v3/include/tr1/gamma.tcc @@ -49,13 +49,14 @@ #include "special_function_util.h" -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief This returns Bernoulli numbers from a table or by summation @@ -463,6 +464,7 @@ namespace tr1 } } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/hashtable.h b/libstdc++-v3/include/tr1/hashtable.h index 2dedc5cd16d3..5d1e02c2592e 100644 --- a/libstdc++-v3/include/tr1/hashtable.h +++ b/libstdc++-v3/include/tr1/hashtable.h @@ -1,6 +1,6 @@ // TR1 hashtable.h header -*- C++ -*- -// Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2009, 2010, 2011 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 @@ -35,10 +35,12 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Class template _Hashtable, class definition. // Meaning of class template _Hashtable's template parameters @@ -1171,7 +1173,9 @@ namespace tr1 __throw_exception_again; } } -} -} + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace tr1 +} // namespace std #endif // _GLIBCXX_TR1_HASHTABLE_H diff --git a/libstdc++-v3/include/tr1/hashtable_policy.h b/libstdc++-v3/include/tr1/hashtable_policy.h index 967fb3c33773..82f8fde18411 100644 --- a/libstdc++-v3/include/tr1/hashtable_policy.h +++ b/libstdc++-v3/include/tr1/hashtable_policy.h @@ -1,6 +1,6 @@ // Internal policy header for TR1 unordered_set and unordered_map -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -28,12 +28,14 @@ * @headername{tr1/unordered_map, tr1/unordered_set} */ -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { namespace __detail { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Helper function: return distance(first, last) for forward // iterators, or 0 for input iterators. template @@ -775,6 +777,7 @@ namespace __detail _H1 _M_h1; _H2 _M_h2; }; +_GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail } } diff --git a/libstdc++-v3/include/tr1/hypergeometric.tcc b/libstdc++-v3/include/tr1/hypergeometric.tcc index bf6a0fdededc..b98b5b29c741 100644 --- a/libstdc++-v3/include/tr1/hypergeometric.tcc +++ b/libstdc++-v3/include/tr1/hypergeometric.tcc @@ -42,16 +42,16 @@ #ifndef _GLIBCXX_TR1_HYPERGEOMETRIC_TCC #define _GLIBCXX_TR1_HYPERGEOMETRIC_TCC 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief This routine returns the confluent hypergeometric function @@ -771,6 +771,7 @@ namespace tr1 return __hyperg_luke(__a, __b, __c, __x); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/legendre_function.tcc b/libstdc++-v3/include/tr1/legendre_function.tcc index 7fed0ac28720..db41d4e0ac56 100644 --- a/libstdc++-v3/include/tr1/legendre_function.tcc +++ b/libstdc++-v3/include/tr1/legendre_function.tcc @@ -47,16 +47,16 @@ #include "special_function_util.h" -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Return the Legendre polynomial by recursion on order @@ -298,6 +298,7 @@ namespace tr1 } } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/modified_bessel_func.tcc b/libstdc++-v3/include/tr1/modified_bessel_func.tcc index 74e933fbd91b..ec134d5763e7 100644 --- a/libstdc++-v3/include/tr1/modified_bessel_func.tcc +++ b/libstdc++-v3/include/tr1/modified_bessel_func.tcc @@ -49,16 +49,16 @@ #include "special_function_util.h" -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Compute the modified Bessel functions @f$ I_\nu(x) @f$ and @@ -429,6 +429,7 @@ namespace tr1 return; } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/poly_hermite.tcc b/libstdc++-v3/include/tr1/poly_hermite.tcc index c8eefcdde0cd..e86b3777c746 100644 --- a/libstdc++-v3/include/tr1/poly_hermite.tcc +++ b/libstdc++-v3/include/tr1/poly_hermite.tcc @@ -40,16 +40,16 @@ #ifndef _GLIBCXX_TR1_POLY_HERMITE_TCC #define _GLIBCXX_TR1_POLY_HERMITE_TCC 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief This routine returns the Hermite polynomial @@ -117,6 +117,7 @@ namespace tr1 return __poly_hermite_recursion(__n, __x); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/poly_laguerre.tcc b/libstdc++-v3/include/tr1/poly_laguerre.tcc index fbbab58fb095..769923d34dc5 100644 --- a/libstdc++-v3/include/tr1/poly_laguerre.tcc +++ b/libstdc++-v3/include/tr1/poly_laguerre.tcc @@ -42,17 +42,16 @@ #ifndef _GLIBCXX_TR1_POLY_LAGUERRE_TCC #define _GLIBCXX_TR1_POLY_LAGUERRE_TCC 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { - + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief This routine returns the associated Laguerre polynomial @@ -322,6 +321,7 @@ namespace tr1 return __poly_laguerre(__n, 0, __x); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/random.h b/libstdc++-v3/include/tr1/random.h index 1b491b0461a0..ace37929a0cc 100644 --- a/libstdc++-v3/include/tr1/random.h +++ b/libstdc++-v3/include/tr1/random.h @@ -33,7 +33,7 @@ #pragma GCC system_header -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { @@ -50,6 +50,8 @@ namespace tr1 */ namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + template::digits> struct _Shift @@ -210,8 +212,12 @@ namespace tr1 private: _Engine* _M_g; }; + + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * Produces random numbers on a given distribution function using a * non-uniform random number generation engine. @@ -2404,6 +2410,7 @@ namespace tr1 /* @} */ // group tr1_random_distributions_continuous /* @} */ // group tr1_random_distributions /* @} */ // group tr1_random +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/random.tcc b/libstdc++-v3/include/tr1/random.tcc index d53737774d82..3d8c4fe1c109 100644 --- a/libstdc++-v3/include/tr1/random.tcc +++ b/libstdc++-v3/include/tr1/random.tcc @@ -31,7 +31,7 @@ #ifndef _GLIBCXX_TR1_RANDOM_TCC #define _GLIBCXX_TR1_RANDOM_TCC 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { @@ -40,6 +40,8 @@ namespace tr1 */ namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION + // General case for x = (ax + c) mod m -- use Schrage's algorithm to avoid // integer overflow. // @@ -90,8 +92,10 @@ namespace tr1 __calc(_Tp __x) { return __a * __x + __c; } }; + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail +_GLIBCXX_BEGIN_NAMESPACE_VERSION template const _UIntType @@ -1709,6 +1713,8 @@ namespace tr1 __os.precision(__precision); return __os; } + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/regex b/libstdc++-v3/include/tr1/regex index cc5ef05f74fe..714a06d3381c 100644 --- a/libstdc++-v3/include/tr1/regex +++ b/libstdc++-v3/include/tr1/regex @@ -43,7 +43,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { @@ -58,6 +58,8 @@ namespace tr1 */ namespace regex_constants { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @name 5.1 Regular Expression Syntax Options */ @@ -395,8 +397,10 @@ namespace regex_constants static const error_type error_stack(_S_error_stack); //@} +_GLIBCXX_END_NAMESPACE_VERSION } +_GLIBCXX_BEGIN_NAMESPACE_VERSION // [7.8] Class regex_error /** @@ -1992,10 +1996,10 @@ namespace regex_constants /** * @name 10.4 Formatting * - * These functions perform formatted substitution of the matched character - * sequences into their target. The format specifiers and escape sequences - * accepted by these functions are determined by their @p flags parameter - * as documented above. + * These functions perform formatted substitution of the matched + * character sequences into their target. The format specifiers + * and escape sequences accepted by these functions are + * determined by their @p flags parameter as documented above. */ //@{ @@ -2718,6 +2722,8 @@ namespace regex_constants #endif //@} + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/riemann_zeta.tcc b/libstdc++-v3/include/tr1/riemann_zeta.tcc index 472025e96c80..18fe20ed82a8 100644 --- a/libstdc++-v3/include/tr1/riemann_zeta.tcc +++ b/libstdc++-v3/include/tr1/riemann_zeta.tcc @@ -45,16 +45,16 @@ #include "special_function_util.h" -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // [5.2] Special functions // Implementation-space details. namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Compute the Riemann zeta function @f$ \zeta(s) @f$ @@ -428,6 +428,7 @@ namespace tr1 return __hurwitz_zeta_glob(__a, __s); } + _GLIBCXX_END_NAMESPACE_VERSION } // namespace std::tr1::__detail } } diff --git a/libstdc++-v3/include/tr1/shared_ptr.h b/libstdc++-v3/include/tr1/shared_ptr.h index a942fcd99ed3..13b03842e5c2 100644 --- a/libstdc++-v3/include/tr1/shared_ptr.h +++ b/libstdc++-v3/include/tr1/shared_ptr.h @@ -49,10 +49,12 @@ #ifndef _TR1_SHARED_PTR_H #define _TR1_SHARED_PTR_H 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @brief Exception possibly thrown by @c shared_ptr. * @ingroup exceptions @@ -1169,6 +1171,8 @@ namespace tr1 mutable weak_ptr<_Tp> _M_weak_this; }; + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/special_function_util.h b/libstdc++-v3/include/tr1/special_function_util.h index a9626ea2be7a..c90fc599f1a4 100644 --- a/libstdc++-v3/include/tr1/special_function_util.h +++ b/libstdc++-v3/include/tr1/special_function_util.h @@ -37,13 +37,13 @@ #ifndef _GLIBCXX_TR1_SPECIAL_FUNCTION_UTIL_H #define _GLIBCXX_TR1_SPECIAL_FUNCTION_UTIL_H 1 -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION /// A class to encapsulate type dependent floating point /// constants. Not everything will be able to be expressed as @@ -135,8 +135,8 @@ namespace tr1 #endif + _GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail - } } diff --git a/libstdc++-v3/include/tr1/tuple b/libstdc++-v3/include/tr1/tuple index ff9f22061430..15ac642a19fe 100644 --- a/libstdc++-v3/include/tr1/tuple +++ b/libstdc++-v3/include/tr1/tuple @@ -36,10 +36,12 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Adds a const reference to a non-reference type. template struct __add_c_ref @@ -416,6 +418,8 @@ namespace tr1 { _Swallow_assign ignore; }; // anonymous namespace + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits index 88aae7ad8b1b..2825fe6f4e3b 100644 --- a/libstdc++-v3/include/tr1/type_traits +++ b/libstdc++-v3/include/tr1/type_traits @@ -34,10 +34,12 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + /** * @defgroup metaprogramming Type Traits * @ingroup utilities @@ -679,6 +681,8 @@ namespace tr1 #undef _DEFINE_SPEC_1_HELPER #undef _DEFINE_SPEC_2_HELPER #undef _DEFINE_SPEC + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/unordered_map.h b/libstdc++-v3/include/tr1/unordered_map.h index cdce7d0df0c8..96404d3d07ca 100644 --- a/libstdc++-v3/include/tr1/unordered_map.h +++ b/libstdc++-v3/include/tr1/unordered_map.h @@ -27,11 +27,13 @@ * Do not attempt to use it directly. @headername{tr1/unordered_map} */ -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // XXX When we get typedef templates these class definitions +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // NB: When we get typedef templates these class definitions // will be unnecessary. template, @@ -270,5 +272,7 @@ namespace tr1 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/unordered_set.h b/libstdc++-v3/include/tr1/unordered_set.h index 293adf194d4c..e65a4cced279 100644 --- a/libstdc++-v3/include/tr1/unordered_set.h +++ b/libstdc++-v3/include/tr1/unordered_set.h @@ -27,11 +27,13 @@ * Do not attempt to use it directly. @headername{tr1/unordered_set} */ -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { - // XXX When we get typedef templates these class definitions +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + // NB: When we get typedef templates these class definitions // will be unnecessary. template, @@ -259,5 +261,7 @@ namespace tr1 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/include/tr1/utility b/libstdc++-v3/include/tr1/utility index 04ff67a3f8f0..ef3673a44c36 100644 --- a/libstdc++-v3/include/tr1/utility +++ b/libstdc++-v3/include/tr1/utility @@ -1,6 +1,6 @@ // TR1 utility -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2008. 2009, 2010 +// Copyright (C) 2004, 2005, 2006, 2007, 2008. 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -36,10 +36,12 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template class tuple_size; @@ -99,6 +101,8 @@ namespace tr1 inline const typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& get(const std::pair<_Tp1, _Tp2>& __in) { return __pair_get<_Int>::__const_get(__in); } + +_GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/libsupc++/del_op.cc b/libstdc++-v3/libsupc++/del_op.cc index f5bdc7819f8e..86d4c1e29859 100644 --- a/libstdc++-v3/libsupc++/del_op.cc +++ b/libstdc++-v3/libsupc++/del_op.cc @@ -28,9 +28,12 @@ #if !_GLIBCXX_HOSTED // A freestanding C runtime may not provide "free" -- but there is no // other reasonable way to implement "operator delete". -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION extern "C" void free(void*); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #else # include #endif diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index 7f779f93c743..db75ad115f32 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -120,7 +120,9 @@ namespace std // @} group exceptions } // namespace std -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A replacement for the standard terminate_handler which @@ -140,7 +142,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) */ void __verbose_terminate_handler(); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace } // extern "C++" diff --git a/libstdc++-v3/libsupc++/hash_bytes.cc b/libstdc++-v3/libsupc++/hash_bytes.cc index 951f7bb11556..07e77cf8d1dd 100644 --- a/libstdc++-v3/libsupc++/hash_bytes.cc +++ b/libstdc++-v3/libsupc++/hash_bytes.cc @@ -63,7 +63,9 @@ namespace #endif } -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #if __SIZEOF_SIZE_T__ == 4 @@ -183,4 +185,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif /* __SIZEOF_SIZE_T__ */ -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/libsupc++/hash_bytes.h b/libstdc++-v3/libsupc++/hash_bytes.h index 95db644ee25c..2f0c0eac645d 100644 --- a/libstdc++-v3/libsupc++/hash_bytes.h +++ b/libstdc++-v3/libsupc++/hash_bytes.h @@ -34,7 +34,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Hash function implementation for the nontrivial specialization. // All of them are based on a primitive that hashes a pointer to a @@ -51,6 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) size_t _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/libsupc++/vterminate.cc b/libstdc++-v3/libsupc++/vterminate.cc index 008d57846efc..96824bb0fd6f 100644 --- a/libstdc++-v3/libsupc++/vterminate.cc +++ b/libstdc++-v3/libsupc++/vterminate.cc @@ -34,7 +34,9 @@ using namespace std; using namespace abi; -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // A replacement for the standard terminate_handler which prints // more information about the terminating exception (if any) on @@ -93,6 +95,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) abort(); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 21a1bfd3f8a0..d6618f0f8c0c 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -147,8 +147,9 @@ basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC) $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true if ENABLE_PARALLEL -parallel_sources = parallel_list.cc parallel_settings.cc \ - compatibility-parallel_list.cc +parallel_sources = parallel_settings.cc \ + compatibility-parallel_list.cc \ + compatibility-parallel_list-2.cc else parallel_sources = endif @@ -169,7 +170,9 @@ sources = \ compatibility.cc \ compatibility-c++0x.cc \ compatibility-debug_list.cc \ + compatibility-debug_list-2.cc \ compatibility-list.cc \ + compatibility-list-2.cc \ complex_io.cc \ ctype.cc \ debug.cc \ @@ -185,7 +188,6 @@ sources = \ ios_locale.cc \ limits.cc \ list.cc \ - debug_list.cc \ locale.cc \ locale_init.cc \ locale_facets.cc \ @@ -259,20 +261,20 @@ concept-inst.o: concept-inst.cc # Use special rules for parallel mode compilation. PARALLEL_FLAGS = -fopenmp -D_GLIBCXX_PARALLEL -I$(glibcxx_builddir)/../libgomp -parallel_list.lo: parallel_list.cc - $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< -parallel_list.o: parallel_list.cc - $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< - parallel_settings.lo: parallel_settings.cc $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< parallel_settings.o: parallel_settings.cc $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< compatibility-parallel_list.lo: compatibility-parallel_list.cc - $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< + $(LTCXXCOMPILE) -c $< compatibility-parallel_list.o: compatibility-parallel_list.cc - $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< + $(CXXCOMPILE) -c $< + +compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc + $(LTCXXCOMPILE) -c $< +compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc + $(CXXCOMPILE) -c $< # Use special rules for the C++0x sources so that the proper flags are passed. functexcept.lo: functexcept.cc diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 6776eb7e4bb7..4d8eb33736e7 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -92,19 +92,20 @@ am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \ ctype_members.lo messages_members.lo monetary_members.lo \ numeric_members.lo time_members.lo @GLIBCXX_LDBL_COMPAT_TRUE@am__objects_2 = compatibility-ldbl.lo -@ENABLE_PARALLEL_TRUE@am__objects_3 = parallel_list.lo \ -@ENABLE_PARALLEL_TRUE@ parallel_settings.lo \ -@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.lo +@ENABLE_PARALLEL_TRUE@am__objects_3 = parallel_settings.lo \ +@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.lo \ +@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list-2.lo am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \ $(am__objects_3) am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \ mt_allocator.lo codecvt.lo compatibility.lo \ compatibility-c++0x.lo compatibility-debug_list.lo \ - compatibility-list.lo complex_io.lo ctype.lo debug.lo \ + compatibility-debug_list-2.lo compatibility-list.lo \ + compatibility-list-2.lo complex_io.lo ctype.lo debug.lo \ functexcept.lo globals_io.lo hash_c++0x.lo hash_tr1.lo \ hashtable_c++0x.lo hashtable_tr1.lo ios.lo ios_failure.lo \ - ios_init.lo ios_locale.lo limits.lo list.lo debug_list.lo \ - locale.lo locale_init.lo locale_facets.lo localename.lo \ + ios_init.lo ios_locale.lo limits.lo list.lo locale.lo \ + locale_init.lo locale_facets.lo localename.lo \ math_stubs_float.lo math_stubs_long_double.lo stdexcept.lo \ strstream.lo system_error.lo tree.lo allocator-inst.lo \ concept-inst.lo fstream-inst.lo ext-inst.lo ios-inst.lo \ @@ -369,8 +370,9 @@ host_sources_extra = \ basic_file.cc c++locale.cc ${ldbl_compat_sources} ${parallel_sources} @ENABLE_PARALLEL_FALSE@parallel_sources = -@ENABLE_PARALLEL_TRUE@parallel_sources = parallel_list.cc parallel_settings.cc \ -@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.cc +@ENABLE_PARALLEL_TRUE@parallel_sources = parallel_settings.cc \ +@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list.cc \ +@ENABLE_PARALLEL_TRUE@ compatibility-parallel_list-2.cc @GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = @GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc @@ -385,7 +387,9 @@ sources = \ compatibility.cc \ compatibility-c++0x.cc \ compatibility-debug_list.cc \ + compatibility-debug_list-2.cc \ compatibility-list.cc \ + compatibility-list-2.cc \ complex_io.cc \ ctype.cc \ debug.cc \ @@ -401,7 +405,6 @@ sources = \ ios_locale.cc \ limits.cc \ list.cc \ - debug_list.cc \ locale.cc \ locale_init.cc \ locale_facets.cc \ @@ -847,20 +850,20 @@ concept-inst.lo: concept-inst.cc $(LTCXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $< concept-inst.o: concept-inst.cc $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $< -parallel_list.lo: parallel_list.cc - $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< -parallel_list.o: parallel_list.cc - $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< - parallel_settings.lo: parallel_settings.cc $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< parallel_settings.o: parallel_settings.cc $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< compatibility-parallel_list.lo: compatibility-parallel_list.cc - $(LTCXXCOMPILE) $(PARALLEL_FLAGS) -c $< + $(LTCXXCOMPILE) -c $< compatibility-parallel_list.o: compatibility-parallel_list.cc - $(CXXCOMPILE) $(PARALLEL_FLAGS) -c $< + $(CXXCOMPILE) -c $< + +compatibility-parallel_list-2.lo: compatibility-parallel_list-2.cc + $(LTCXXCOMPILE) -c $< +compatibility-parallel_list-2.o: compatibility-parallel_list-2.cc + $(CXXCOMPILE) -c $< # Use special rules for the C++0x sources so that the proper flags are passed. functexcept.lo: functexcept.cc diff --git a/libstdc++-v3/src/allocator-inst.cc b/libstdc++-v3/src/allocator-inst.cc index 9c6a2490da34..801468016d27 100644 --- a/libstdc++-v3/src/allocator-inst.cc +++ b/libstdc++-v3/src/allocator-inst.cc @@ -29,9 +29,12 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class allocator; template class allocator; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/atomic.cc b/libstdc++-v3/src/atomic.cc index 822e022b7e58..e655dd3e8e6c 100644 --- a/libstdc++-v3/src/atomic.cc +++ b/libstdc++-v3/src/atomic.cc @@ -49,7 +49,9 @@ namespace }; } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __atomic0 { @@ -116,7 +118,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } // namespace __atomic0 -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated diff --git a/libstdc++-v3/src/bitmap_allocator.cc b/libstdc++-v3/src/bitmap_allocator.cc index 8394ef671372..a9f3a77ba2d0 100644 --- a/libstdc++-v3/src/bitmap_allocator.cc +++ b/libstdc++-v3/src/bitmap_allocator.cc @@ -1,6 +1,6 @@ // Bitmap Allocator. Out of line function definitions. -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -25,10 +25,11 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ namespace __detail { + _GLIBCXX_BEGIN_NAMESPACE_VERSION template class __mini_vector< std::pair::_Alloc_block*, bitmap_allocator::_Alloc_block*> >; @@ -41,8 +42,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) template size_t** __lower_bound(size_t**, size_t**, size_t const&, free_list::_LT_pointer_compare); + _GLIBCXX_END_NAMESPACE_VERSION } +_GLIBCXX_BEGIN_NAMESPACE_VERSION + size_t* free_list:: _M_get(size_t __sz) throw(std::bad_alloc) @@ -120,4 +124,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) template class bitmap_allocator; template class bitmap_allocator; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/chrono.cc b/libstdc++-v3/src/chrono.cc index 4dcd74bcee3e..6b5e669a7dca 100644 --- a/libstdc++-v3/src/chrono.cc +++ b/libstdc++-v3/src/chrono.cc @@ -1,6 +1,6 @@ // chrono -*- C++ -*- -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -33,11 +33,13 @@ #include #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ namespace chrono { - constexpr bool system_clock::is_monotonic; + _GLIBCXX_BEGIN_NAMESPACE_VERSION + + constexpr bool system_clock::is_monotonic; system_clock::time_point system_clock::now() throw () @@ -73,8 +75,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) + chrono::nanoseconds(tp.tv_nsec))); } #endif - } -_GLIBCXX_END_NAMESPACE + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace chrono +} // namespace std #endif // _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/src/codecvt.cc b/libstdc++-v3/src/codecvt.cc index f88eda59c4e3..fdb0896caa29 100644 --- a/libstdc++-v3/src/codecvt.cc +++ b/libstdc++-v3/src/codecvt.cc @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for locale::id of standard facets that are specialized. locale::id codecvt::id; @@ -145,4 +147,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return false; } #endif // _GLIBCXX_USE_WCHAR_T -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/compatibility-c++0x.cc b/libstdc++-v3/src/compatibility-c++0x.cc index 4941b17a3fda..08a572761f9c 100644 --- a/libstdc++-v3/src/compatibility-c++0x.cc +++ b/libstdc++-v3/src/compatibility-c++0x.cc @@ -30,7 +30,7 @@ # error "compatibility-c++0x.cc must be compiled with -std=gnu++0x" #endif -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { // gcc-4.4.0 // exported std::lock_error diff --git a/libstdc++-v3/src/debug_list.cc b/libstdc++-v3/src/compatibility-debug_list-2.cc similarity index 79% rename from libstdc++-v3/src/debug_list.cc rename to libstdc++-v3/src/compatibility-debug_list-2.cc index 64bfe87f103d..c032ff8598b1 100644 --- a/libstdc++-v3/src/debug_list.cc +++ b/libstdc++-v3/src/compatibility-debug_list-2.cc @@ -1,6 +1,6 @@ -// Debugging mode support code for list -*- C++ -*- +// Compatibility symbols for previous versions, debug list -*- C++ -*- -// Copyright (C) 2004, 2009 Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -22,7 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -#define _GLIBCXX_DEBUG - -#include "list.cc" +#define _GLIBCXX_BEGIN_NAMESPACE_COMPAT namespace __norm { +#define _GLIBCXX_END_NAMESPACE_COMPAT } +#include "compatibility-list-2.cc" diff --git a/libstdc++-v3/src/compatibility-debug_list.cc b/libstdc++-v3/src/compatibility-debug_list.cc index 3f14a534250a..76cceec7205a 100644 --- a/libstdc++-v3/src/compatibility-debug_list.cc +++ b/libstdc++-v3/src/compatibility-debug_list.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions, debug list -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -22,6 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -#define _GLIBCXX_DEBUG +#define _GLIBCXX_BEGIN_NAMESPACE_COMPAT namespace __norm { +#define _GLIBCXX_END_NAMESPACE_COMPAT } #include "compatibility-list.cc" diff --git a/libstdc++-v3/src/compatibility-ldbl.cc b/libstdc++-v3/src/compatibility-ldbl.cc index 25cbf70a3a7e..a9bdb8b09864 100644 --- a/libstdc++-v3/src/compatibility-ldbl.cc +++ b/libstdc++-v3/src/compatibility-ldbl.cc @@ -33,7 +33,7 @@ #error "compatibility-ldbl.cc must be compiled with -mlong-double-64" #endif -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { #define C char template class num_get >; @@ -70,7 +70,7 @@ namespace std // For std::tr1::hash::operator() #define _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/src/compatibility-list-2.cc b/libstdc++-v3/src/compatibility-list-2.cc new file mode 100644 index 000000000000..58f8cea55f29 --- /dev/null +++ b/libstdc++-v3/src/compatibility-list-2.cc @@ -0,0 +1,111 @@ +// Compatibility symbols for previous versions, list bits -*- C++ -*- + +// Copyright (C) 2011 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 3, 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +#include + +#ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT +# define _GLIBCXX_BEGIN_NAMESPACE_COMPAT +#endif + +#ifndef _GLIBCXX_END_NAMESPACE_COMPAT +# define _GLIBCXX_END_NAMESPACE_COMPAT +#endif + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_COMPAT + + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + + void + _M_transfer(_List_node_base * const __first, + _List_node_base * const __last) throw (); + + void + _M_reverse() throw (); + + void + _M_hook(_List_node_base * const __position) throw (); + + void + _M_unhook() throw (); + }; + + void + _List_node_base::_M_transfer(_List_node_base * const __first, + _List_node_base * const __last) throw () + { + if (this != __last) + { + // Remove [first, last) from its old position. + __last->_M_prev->_M_next = this; + __first->_M_prev->_M_next = __last; + this->_M_prev->_M_next = __first; + + // Splice [first, last) into its new position. + _List_node_base* const __tmp = this->_M_prev; + this->_M_prev = __last->_M_prev; + __last->_M_prev = __first->_M_prev; + __first->_M_prev = __tmp; + } + } + + void + _List_node_base::_M_reverse() throw () + { + _List_node_base* __tmp = this; + do + { + std::swap(__tmp->_M_next, __tmp->_M_prev); + + // Old next node is now prev. + __tmp = __tmp->_M_prev; + } + while (__tmp != this); + } + + void + _List_node_base::_M_hook(_List_node_base* const __position) throw () + { + this->_M_next = __position; + this->_M_prev = __position->_M_prev; + __position->_M_prev->_M_next = this; + __position->_M_prev = this; + } + + void + _List_node_base::_M_unhook() throw () + { + _List_node_base* const __next_node = this->_M_next; + _List_node_base* const __prev_node = this->_M_prev; + __prev_node->_M_next = __next_node; + __next_node->_M_prev = __prev_node; + } + +_GLIBCXX_END_NAMESPACE_COMPAT + +} // namespace std diff --git a/libstdc++-v3/src/compatibility-list.cc b/libstdc++-v3/src/compatibility-list.cc index 57a2df97b7ee..a0d706b27a91 100644 --- a/libstdc++-v3/src/compatibility-list.cc +++ b/libstdc++-v3/src/compatibility-list.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions, list bits -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -24,13 +24,26 @@ #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +#ifndef _GLIBCXX_BEGIN_NAMESPACE_COMPAT +# define _GLIBCXX_BEGIN_NAMESPACE_COMPAT +#endif + +#ifndef _GLIBCXX_END_NAMESPACE_COMPAT +# define _GLIBCXX_END_NAMESPACE_COMPAT +#endif + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_COMPAT struct _List_node_base { _List_node_base* _M_next; _List_node_base* _M_prev; + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + void transfer(_List_node_base * const __first, _List_node_base * const __last) throw (); @@ -45,9 +58,41 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) unhook() throw (); }; + void + _List_node_base::swap(_List_node_base& __x, _List_node_base& __y) throw() + { + if ( __x._M_next != &__x ) + { + if ( __y._M_next != &__y ) + { + // Both __x and __y are not empty. + std::swap(__x._M_next,__y._M_next); + std::swap(__x._M_prev,__y._M_prev); + __x._M_next->_M_prev = __x._M_prev->_M_next = &__x; + __y._M_next->_M_prev = __y._M_prev->_M_next = &__y; + } + else + { + // __x is not empty, __y is empty. + __y._M_next = __x._M_next; + __y._M_prev = __x._M_prev; + __y._M_next->_M_prev = __y._M_prev->_M_next = &__y; + __x._M_next = __x._M_prev = &__x; + } + } + else if ( __y._M_next != &__y ) + { + // __x is empty, __y is not empty. + __x._M_next = __y._M_next; + __x._M_prev = __y._M_prev; + __x._M_next->_M_prev = __x._M_prev->_M_next = &__x; + __y._M_next = __y._M_prev = &__y; + } + } + void _List_node_base::transfer(_List_node_base * const __first, - _List_node_base * const __last) throw () + _List_node_base * const __last) throw () { if (this != __last) { @@ -55,7 +100,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __last->_M_prev->_M_next = this; __first->_M_prev->_M_next = __last; this->_M_prev->_M_next = __first; - + // Splice [first, last) into its new position. _List_node_base* const __tmp = this->_M_prev; this->_M_prev = __last->_M_prev; @@ -73,8 +118,8 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) std::swap(__tmp->_M_next, __tmp->_M_prev); // Old next node is now prev. - __tmp = __tmp->_M_prev; - } + __tmp = __tmp->_M_prev; + } while (__tmp != this); } @@ -96,4 +141,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) __next_node->_M_prev = __prev_node; } -_GLIBCXX_END_NESTED_NAMESPACE +_GLIBCXX_END_NAMESPACE_COMPAT + +} // namespace std diff --git a/libstdc++-v3/src/parallel_list.cc b/libstdc++-v3/src/compatibility-parallel_list-2.cc similarity index 78% rename from libstdc++-v3/src/parallel_list.cc rename to libstdc++-v3/src/compatibility-parallel_list-2.cc index 7120c13edd8a..8dc837a361a9 100644 --- a/libstdc++-v3/src/parallel_list.cc +++ b/libstdc++-v3/src/compatibility-parallel_list-2.cc @@ -1,6 +1,6 @@ -// Parallel mode support code for list -*- C++ -*- +// Compatibility symbols for previous versions, parallel list -*- C++ -*- -// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2011 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 @@ -22,4 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -#include "list.cc" +#define _GLIBCXX_BEGIN_NAMESPACE_COMPAT namespace __cxx1998 { +#define _GLIBCXX_END_NAMESPACE_COMPAT } + +#include "compatibility-list-2.cc" diff --git a/libstdc++-v3/src/compatibility-parallel_list.cc b/libstdc++-v3/src/compatibility-parallel_list.cc index d9d7b60fd34b..05e50fa569df 100644 --- a/libstdc++-v3/src/compatibility-parallel_list.cc +++ b/libstdc++-v3/src/compatibility-parallel_list.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions, parallel list -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -22,4 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . +#define _GLIBCXX_BEGIN_NAMESPACE_COMPAT namespace __cxx1998 { +#define _GLIBCXX_END_NAMESPACE_COMPAT } + #include "compatibility-list.cc" diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc index 7dcd95cb1719..d5d39b3317af 100644 --- a/libstdc++-v3/src/compatibility.cc +++ b/libstdc++-v3/src/compatibility.cc @@ -1,6 +1,6 @@ // Compatibility symbols for previous versions -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -50,7 +50,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // std::istream ignore explicit specializations. template<> @@ -196,7 +198,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // NB: These symbols renames should go into the shared library only, @@ -210,7 +213,9 @@ _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template istreambuf_iterator& @@ -222,7 +227,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) istreambuf_iterator::operator++(); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace /* gcc-4.0.0 @@ -254,7 +260,9 @@ _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv _ZNSt11char_traitsIcE2eqERKcS2_ _ZNSt11char_traitsIwE2eqERKwS2_ */ -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // std::char_traits is explicitly specialized bool (* __p1)(const char&, const char&) = &char_traits::eq; @@ -348,7 +356,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) basic_ofstream::is_open() const; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // The rename syntax for default exported names is // asm (".symver name1,exportedname@GLIBCXX_3.4") @@ -387,24 +396,24 @@ _ZN10__gnu_norm15_List_node_base6unhookEv; _ZN10__gnu_norm15_List_node_base7reverseEv; _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_; */ -#include "list.cc" -_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX7_M_hookEPS_, \ +#include "list.cc" +_GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX7_M_hookEPS0_, \ _ZN10__gnu_norm15_List_node_base4hookEPS0_, \ GLIBCXX_3.4) -_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX4swapERS_S0_, \ +_GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX4swapERS0_S1_, \ _ZN10__gnu_norm15_List_node_base4swapERS0_S1_, \ GLIBCXX_3.4) -_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX9_M_unhookEv, \ +_GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX9_M_unhookEv, \ _ZN10__gnu_norm15_List_node_base6unhookEv, \ GLIBCXX_3.4) -_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX10_M_reverseEv, \ +_GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX10_M_reverseEv, \ _ZN10__gnu_norm15_List_node_base7reverseEv, \ GLIBCXX_3.4) -_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX11_M_transferEPS_S0_, \ +_GLIBCXX_ASM_SYMVER(_ZNSt8__detail17_List_node_baseXX11_M_transferEPS0_S1_, \ _ZN10__gnu_norm15_List_node_base8transferEPS0_S1_, \ GLIBCXX_3.4) #undef _List_node_base diff --git a/libstdc++-v3/src/complex_io.cc b/libstdc++-v3/src/complex_io.cc index 636bc67b469c..4e4aeef46f7d 100644 --- a/libstdc++-v3/src/complex_io.cc +++ b/libstdc++-v3/src/complex_io.cc @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template basic_istream >& @@ -86,7 +88,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const complex&); #endif //_GLIBCXX_USE_WCHAR_T -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/libstdc++-v3/src/concept-inst.cc b/libstdc++-v3/src/concept-inst.cc index e89d16c1f432..829d0db0b68a 100644 --- a/libstdc++-v3/src/concept-inst.cc +++ b/libstdc++-v3/src/concept-inst.cc @@ -39,7 +39,9 @@ #define _Instantiate(...) template void __function_requires< __VA_ARGS__ > () -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template void __aux_require_boolean_expr(bool const&); @@ -101,7 +103,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _Instantiate(_RandomAccessIteratorConcept ); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #undef _Instantiate diff --git a/libstdc++-v3/src/condition_variable.cc b/libstdc++-v3/src/condition_variable.cc index e7adb5251bed..7f1e1946a551 100644 --- a/libstdc++-v3/src/condition_variable.cc +++ b/libstdc++-v3/src/condition_variable.cc @@ -26,7 +26,9 @@ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION condition_variable::condition_variable() throw () { @@ -85,6 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) condition_variable_any::~condition_variable_any() throw () { } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/src/ctype.cc b/libstdc++-v3/src/ctype.cc index b44a22e54d00..04d31cc57444 100644 --- a/libstdc++-v3/src/ctype.cc +++ b/libstdc++-v3/src/ctype.cc @@ -26,7 +26,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for static const data members of ctype_base. const ctype_base::mask ctype_base::space; @@ -133,4 +135,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/ext-inst.cc b/libstdc++-v3/src/ext-inst.cc index ae942c78d432..831f37cf14e8 100644 --- a/libstdc++-v3/src/ext-inst.cc +++ b/libstdc++-v3/src/ext-inst.cc @@ -29,7 +29,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION namespace { @@ -60,4 +62,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) template class stdio_filebuf; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/fstream-inst.cc b/libstdc++-v3/src/fstream-inst.cc index 761cbff3bc54..cd7a6cd45461 100644 --- a/libstdc++-v3/src/fstream-inst.cc +++ b/libstdc++-v3/src/fstream-inst.cc @@ -29,7 +29,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class basic_filebuf >; template class basic_ifstream; @@ -43,4 +45,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template class basic_fstream; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/functexcept.cc b/libstdc++-v3/src/functexcept.cc index 1990c3061f54..5cd5ea3b1948 100644 --- a/libstdc++-v3/src/functexcept.cc +++ b/libstdc++-v3/src/functexcept.cc @@ -39,7 +39,9 @@ # define _(msgid) (msgid) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #if __EXCEPTIONS void @@ -180,4 +182,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif //__EXCEPTIONS -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/future.cc b/libstdc++-v3/src/future.cc index 6f40c0da32e9..cbce2b1a757f 100644 --- a/libstdc++-v3/src/future.cc +++ b/libstdc++-v3/src/future.cc @@ -64,7 +64,9 @@ namespace } } -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION const error_category& future_category() { return __future_category_instance(); } @@ -74,7 +76,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const char* future_error::what() const throw() { return _M_code.message().c_str(); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated // gcc-4.6.0 @@ -83,7 +86,7 @@ _GLIBCXX_END_NAMESPACE && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) -namespace __gnu_cxx +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { const std::error_category* future_category = &__future_category_instance(); } diff --git a/libstdc++-v3/src/globals_io.cc b/libstdc++-v3/src/globals_io.cc index 3b36e086203b..722abacbe84c 100644 --- a/libstdc++-v3/src/globals_io.cc +++ b/libstdc++-v3/src/globals_io.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -44,7 +44,9 @@ // In macro form: // _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2) -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Standard stream objects. // NB: Iff is included, these definitions become wonky. @@ -68,9 +70,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) fake_wostream wclog; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -namespace __gnu_internal _GLIBCXX_VISIBILITY_ATTR(hidden) +namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden) { using namespace std; using namespace __gnu_cxx; diff --git a/libstdc++-v3/src/hash_c++0x.cc b/libstdc++-v3/src/hash_c++0x.cc index ba007f84b54b..852498df602b 100644 --- a/libstdc++-v3/src/hash_c++0x.cc +++ b/libstdc++-v3/src/hash_c++0x.cc @@ -28,7 +28,7 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { #include "hash-long-double-aux.cc" } diff --git a/libstdc++-v3/src/hash_tr1.cc b/libstdc++-v3/src/hash_tr1.cc index 03f3ad3c0942..e707e827a116 100644 --- a/libstdc++-v3/src/hash_tr1.cc +++ b/libstdc++-v3/src/hash_tr1.cc @@ -25,7 +25,7 @@ #include #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/src/hashtable-aux.cc b/libstdc++-v3/src/hashtable-aux.cc index 8bd3afb09038..23bb00ec584a 100644 --- a/libstdc++-v3/src/hashtable-aux.cc +++ b/libstdc++-v3/src/hashtable-aux.cc @@ -1,6 +1,6 @@ // std::__detail and std::tr1::__detail definitions -*- C++ -*- -// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2007, 2009, 2011 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 @@ -22,8 +22,11 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . +#include + namespace __detail { +_GLIBCXX_BEGIN_NAMESPACE_VERSION extern const unsigned long __prime_list[] = // 256 + 1 or 256 + 48 + 1 { 2ul, 3ul, 5ul, 7ul, 11ul, 13ul, 17ul, 19ul, 23ul, 29ul, 31ul, @@ -88,4 +91,5 @@ namespace __detail 18446744073709551557ul, 18446744073709551557ul #endif }; +_GLIBCXX_END_NAMESPACE_VERSION } // namespace __detail diff --git a/libstdc++-v3/src/hashtable_c++0x.cc b/libstdc++-v3/src/hashtable_c++0x.cc index 0b5f79cc6f1d..c9026acdfff2 100644 --- a/libstdc++-v3/src/hashtable_c++0x.cc +++ b/libstdc++-v3/src/hashtable_c++0x.cc @@ -28,8 +28,7 @@ # error "hashtable_c++0x.cc must be compiled with -std=gnu++0x" #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ #include "hashtable-aux.cc" - -_GLIBCXX_END_NAMESPACE // namespace std +} // namespace // namespace std diff --git a/libstdc++-v3/src/hashtable_tr1.cc b/libstdc++-v3/src/hashtable_tr1.cc index 70de1bdf310d..32d5b63dca80 100644 --- a/libstdc++-v3/src/hashtable_tr1.cc +++ b/libstdc++-v3/src/hashtable_tr1.cc @@ -1,6 +1,6 @@ // std::__detail definitions -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011 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 @@ -22,7 +22,9 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . -namespace std +#include + +namespace std _GLIBCXX_VISIBILITY(default) { namespace tr1 { diff --git a/libstdc++-v3/src/ios-inst.cc b/libstdc++-v3/src/ios-inst.cc index 83aa206c3253..10fdaf7cd929 100644 --- a/libstdc++-v3/src/ios-inst.cc +++ b/libstdc++-v3/src/ios-inst.cc @@ -29,7 +29,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class basic_ios; @@ -37,4 +39,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template class basic_ios; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc index 66052872ac79..292f1f8d02f5 100644 --- a/libstdc++-v3/src/ios.cc +++ b/libstdc++-v3/src/ios.cc @@ -31,7 +31,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for static const members of ios_base. const ios_base::fmtflags ios_base::boolalpha; @@ -187,4 +189,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_callbacks = 0; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/ios_failure.cc b/libstdc++-v3/src/ios_failure.cc index d2ac3a64dbcb..1c42f01eddd0 100644 --- a/libstdc++-v3/src/ios_failure.cc +++ b/libstdc++-v3/src/ios_failure.cc @@ -29,7 +29,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION ios_base::failure::failure(const string& __str) throw() : _M_msg(__str) { } @@ -41,4 +43,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ios_base::failure::what() const throw() { return _M_msg.c_str(); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/ios_init.cc b/libstdc++-v3/src/ios_init.cc index caf25ed80369..a811daf00cc2 100644 --- a/libstdc++-v3/src/ios_init.cc +++ b/libstdc++-v3/src/ios_init.cc @@ -1,7 +1,7 @@ // Iostreams base classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010 +// 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -35,7 +35,7 @@ #include #include -namespace __gnu_internal _GLIBCXX_VISIBILITY_ATTR(hidden) +namespace __gnu_internal _GLIBCXX_VISIBILITY(hidden) { using namespace __gnu_cxx; @@ -59,7 +59,9 @@ namespace __gnu_internal _GLIBCXX_VISIBILITY_ATTR(hidden) #endif } // namespace __gnu_internal -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using namespace __gnu_internal; @@ -199,4 +201,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __ret; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/ios_locale.cc b/libstdc++-v3/src/ios_locale.cc index 8b1873e7d49a..b98b96c62228 100644 --- a/libstdc++-v3/src/ios_locale.cc +++ b/libstdc++-v3/src/ios_locale.cc @@ -31,7 +31,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Called only by basic_ios<>::init. void @@ -54,4 +56,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __old; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/iostream-inst.cc b/libstdc++-v3/src/iostream-inst.cc index 02c681a4d26d..60f52061e069 100644 --- a/libstdc++-v3/src/iostream-inst.cc +++ b/libstdc++-v3/src/iostream-inst.cc @@ -31,7 +31,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class _Setfill; template _Setfill setfill(char); @@ -43,4 +45,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template class basic_iostream; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/istream-inst.cc b/libstdc++-v3/src/istream-inst.cc index 671374f9d5b6..4d3bc1a74dc8 100644 --- a/libstdc++-v3/src/istream-inst.cc +++ b/libstdc++-v3/src/istream-inst.cc @@ -30,7 +30,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class basic_istream; template istream& ws(istream&); @@ -90,7 +92,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template wistream& wistream::_M_extract(void*&); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc index e4102779aa88..e550306a0e69 100644 --- a/libstdc++-v3/src/istream.cc +++ b/libstdc++-v3/src/istream.cc @@ -29,7 +29,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> basic_istream& @@ -684,4 +686,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/limits.cc b/libstdc++-v3/src/limits.cc index ac46cf03a60f..5a21239d1bca 100644 --- a/libstdc++-v3/src/limits.cc +++ b/libstdc++-v3/src/limits.cc @@ -32,7 +32,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #define const _GLIBCXX_USE_CONSTEXPR @@ -514,7 +516,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #undef const -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/libstdc++-v3/src/list.cc b/libstdc++-v3/src/list.cc index a7a705ca680e..92b007f58aea 100644 --- a/libstdc++-v3/src/list.cc +++ b/libstdc++-v3/src/list.cc @@ -1,6 +1,6 @@ // std::list utilities implementation -*- C++ -*- -// Copyright (C) 2003, 2005, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2010, 2011 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 @@ -50,89 +50,95 @@ #include -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) - - void - _List_node_base::swap(_List_node_base& __x, _List_node_base& __y) throw() +namespace std _GLIBCXX_VISIBILITY(default) +{ + namespace __detail { - if ( __x._M_next != &__x ) - { - if ( __y._M_next != &__y ) - { - // Both __x and __y are not empty. - std::swap(__x._M_next,__y._M_next); - std::swap(__x._M_prev,__y._M_prev); - __x._M_next->_M_prev = __x._M_prev->_M_next = &__x; - __y._M_next->_M_prev = __y._M_prev->_M_next = &__y; - } - else - { - // __x is not empty, __y is empty. - __y._M_next = __x._M_next; - __y._M_prev = __x._M_prev; - __y._M_next->_M_prev = __y._M_prev->_M_next = &__y; - __x._M_next = __x._M_prev = &__x; - } - } - else if ( __y._M_next != &__y ) + _GLIBCXX_BEGIN_NAMESPACE_VERSION + + void + _List_node_base::swap(_List_node_base& __x, _List_node_base& __y) throw() { - // __x is empty, __y is not empty. - __x._M_next = __y._M_next; - __x._M_prev = __y._M_prev; - __x._M_next->_M_prev = __x._M_prev->_M_next = &__x; - __y._M_next = __y._M_prev = &__y; + if ( __x._M_next != &__x ) + { + if ( __y._M_next != &__y ) + { + // Both __x and __y are not empty. + std::swap(__x._M_next,__y._M_next); + std::swap(__x._M_prev,__y._M_prev); + __x._M_next->_M_prev = __x._M_prev->_M_next = &__x; + __y._M_next->_M_prev = __y._M_prev->_M_next = &__y; + } + else + { + // __x is not empty, __y is empty. + __y._M_next = __x._M_next; + __y._M_prev = __x._M_prev; + __y._M_next->_M_prev = __y._M_prev->_M_next = &__y; + __x._M_next = __x._M_prev = &__x; + } + } + else if ( __y._M_next != &__y ) + { + // __x is empty, __y is not empty. + __x._M_next = __y._M_next; + __x._M_prev = __y._M_prev; + __x._M_next->_M_prev = __x._M_prev->_M_next = &__x; + __y._M_next = __y._M_prev = &__y; + } } - } - void - _List_node_base::_M_transfer(_List_node_base * const __first, - _List_node_base * const __last) throw() - { - if (this != __last) + void + _List_node_base::_M_transfer(_List_node_base * const __first, + _List_node_base * const __last) throw() { - // Remove [first, last) from its old position. - __last->_M_prev->_M_next = this; - __first->_M_prev->_M_next = __last; - this->_M_prev->_M_next = __first; - - // Splice [first, last) into its new position. - _List_node_base* const __tmp = this->_M_prev; - this->_M_prev = __last->_M_prev; - __last->_M_prev = __first->_M_prev; - __first->_M_prev = __tmp; + if (this != __last) + { + // Remove [first, last) from its old position. + __last->_M_prev->_M_next = this; + __first->_M_prev->_M_next = __last; + this->_M_prev->_M_next = __first; + + // Splice [first, last) into its new position. + _List_node_base* const __tmp = this->_M_prev; + this->_M_prev = __last->_M_prev; + __last->_M_prev = __first->_M_prev; + __first->_M_prev = __tmp; + } } - } - void - _List_node_base::_M_reverse() throw() - { - _List_node_base* __tmp = this; - do + void + _List_node_base::_M_reverse() throw() { - std::swap(__tmp->_M_next, __tmp->_M_prev); + _List_node_base* __tmp = this; + do + { + std::swap(__tmp->_M_next, __tmp->_M_prev); - // Old next node is now prev. - __tmp = __tmp->_M_prev; - } - while (__tmp != this); - } + // Old next node is now prev. + __tmp = __tmp->_M_prev; + } + while (__tmp != this); + } - void - _List_node_base::_M_hook(_List_node_base* const __position) throw() - { - this->_M_next = __position; - this->_M_prev = __position->_M_prev; - __position->_M_prev->_M_next = this; - __position->_M_prev = this; - } + void + _List_node_base::_M_hook(_List_node_base* const __position) throw() + { + this->_M_next = __position; + this->_M_prev = __position->_M_prev; + __position->_M_prev->_M_next = this; + __position->_M_prev = this; + } - void - _List_node_base::_M_unhook() throw() - { - _List_node_base* const __next_node = this->_M_next; - _List_node_base* const __prev_node = this->_M_prev; - __prev_node->_M_next = __next_node; - __next_node->_M_prev = __prev_node; - } + void + _List_node_base::_M_unhook() throw() + { + _List_node_base* const __next_node = this->_M_next; + _List_node_base* const __prev_node = this->_M_prev; + __prev_node->_M_next = __next_node; + __next_node->_M_prev = __prev_node; + } -_GLIBCXX_END_NESTED_NAMESPACE + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace __detail +} // namespace std diff --git a/libstdc++-v3/src/locale-inst.cc b/libstdc++-v3/src/locale-inst.cc index 0418c6fa0f18..e77c5c95d69e 100644 --- a/libstdc++-v3/src/locale-inst.cc +++ b/libstdc++-v3/src/locale-inst.cc @@ -1,7 +1,7 @@ // Locale support -*- C++ -*- // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -// 2009 Free Software Foundation, Inc. +// 2009, 2011 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 @@ -35,7 +35,9 @@ # define C_is_char #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // moneypunct, money_get, and money_put template class moneypunct; @@ -44,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template struct __moneypunct_cache; template class moneypunct_byname; template class moneypunct_byname; -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template class money_get >; template class money_put >; template @@ -70,13 +72,13 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE money_put >:: _M_insert(ostreambuf_iterator, ios_base&, C, const string_type&) const; -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL // numpunct, numpunct_byname, num_get, and num_put template class numpunct; template struct __numpunct_cache; template class numpunct_byname; -_GLIBCXX_BEGIN_LDBL_NAMESPACE +_GLIBCXX_BEGIN_NAMESPACE_LDBL template class num_get >; template class num_put >; template @@ -160,7 +162,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE num_put >:: _M_insert_float(ostreambuf_iterator, ios_base&, C, char, long double) const; -_GLIBCXX_END_LDBL_NAMESPACE +_GLIBCXX_END_NAMESPACE_LDBL // time_get and time_put template class __timepunct; @@ -317,7 +319,8 @@ _GLIBCXX_END_LDBL_NAMESPACE ios_base::fmtflags, bool); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 937e99c8b145..09dccf0d7d39 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -55,7 +55,9 @@ _GLIBCXX_LOC_ID (_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2 # endif #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for static const data members of locale. const locale::category locale::none; @@ -438,4 +440,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return _M_index - 1; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/locale_facets.cc b/libstdc++-v3/src/locale_facets.cc index 77686c6c3eaa..92552227f806 100644 --- a/libstdc++-v3/src/locale_facets.cc +++ b/libstdc++-v3/src/locale_facets.cc @@ -24,7 +24,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for static const data members of time_base. template<> @@ -112,4 +114,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __test; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/locale_init.cc b/libstdc++-v3/src/locale_init.cc index 45f67f67e317..98c228cf15fc 100644 --- a/libstdc++-v3/src/locale_init.cc +++ b/libstdc++-v3/src/locale_init.cc @@ -203,7 +203,9 @@ namespace #endif } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION locale::locale() throw() : _M_impl(0) { @@ -468,4 +470,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #endif } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index 6d4306adb680..52e228281919 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -27,7 +27,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using namespace __gnu_cxx; @@ -348,4 +350,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/misc-inst.cc b/libstdc++-v3/src/misc-inst.cc index f4101784a4e3..ad09c9b84ddf 100644 --- a/libstdc++-v3/src/misc-inst.cc +++ b/libstdc++-v3/src/misc-inst.cc @@ -32,7 +32,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // string related to iostreams template @@ -62,15 +64,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std) getline(basic_istream&, wstring&); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class stdio_sync_filebuf; #ifdef _GLIBCXX_USE_WCHAR_T template class stdio_sync_filebuf; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/mt_allocator.cc b/libstdc++-v3/src/mt_allocator.cc index b04fe5b05e44..16c2fb8063ee 100644 --- a/libstdc++-v3/src/mt_allocator.cc +++ b/libstdc++-v3/src/mt_allocator.cc @@ -84,7 +84,9 @@ namespace #endif } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION void __pool::_M_destroy() throw() @@ -812,4 +814,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) template class __mt_alloc; template class __mt_alloc; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/mutex.cc b/libstdc++-v3/src/mutex.cc index e6eb6d28a729..d6f2f03700fb 100644 --- a/libstdc++-v3/src/mutex.cc +++ b/libstdc++-v3/src/mutex.cc @@ -37,7 +37,9 @@ namespace } #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_HAVE_TLS __thread void* __once_callable; @@ -89,7 +91,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated // gcc-4.6.0 @@ -98,7 +101,7 @@ _GLIBCXX_END_NAMESPACE && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) -namespace __gnu_cxx +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { std::defer_lock_t defer_lock; std::try_to_lock_t try_to_lock; diff --git a/libstdc++-v3/src/ostream-inst.cc b/libstdc++-v3/src/ostream-inst.cc index 9c0163393df3..9c25228771b1 100644 --- a/libstdc++-v3/src/ostream-inst.cc +++ b/libstdc++-v3/src/ostream-inst.cc @@ -30,7 +30,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // ostream template class basic_ostream; @@ -93,7 +95,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template wostream& wostream::_M_insert(const void*); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace // XXX GLIBCXX_ABI Deprecated #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/libstdc++-v3/src/placeholders.cc b/libstdc++-v3/src/placeholders.cc index 1d68bb7cf9e0..967ce178a324 100644 --- a/libstdc++-v3/src/placeholders.cc +++ b/libstdc++-v3/src/placeholders.cc @@ -28,10 +28,11 @@ #include -namespace std +namespace std _GLIBCXX_VISIBILITY(default) { namespace placeholders { + _GLIBCXX_BEGIN_NAMESPACE_VERSION extern const _Placeholder<1> _1{}; extern const _Placeholder<2> _2{}; extern const _Placeholder<3> _3{}; @@ -61,5 +62,6 @@ namespace std extern const _Placeholder<27> _27{}; extern const _Placeholder<28> _28{}; extern const _Placeholder<29> _29{}; + _GLIBCXX_END_NAMESPACE_VERSION } } diff --git a/libstdc++-v3/src/pool_allocator.cc b/libstdc++-v3/src/pool_allocator.cc index 80f07ba863bd..f94656b03bae 100644 --- a/libstdc++-v3/src/pool_allocator.cc +++ b/libstdc++-v3/src/pool_allocator.cc @@ -40,7 +40,9 @@ namespace } } // anonymous namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Definitions for __pool_alloc_base. __pool_alloc_base::_Obj* volatile* @@ -171,4 +173,5 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) template class __pool_alloc; template class __pool_alloc; -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/sstream-inst.cc b/libstdc++-v3/src/sstream-inst.cc index 97d32b2a434a..5c6877904dd9 100644 --- a/libstdc++-v3/src/sstream-inst.cc +++ b/libstdc++-v3/src/sstream-inst.cc @@ -29,7 +29,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template class basic_stringbuf; template class basic_istringstream; @@ -43,4 +45,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template class basic_stringstream; #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/stdexcept.cc b/libstdc++-v3/src/stdexcept.cc index 4d7ea37f6979..0b78f9a9b2e2 100644 --- a/libstdc++-v3/src/stdexcept.cc +++ b/libstdc++-v3/src/stdexcept.cc @@ -30,7 +30,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION logic_error::logic_error(const string& __arg) : exception(), _M_msg(__arg) { } @@ -71,5 +73,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) underflow_error::underflow_error(const string& __arg) : runtime_error(__arg) { } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/streambuf-inst.cc b/libstdc++-v3/src/streambuf-inst.cc index 1b30040a7344..5b563c8e1733 100644 --- a/libstdc++-v3/src/streambuf-inst.cc +++ b/libstdc++-v3/src/streambuf-inst.cc @@ -30,7 +30,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // streambuf template class basic_streambuf; @@ -58,4 +60,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) basic_streambuf*, bool&); #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/streambuf.cc b/libstdc++-v3/src/streambuf.cc index c040ae14b027..2e72559d827d 100644 --- a/libstdc++-v3/src/streambuf.cc +++ b/libstdc++-v3/src/streambuf.cc @@ -28,7 +28,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<> streamsize @@ -110,4 +112,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc index 4ba178a5ad43..879ccec7e8dd 100644 --- a/libstdc++-v3/src/string-inst.cc +++ b/libstdc++-v3/src/string-inst.cc @@ -37,7 +37,9 @@ # define C char #endif -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION typedef basic_string S; @@ -72,12 +74,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) S::_S_construct(const C*, const C*, const allocator&, forward_iterator_tag); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using std::S; template bool operator==(const S::iterator&, const S::iterator&); template bool operator==(const S::const_iterator&, const S::const_iterator&); -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/strstream.cc b/libstdc++-v3/src/strstream.cc index fbc5f518297d..d6c936e5f9df 100644 --- a/libstdc++-v3/src/strstream.cc +++ b/libstdc++-v3/src/strstream.cc @@ -48,7 +48,9 @@ #include #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION strstreambuf::strstreambuf(streamsize initial_capacity) : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(true), @@ -411,4 +413,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstream::str() throw () { return _M_buf.str(); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/system_error.cc b/libstdc++-v3/src/system_error.cc index be6af3bced89..156f8fcf7a0d 100644 --- a/libstdc++-v3/src/system_error.cc +++ b/libstdc++-v3/src/system_error.cc @@ -70,7 +70,9 @@ namespace const system_error_category system_category_instance; } -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION const error_category& system_category() throw() { return system_category_instance; } @@ -96,4 +98,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) error_code::default_error_condition() const { return category().default_error_condition(value()); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc index acc6c0385319..c164e8a01610 100644 --- a/libstdc++-v3/src/thread.cc +++ b/libstdc++-v3/src/thread.cc @@ -1,6 +1,6 @@ // thread -*- C++ -*- -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -28,8 +28,8 @@ #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std _GLIBCXX_VISIBILITY(default) +{ namespace { extern "C" void* @@ -52,6 +52,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } +_GLIBCXX_BEGIN_NAMESPACE_VERSION + void thread::join() { @@ -96,6 +98,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/src/tree.cc b/libstdc++-v3/src/tree.cc index b5f229f4da55..0a7f6f9e4859 100644 --- a/libstdc++-v3/src/tree.cc +++ b/libstdc++-v3/src/tree.cc @@ -52,7 +52,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION _Rb_tree_node_base* _Rb_tree_increment(_Rb_tree_node_base* __x) throw () @@ -448,4 +450,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __sum; } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/src/valarray-inst.cc b/libstdc++-v3/src/valarray-inst.cc index 821dafcf9ce5..4d21ab171bad 100644 --- a/libstdc++-v3/src/valarray-inst.cc +++ b/libstdc++-v3/src/valarray-inst.cc @@ -29,7 +29,9 @@ #include -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION // Some explicit instantiations. template void @@ -103,4 +105,5 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_index(__l.size() == 0 ? 0 : __valarray_product(__l)) { __gslice_to_index(__o, __l, __s, _M_index); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc index 0fea060d7e52..617d76b80da1 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free -// Software Foundation +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011 +// Free Software Foundation // // 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 @@ -47,6 +47,6 @@ main() test01(); return 0; } -// { dg-error "::auto_ptr|no known conversion" "" { target *-*-* } 134 } -// { dg-error "note" "" { target *-*-* } 152 } -// { dg-error "::auto_ptr|no known conversion" "" { target *-*-* } 262 } +// { dg-error "::auto_ptr|no known conversion" "" { target *-*-* } 136 } +// { dg-error "note" "" { target *-*-* } 154 } +// { dg-error "::auto_ptr|no known conversion" "" { target *-*-* } 264 } diff --git a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc index 32f2d23f9add..9113c031be0d 100644 --- a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc +++ b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc @@ -2,7 +2,7 @@ // { dg-do compile } // 2009-11-12 Paolo Carlini // -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 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 @@ -19,7 +19,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-error "static assertion failed" "" { target *-*-* } 1132 } +// { dg-error "static assertion failed" "" { target *-*-* } 1134 } #include diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc index e33c5131f4aa..5965f03b1b39 100644 --- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc +++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg1.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // 2008-07-31 Chris Fairles -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -31,5 +31,5 @@ void test01() test_type d; } -// { dg-error "rep cannot be a duration" "" { target *-*-* } 218 } +// { dg-error "rep cannot be a duration" "" { target *-*-* } 226 } // { dg-error "instantiated from here" "" { target *-*-* } 31 } diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc index a865effb6dde..d84ab9e8cf50 100644 --- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc +++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg2.cc @@ -32,6 +32,6 @@ void test01() test_type d; } -// { dg-error "must be a specialization of ratio" "" { target *-*-* } 219 } +// { dg-error "must be a specialization of ratio" "" { target *-*-* } 227 } // { dg-error "instantiated from here" "" { target *-*-* } 32 } // { dg-excess-errors "In instantiation of" } diff --git a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc index c168357edd17..7c73bf996ddd 100644 --- a/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc +++ b/libstdc++-v3/testsuite/20_util/duration/requirements/typedefs_neg3.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // 2008-07-31 Chris Fairles -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010, 2011 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 @@ -33,5 +33,5 @@ void test01() test_type d; } -// { dg-error "period must be positive" "" { target *-*-* } 221 } +// { dg-error "period must be positive" "" { target *-*-* } 229 } // { dg-error "instantiated from here" "" { target *-*-* } 33 } diff --git a/libstdc++-v3/testsuite/20_util/forward/c_neg.cc b/libstdc++-v3/testsuite/20_util/forward/c_neg.cc index 919fe56cc274..50bfbf02850f 100644 --- a/libstdc++-v3/testsuite/20_util/forward/c_neg.cc +++ b/libstdc++-v3/testsuite/20_util/forward/c_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -18,7 +18,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-error "static assertion failed" "" { target *-*-* } 64 } +// { dg-error "static assertion failed" "" { target *-*-* } 69 } #include diff --git a/libstdc++-v3/testsuite/20_util/forward/f_neg.cc b/libstdc++-v3/testsuite/20_util/forward/f_neg.cc index 6b5a365efd1a..418a469dfd96 100644 --- a/libstdc++-v3/testsuite/20_util/forward/f_neg.cc +++ b/libstdc++-v3/testsuite/20_util/forward/f_neg.cc @@ -18,7 +18,7 @@ // with this library; see the file COPYING3. If not see // . -// { dg-error "static assertion failed" "" { target *-*-* } 64 } +// { dg-error "static assertion failed" "" { target *-*-* } 69 } #include diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc index 205da120f908..5179abfeb083 100644 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc @@ -48,5 +48,5 @@ void test01() // { dg-error "instantiated from here" "" { target *-*-* } 40 } // { dg-error "instantiated from here" "" { target *-*-* } 42 } -// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1095 } -// { dg-error "declaration of" "" { target *-*-* } 1059 } +// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1097 } +// { dg-error "declaration of" "" { target *-*-* } 1061 } diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc index c6e00075178b..1a1724d74b7b 100644 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc @@ -3,7 +3,7 @@ // 2007-05-03 Benjamin Kosnik // -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011 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 @@ -48,5 +48,5 @@ void test01() // { dg-error "instantiated from here" "" { target *-*-* } 40 } // { dg-error "instantiated from here" "" { target *-*-* } 42 } -// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1018 } -// { dg-error "declaration of" "" { target *-*-* } 982 } +// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1020 } +// { dg-error "declaration of" "" { target *-*-* } 984 } diff --git a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc index e7f448deca19..51dcdac4b2d9 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc @@ -2,7 +2,7 @@ // { dg-options "-std=gnu++0x" } // { dg-require-cstdint "" } -// Copyright (C) 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -49,9 +49,9 @@ test04() // { dg-error "instantiated from here" "" { target *-*-* } 34 } // { dg-error "instantiated from here" "" { target *-*-* } 40 } // { dg-error "instantiated from here" "" { target *-*-* } 46 } -// { dg-error "denominator cannot be zero" "" { target *-*-* } 153 } -// { dg-error "out of range" "" { target *-*-* } 154 } -// { dg-error "non-constant expression" "" { target *-*-* } 59 } -// { dg-error "overflow in constant expression" "" { target *-*-* } 59 } -// { dg-error "not a member" "" { target *-*-* } 162 } -// { dg-error "not a valid template argument" "" { target *-*-* } 164 } +// { dg-error "denominator cannot be zero" "" { target *-*-* } 155 } +// { dg-error "out of range" "" { target *-*-* } 156 } +// { dg-error "non-constant expression" "" { target *-*-* } 61 } +// { dg-error "overflow in constant expression" "" { target *-*-* } 61 } +// { dg-error "not a member" "" { target *-*-* } 164 } +// { dg-error "not a valid template argument" "" { target *-*-* } 166 } diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc index 214ae7e190eb..b7076dfc57a3 100644 --- a/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc +++ b/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc @@ -4,7 +4,7 @@ // 2008-07-03 Chris Fairles -// Copyright (C) 2008, 2009 Free Software Foundation +// Copyright (C) 2008, 2009, 2011 Free Software Foundation // // 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 @@ -39,8 +39,8 @@ test02() // { dg-error "instantiated from here" "" { target *-*-* } 29 } // { dg-error "instantiated from here" "" { target *-*-* } 35 } // { dg-error "instantiated from here" "" { target *-*-* } 36 } -// { dg-error "overflow in addition" "" { target *-*-* } 130 } -// { dg-error "overflow in multiplication" "" { target *-*-* } 98 } +// { dg-error "overflow in addition" "" { target *-*-* } 132 } +// { dg-error "overflow in multiplication" "" { target *-*-* } 104 } // { dg-error "overflow in multiplication" "" { target *-*-* } 100 } // { dg-error "overflow in multiplication" "" { target *-*-* } 102 } // { dg-excess-errors "In instantiation of" } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc index 837c668efe9e..c594461a4b90 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc @@ -1,7 +1,7 @@ // { dg-options "-std=gnu++0x" } // { dg-do compile } -// Copyright (C) 2010 Free Software Foundation +// Copyright (C) 2010, 2011 Free Software Foundation // // 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 @@ -32,9 +32,9 @@ void test01() { X* px = 0; std::shared_ptr p1(px); // { dg-error "here" } - // { dg-error "incomplete" "" { target *-*-* } 763 } + // { dg-error "incomplete" "" { target *-*-* } 765 } std::shared_ptr p9(ap()); // { dg-error "here" } - // { dg-error "incomplete" "" { target *-*-* } 855 } + // { dg-error "incomplete" "" { target *-*-* } 857 } } diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc index 357e32f97e9b..098dbfd89df5 100644 --- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc +++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc @@ -1,7 +1,7 @@ // { dg-options "-std=gnu++0x " } // { dg-do compile } -// Copyright (C) 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -42,12 +42,12 @@ main() return 0; } -// { dg-warning "note" "" { target *-*-* } 352 } -// { dg-warning "note" "" { target *-*-* } 1083 } -// { dg-warning "note" "" { target *-*-* } 465 } -// { dg-warning "note" "" { target *-*-* } 585 } -// { dg-warning "note" "" { target *-*-* } 1048 } -// { dg-warning "note" "" { target *-*-* } 1042 } -// { dg-warning "note" "" { target *-*-* } 340 } -// { dg-warning "note" "" { target *-*-* } 290 } -// { dg-warning "note" "" { target *-*-* } 205 } +// { dg-warning "note" "" { target *-*-* } 354 } +// { dg-warning "note" "" { target *-*-* } 1085 } +// { dg-warning "note" "" { target *-*-* } 467 } +// { dg-warning "note" "" { target *-*-* } 587 } +// { dg-warning "note" "" { target *-*-* } 1050 } +// { dg-warning "note" "" { target *-*-* } 1056 } +// { dg-warning "note" "" { target *-*-* } 342 } +// { dg-warning "note" "" { target *-*-* } 292 } +// { dg-warning "note" "" { target *-*-* } 207 } diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc index bd6ee6363051..ecd115e3aafe 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1659 } +// { dg-error "no matching" "" { target *-*-* } 1661 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc index 21c9d4e4f3c9..4de01c826091 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1592 } +// { dg-error "no matching" "" { target *-*-* } 1594 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc index 08f54d680187..78eeb8dbc6c4 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1592 } +// { dg-error "no matching" "" { target *-*-* } 1594 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc index a5bd6065c1c9..f29152cb7c8e 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1743 } +// { dg-error "no matching" "" { target *-*-* } 1745 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc index fec4fff46ace..4798e93e077b 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc @@ -37,7 +37,7 @@ test01() VERIFY(fld.empty() == true); #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) - using std::_GLIBCXX_STD_D::_Fwd_list_node; + using std::_GLIBCXX_STD_C::_Fwd_list_node; #else using std::_Fwd_list_node; #endif diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc index fe426e0a8031..e87fa60c3fa0 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1204 } +// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-excess-errors "" } // Copyright (C) 2009, 2010 Free Software Foundation diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc index d4cd3d71f3cc..5da159c13506 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1204 } +// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-excess-errors "" } -// Copyright (C) 2009, 2010 Free Software Foundation +// Copyright (C) 2009, 2010, 2011 Free Software Foundation // // 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 diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc index ac07af20d6c6..785fe513642e 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1204 } +// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-excess-errors "" } -// Copyright (C) 2009, 2010 Free Software Foundation +// Copyright (C) 2009, 2010, 2011 Free Software Foundation // // 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 diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc index 06016c792cec..aabc8b8f7157 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc @@ -1,9 +1,9 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1204 } +// { dg-error "no matching" "" { target *-*-* } 1206 } // { dg-excess-errors "" } -// Copyright (C) 2009, 2010 Free Software Foundation +// Copyright (C) 2009, 2010, 2011 Free Software Foundation // // 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 diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc index d51fc3bb6628..f2f51f22352e 100644 --- a/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc +++ b/libstdc++-v3/testsuite/23_containers/list/capacity/29134.cc @@ -31,7 +31,7 @@ void test01() #if ! defined _GLIBCXX_DEBUG && ! defined _GLIBCXX_PROFILE using std::_List_node; #else - using std::_GLIBCXX_STD_D::_List_node; + using std::_GLIBCXX_STD_C::_List_node; #endif VERIFY( l.max_size() == std::allocator<_List_node >().max_size() ); diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc index 2446157597fd..96a14e4dade3 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1478 } +// { dg-error "no matching" "" { target *-*-* } 1491 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc index cbac8e80cbf0..cc10877fab48 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1434 } +// { dg-error "no matching" "" { target *-*-* } 1447 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc index 232bd042ddba..acc64e4afd1c 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1434 } +// { dg-error "no matching" "" { target *-*-* } 1447 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc index aefb1f583fd6..8df0ac528c0d 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1434 } +// { dg-error "no matching" "" { target *-*-* } 1447 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc index 4b45d79fc1cd..cd5a6a424835 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc @@ -30,9 +30,9 @@ void test01() using std::numeric_limits; #ifdef _GLIBCXX_DEBUG - using std::_GLIBCXX_STD_D::_S_word_bit; + using std::_GLIBCXX_STD_C::_S_word_bit; #elif defined(_GLIBCXX_PROFILE) - using std::_GLIBCXX_STD_PR::_S_word_bit; + using std::_GLIBCXX_STD_C::_S_word_bit; #else using std::_S_word_bit; #endif diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc index 40d09dbf752b..52f8ddf0f44b 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/modifiers/insert/31370.cc @@ -24,9 +24,9 @@ #include #ifdef _GLIBCXX_DEBUG - using std::_GLIBCXX_STD_D::_S_word_bit; + using std::_GLIBCXX_STD_C::_S_word_bit; #elif defined(_GLIBCXX_PROFILE) - using std::_GLIBCXX_STD_PR::_S_word_bit; + using std::_GLIBCXX_STD_C::_S_word_bit; #else using std::_S_word_bit; #endif diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc index 6925c1776a44..f13dd0163832 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1148 } +// { dg-error "no matching" "" { target *-*-* } 1150 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc index 662bf169b238..471d4589bf34 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1078 } +// { dg-error "no matching" "" { target *-*-* } 1080 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc index fe2a2b25475e..8d1b72c63ee7 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1078 } +// { dg-error "no matching" "" { target *-*-* } 1080 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc index 9869af131dfa..2f10c55036dc 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc @@ -1,6 +1,6 @@ // 2007-04-27 Paolo Carlini -// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation // // 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 @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1189 } +// { dg-error "no matching" "" { target *-*-* } 1191 } // { dg-excess-errors "" } #include diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/35588.cc b/libstdc++-v3/testsuite/25_algorithms/sort/35588.cc index 33078817da69..c16b96dfd7a2 100644 --- a/libstdc++-v3/testsuite/25_algorithms/sort/35588.cc +++ b/libstdc++-v3/testsuite/25_algorithms/sort/35588.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2011 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 @@ -24,7 +24,7 @@ int main() { using namespace std; using namespace tr1; - using namespace placeholders; + using namespace std::tr1::placeholders; int t[10]; sort(t, t+10, bind(less(), _1, _2)); diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc index 8e97d329942b..4bbe5b11925a 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -// Foundation, Inc. +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// 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 @@ -34,5 +34,5 @@ void test01() } // { dg-error "synthesized" "" { target *-*-* } 33 } // { dg-error "within this context" "" { target *-*-* } 26 } -// { dg-error "is private" "" { target *-*-* } 789 } +// { dg-error "is private" "" { target *-*-* } 791 } // { dg-error "operator=" "" { target *-*-* } 0 } diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc index 6e527cdc2627..6f453736e87b 100644 --- a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -// Foundation, Inc. +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// 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 @@ -34,5 +34,5 @@ void test02() } // { dg-error "within this context" "" { target *-*-* } 26 } // { dg-error "synthesized" "" { target *-*-* } 33 } -// { dg-error "is private" "" { target *-*-* } 786 } +// { dg-error "is private" "" { target *-*-* } 788 } // { dg-error "copy constructor" "" { target *-*-* } 0 } diff --git a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc index b53dc40e5b42..b81418f7293b 100644 --- a/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc +++ b/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc @@ -22,4 +22,4 @@ #include -// { dg-error "Cannot use -D_GLIBCXX_PROFILE with " "" { target *-*-* } 220 } +// { dg-error "multiple inlined namespaces" "" { target *-*-* } 243 } diff --git a/libstdc++-v3/testsuite/ext/profile/profiler_algos.cc b/libstdc++-v3/testsuite/ext/profile/profiler_algos.cc index 37dfbfee27c7..fb9c8080d807 100644 --- a/libstdc++-v3/testsuite/ext/profile/profiler_algos.cc +++ b/libstdc++-v3/testsuite/ext/profile/profiler_algos.cc @@ -4,7 +4,7 @@ // Unit tests for profile/impl/profile_algos.h. -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 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 @@ -24,7 +24,7 @@ #include #include -using std::__norm::vector; +using std::_GLIBCXX_STD_C::vector; enum Failure { diff --git a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc index de72e141c0c6..98202bdb8675 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } // -*- C++ -*- -// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 2009, 2011 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 @@ -35,4 +35,4 @@ int main() } // { dg-error "instantiated from" "" { target *-*-* } 28 } -// { dg-error "no type" "" { target *-*-* } 67 } +// { dg-error "no type" "" { target *-*-* } 69 } diff --git a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc index ba3dd763bd51..f08c879e5a88 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } // -*- C++ -*- -// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 2009, 2011 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 @@ -36,4 +36,4 @@ int main() } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } -// { dg-error "declaration of" "" { target *-*-* } 61 } +// { dg-error "declaration of" "" { target *-*-* } 63 } diff --git a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc index 847beda5bc73..486baad93b73 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } // -*- C++ -*- -// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 2009, 2011 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 @@ -35,4 +35,4 @@ int main() } // { dg-error "instantiated from" "" { target *-*-* } 28 } -// { dg-error "no type" "" { target *-*-* } 110 } +// { dg-error "no type" "" { target *-*-* } 112 } diff --git a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc index 2347a14c0e72..1ad1d93bfb9b 100644 --- a/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc +++ b/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc @@ -1,7 +1,7 @@ // { dg-do compile } // -*- C++ -*- -// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 2009, 2011 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 @@ -36,4 +36,4 @@ int main() } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } -// { dg-error "declaration of" "" { target *-*-* } 104 } +// { dg-error "declaration of" "" { target *-*-* } 106 } diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc index 73a0f9e276ba..0b86e8eeb922 100644 --- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc +++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc @@ -30,9 +30,9 @@ void test01() { X* px = 0; std::tr1::shared_ptr p1(px); // { dg-error "here" } - // { dg-error "incomplete" "" { target *-*-* } 561 } + // { dg-error "incomplete" "" { target *-*-* } 563 } std::tr1::shared_ptr p9(ap()); // { dg-error "here" } - // { dg-error "incomplete" "" { target *-*-* } 600 } + // { dg-error "incomplete" "" { target *-*-* } 602 } }