diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-22 15:30:59 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-22 15:30:59 +0000 |
commit | a562641c0dfbee57550a4b4d99f82acd3da99503 (patch) | |
tree | 03bbe2fa5c59a96c823f83b08089d54bbe0fe85b /libstdc++-v3 | |
parent | 3edafd46128542d863667585f9a89284fdbd1af2 (diff) | |
download | gcc-a562641c0dfbee57550a4b4d99f82acd3da99503.tar.gz |
2011-01-22 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 169126
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@169127 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
39 files changed, 391 insertions, 271 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 10896916821..be05727fd9e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,63 @@ +2011-01-21 Benjamin Kosnik <bkoz@redhat.com> + + * include/bits/c++config (_GLIBCXX_EXPORT_TEMPLATE): Remove. + * include/debug/safe_sequence.h: Same. + * include/debug/safe_iterator.h: Same. + * include/std/forward_list: Same. + * include/std/deque: Same. + * include/std/list: Same. + * include/std/random: Same. + * include/std/streambuf: Same. + * include/std/fstream: Same. + * include/std/istream: Same. + * include/std/string: Same. + * include/std/ostream: Same. + * include/std/sstream: Same. + * include/ext/vstring.h: Same. + * include/bits/basic_ios.h: Same. + * include/bits/locale_classes.h: Same. + * include/bits/locale_facets.h: Same. + * include/bits/valarray_array.h: Same. + * include/bits/locale_facets_nonio.h: Same. + * include/tr1/random: Same. + +2011-01-20 Jonathan Wakely <jwakely.gcc@gmail.com> + + * doc/xml/manual/diagnostics.xml: Replace note about C++0x concepts. + +2011-01-20 Benjamin Kosnik <bkoz@redhat.com> + + PR libstdc++/36104 part three + * src/hashtable_c++0x.cc: Adjust namespace macros. + * testsuite/util/testsuite_rvalref.h: Don't forward declare hash. + * config/abi/pre/gnu-versioned-namespace.ver: Update. + +2011-01-20 Benjamin Kosnik <bkoz@redhat.com> + + * include/ext/pb_ds/detail/resize_policy/ + hash_load_check_resize_trigger_imp.hpp: Adjust assert condition. + * include/ext/pb_ds/detail/pat_trie_/ + constructors_destructor_fn_imps.hpp: Same. + * include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp: Format. + * include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp: Same. + * include/ext/pb_ds/detail/debug_map_base.hpp: Use never_adjustor. + + * testsuite/ext/pb_ds/regression/hash_data_map_rand.cc: Adjust + iterations downward when testing in debug mode. + * testsuite/ext/pb_ds/regression/trie_data_map_rand.cc: Same. + * testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc: Same. + * testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc: Same. + * testsuite/ext/pb_ds/regression/tree_data_map_rand.cc: Same. + * testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc: Same. + * testsuite/ext/pb_ds/example/hash_illegal_resize.cc: Use SIZE, + reduce in debug mode. + +2011-01-19 Benjamin Kosnik <bkoz@redhat.com> + + PR libstdc++/36104 part two + * include/bits/hashtable.h: Revert to non-nested macro usage. + * include/bits/hashtable_policy.h: Same. + 2011-01-19 Graham Reed <greed@pobox.com> PR libstdc++/47354 diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver index be4c5895914..dfb1345b0ce 100644 --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver @@ -1,6 +1,7 @@ ## Linker script for GNU namespace versioning. ## -## Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +## Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009, 2011 +## Free Software Foundation, Inc. ## ## This file is part of the libstdc++ version 3 distribution. ## @@ -19,7 +20,7 @@ ## with this library; see the file COPYING3. If not see ## <http://www.gnu.org/licenses/>. -GLIBCXX_3.7 { +GLIBCXX_5.0 { global: @@ -30,6 +31,15 @@ GLIBCXX_3.7 { std::* }; + # locale + _ZNSt2_69has_facetINS_*; + + # hash + _ZNSt2_68__detail12__prime_listE; + + # thread/mutex/condition_variable/future + __once_proxy; + # operator new(size_t) _Znw[jm]; # operator new(size_t, std::nothrow_t const&) @@ -87,7 +97,12 @@ GLIBCXX_3.7 { _ZN9__gnu_cxx2_69free_list6_M_getE[jm]; _ZN9__gnu_cxx2_69free_list8_M_clearEv; + # __gnu_cxx::stdio_sync_filebuf + _ZTVN9__gnu_cxx2_618stdio_sync_filebufI[cw]St2_611char_traitsI[cw]EEE; + _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; @@ -106,8 +121,8 @@ GLIBCXX_3.7 { _ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv; _ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_; - _ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb; - _ZN11__gnu_debug19_Safe_iterator_base16_M_attach_singleEPNS_19_Safe_sequence_baseEb; + _ZN11__gnu_debug19_Safe_iterator_base9_M_attach*; + _ZN11__gnu_debug19_Safe_iterator_base16_M_attach_single*; _ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv; _ZN11__gnu_debug19_Safe_iterator_base16_M_detach_singleEv; _ZN11__gnu_debug19_Safe_iterator_base12_M_get_mutexEv; @@ -127,7 +142,7 @@ GLIBCXX_3.7 { # Symbols in the support library (libsupc++) have their own tag. -CXXABI_1.7 { +CXXABI_2.0 { global: __cxa_allocate_exception; @@ -165,6 +180,41 @@ CXXABI_1.7 { __gxx_personality_sj0; __dynamic_cast; + # std::exception_ptr + _ZNSt15__exception_ptr13exception_ptrC1Ev; + _ZNSt15__exception_ptr13exception_ptrC2Ev; + _ZNSt15__exception_ptr13exception_ptrC1ERKS0_; + _ZNSt15__exception_ptr13exception_ptrC2ERKS0_; + _ZNSt15__exception_ptr13exception_ptrC1EMS0_FvvE; + _ZNSt15__exception_ptr13exception_ptrC2EMS0_FvvE; + _ZNSt15__exception_ptr13exception_ptrD1Ev; + _ZNSt15__exception_ptr13exception_ptrD2Ev; + _ZNSt15__exception_ptr13exception_ptraSERKS0_; + _ZNKSt15__exception_ptr13exception_ptrcvMS0_FvvEEv; + _ZNKSt15__exception_ptr13exception_ptrntEv; + _ZNKSt15__exception_ptr13exception_ptr20__cxa_exception_typeEv; + _ZNSt15__exception_ptr13exception_ptr4swapERS0_; + _ZNSt15__exception_ptreqERKNS_13exception_ptrES2_; + _ZNSt15__exception_ptrneERKNS_13exception_ptrES2_; + + _ZSt17current_exceptionv; + _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE; + + # std::bad_function_call. + _ZNSt17bad_function_callD*; + _ZTISt17bad_function_call; + _ZTSSt17bad_function_call; + _ZTVSt17bad_function_call; + + # Default function. + _ZSt11_Hash_bytesPKv*; + + # FNV hash. + _ZSt15_Fnv_hash_bytesPKv*; + + # __gnu_cxx::_verbose_terminate_handler() + _ZN9__gnu_cxx2_627__verbose_terminate_handlerEv; + # *_type_info classes, ctor and dtor _ZN10__cxxabiv117__array_type_info*; _ZN10__cxxabiv117__class_type_info*; @@ -186,18 +236,6 @@ CXXABI_1.7 { _ZNK10__cxxabiv120__si_class_type_info*; _ZNK10__cxxabiv121__vmi_class_type_info*; - # virtual table - _ZTVN10__cxxabiv117__array_type_infoE; - _ZTVN10__cxxabiv117__class_type_infoE; - _ZTVN10__cxxabiv116__enum_type_infoE; - _ZTVN10__cxxabiv120__function_type_infoE; - _ZTVN10__cxxabiv123__fundamental_type_infoE; - _ZTVN10__cxxabiv117__pbase_type_infoE; - _ZTVN10__cxxabiv129__pointer_to_member_type_infoE; - _ZTVN10__cxxabiv119__pointer_type_infoE; - _ZTVN10__cxxabiv120__si_class_type_infoE; - _ZTVN10__cxxabiv121__vmi_class_type_infoE; - # typeinfo structure _ZTI[a-z]; _ZTIP[a-z]; @@ -214,6 +252,8 @@ CXXABI_1.7 { _ZTIN10__cxxabiv121__vmi_class_type_infoE; _ZTIN10__cxxabiv115__forced_unwindE; _ZTIN10__cxxabiv119__foreign_exceptionE; + _ZTIN10__cxxabiv115__forced_unwindE; + _ZTIN10__cxxabiv119__foreign_exceptionE; # typeinfo name _ZTS[a-z]; @@ -230,8 +270,35 @@ CXXABI_1.7 { _ZTSN10__cxxabiv120__si_class_type_infoE; _ZTSN10__cxxabiv121__vmi_class_type_infoE; - # __gnu_cxx::_verbose_terminate_handler() - _ZN9__gnu_cxx2_627__verbose_terminate_handlerEv; + # typeinfo for char16_t and char32_t + _ZTIDs; + _ZTIPDs; + _ZTIPKDs; + _ZTIDi; + _ZTIPDi; + _ZTIPKDi; + + # typeinfo for decimal floating point types + _ZTID[fde]; + _ZTIPD[fde]; + _ZTIPKD[fde]; + + # typeinfo for decltype(nullptr) + _ZTIDn; + _ZTIPDn; + _ZTIPKDn; + + # virtual table + _ZTVN10__cxxabiv117__array_type_infoE; + _ZTVN10__cxxabiv117__class_type_infoE; + _ZTVN10__cxxabiv116__enum_type_infoE; + _ZTVN10__cxxabiv120__function_type_infoE; + _ZTVN10__cxxabiv123__fundamental_type_infoE; + _ZTVN10__cxxabiv117__pbase_type_infoE; + _ZTVN10__cxxabiv129__pointer_to_member_type_infoE; + _ZTVN10__cxxabiv119__pointer_type_infoE; + _ZTVN10__cxxabiv120__si_class_type_infoE; + _ZTVN10__cxxabiv121__vmi_class_type_infoE; local: *; diff --git a/libstdc++-v3/doc/xml/manual/diagnostics.xml b/libstdc++-v3/doc/xml/manual/diagnostics.xml index b9a7048716f..1a6a3f17dc2 100644 --- a/libstdc++-v3/doc/xml/manual/diagnostics.xml +++ b/libstdc++-v3/doc/xml/manual/diagnostics.xml @@ -95,7 +95,7 @@ </para> <para> The primary author of the checking code, Jeremy Siek, had already - started work on a replacement implementation. The new code has been + started work on a replacement implementation. The new code was formally reviewed and accepted into <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.boost.org/libs/concept_check/concept_check.htm">the Boost libraries</link>, and we are pleased to incorporate it into the @@ -116,10 +116,12 @@ </para> <para> - Please note that the upcoming C++ standard has first-class - support for template parameter constraints based on concepts in the core - language. This will obviate the need for the library-simulated concept - checking described above. + Please note that the checks are based on the requirements in the original + C++ standard, some of which have changed in the upcoming C++0x revision. + Additionally, some correct code might be rejected by the concept checks, + for example template argument types may need to be complete when used in + a template definition, rather than at the point of instantiation. + There are no plans to address these shortcomings. </para> </section> diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h index 71e7f28cdb6..6fd0653617b 100644 --- a/libstdc++-v3/include/bits/basic_ios.h +++ b/libstdc++-v3/include/bits/basic_ios.h @@ -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 @@ -467,8 +467,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE #include <bits/basic_ios.tcc> -#endif #endif /* _BASIC_IOS_H */ diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 7465f364d49..71774e82c27 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -359,10 +359,6 @@ namespace std #define _GLIBCXX_PSEUDO_VISIBILITY(V) #endif -// Allow use of "export template." This is currently not a feature -// that g++ supports. -// #define _GLIBCXX_EXPORT_TEMPLATE 1 - // 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 diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index 721d1228a7f..52f1b318d0e 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -35,7 +35,7 @@ #include <bits/hashtable_policy.h> -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +_GLIBCXX_BEGIN_NAMESPACE(std) // Class template _Hashtable, class definition. @@ -1229,6 +1229,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } -_GLIBCXX_END_NESTED_NAMESPACE // namespace std +_GLIBCXX_END_NAMESPACE // namespace std #endif // _HASHTABLE_H diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index e439dfaac8f..7b13719af30 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -31,7 +31,7 @@ #ifndef _HASHTABLE_POLICY_H #define _HASHTABLE_POLICY_H 1 -_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) +_GLIBCXX_BEGIN_NAMESPACE(std) namespace __detail { @@ -979,6 +979,6 @@ namespace __detail } } // namespace __detail -_GLIBCXX_END_NESTED_NAMESPACE // namespace std +_GLIBCXX_END_NAMESPACE // namespace std #endif // _HASHTABLE_POLICY_H diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index 4756ac573af..3cdb1b3705f 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -1,7 +1,7 @@ // Locale support -*- 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 @@ -817,8 +817,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE # include <bits/locale_classes.tcc> -#endif #endif diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index bb0ba26a9df..ec5a5188860 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -1,7 +1,7 @@ // Locale support -*- 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 @@ -2599,8 +2599,6 @@ _GLIBCXX_END_LDBL_NAMESPACE _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE # include <bits/locale_facets.tcc> -#endif #endif diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.h b/libstdc++-v3/include/bits/locale_facets_nonio.h index 6d6af2b659e..2c6a8f7cec7 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.h +++ b/libstdc++-v3/include/bits/locale_facets_nonio.h @@ -1,6 +1,6 @@ // Locale support -*- 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 @@ -1927,8 +1927,6 @@ _GLIBCXX_END_NAMESPACE // 22.2.1.5 Template class codecvt #include <bits/codecvt.h> -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/locale_facets_nonio.tcc> -#endif +#include <bits/locale_facets_nonio.tcc> #endif diff --git a/libstdc++-v3/include/bits/valarray_array.h b/libstdc++-v3/include/bits/valarray_array.h index ae148ef5b52..46d5987736d 100644 --- a/libstdc++-v3/include/bits/valarray_array.h +++ b/libstdc++-v3/include/bits/valarray_array.h @@ -1,7 +1,7 @@ // The template and inlines for the -*- C++ -*- internal _Array helper class. // 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 @@ -687,8 +687,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE # include <bits/valarray_array.tcc> -#endif #endif /* _ARRAY_H */ diff --git a/libstdc++-v3/include/debug/safe_iterator.h b/libstdc++-v3/include/debug/safe_iterator.h index 733a2c6a0a7..127c3ba72d4 100644 --- a/libstdc++-v3/include/debug/safe_iterator.h +++ b/libstdc++-v3/include/debug/safe_iterator.h @@ -1,6 +1,6 @@ // Safe iterator implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -684,8 +684,6 @@ namespace __gnu_debug { return _Siter_base<_Iterator>::_S_base(__it); } } // namespace __gnu_debug -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <debug/safe_iterator.tcc> -#endif +#include <debug/safe_iterator.tcc> #endif diff --git a/libstdc++-v3/include/debug/safe_sequence.h b/libstdc++-v3/include/debug/safe_sequence.h index 843c9b11710..cc1f4c10df2 100644 --- a/libstdc++-v3/include/debug/safe_sequence.h +++ b/libstdc++-v3/include/debug/safe_sequence.h @@ -1,6 +1,6 @@ // Safe sequence implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -130,8 +130,6 @@ namespace __gnu_debug }; } // namespace __gnu_debug -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <debug/safe_sequence.tcc> -#endif +#include <debug/safe_sequence.tcc> #endif diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp index 30f3a4854c2..a8426511908 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 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 terms @@ -66,7 +67,7 @@ clear() m_size = 0; _GLIBCXX_DEBUG_ONLY(assert_valid();) - } +} PB_DS_CLASS_T_DEC void @@ -74,7 +75,6 @@ PB_DS_CLASS_C_DEC:: erase_at(entry_pointer a_entries, size_type i, false_type) { a_entries[i]->~value_type(); - s_value_allocator.deallocate(a_entries[i], 1); } @@ -90,11 +90,12 @@ PB_DS_CLASS_C_DEC:: pop() { _GLIBCXX_DEBUG_ONLY(assert_valid();) - _GLIBCXX_DEBUG_ASSERT(!empty()); + _GLIBCXX_DEBUG_ASSERT(!empty()); erase_at(m_a_entries, 0, s_no_throw_copies_ind); - std::pop_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this)); + std::pop_heap(m_a_entries, m_a_entries + m_size, + static_cast<entry_cmp& >(*this)); resize_for_erase_if_needed(); @@ -102,7 +103,7 @@ pop() --m_size; _GLIBCXX_DEBUG_ONLY(assert_valid();) - } +} PB_DS_CLASS_T_DEC template<typename Pred> @@ -112,12 +113,7 @@ erase_if(Pred pred) { _GLIBCXX_DEBUG_ONLY(assert_valid();) - typedef - typename entry_pred< - value_type, - Pred, - simple_value, - Allocator>::type + typedef typename entry_pred<value_type, Pred, simple_value, Allocator>::type pred_t; const size_type left = partition(pred_t(pred)); @@ -149,11 +145,12 @@ erase_if(Pred pred) m_size = left; - std::make_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this)); + std::make_heap(m_a_entries, m_a_entries + m_size, + static_cast<entry_cmp& >(*this)); _GLIBCXX_DEBUG_ONLY(assert_valid();) - return ersd; + return ersd; } PB_DS_CLASS_T_DEC @@ -162,7 +159,7 @@ PB_DS_CLASS_C_DEC:: erase(point_iterator it) { _GLIBCXX_DEBUG_ONLY(assert_valid();) - _GLIBCXX_DEBUG_ASSERT(!empty()); + _GLIBCXX_DEBUG_ASSERT(!empty()); const size_type fix_pos = it.m_p_e - m_a_entries; @@ -181,7 +178,7 @@ erase(point_iterator it) fix(m_a_entries + fix_pos); _GLIBCXX_DEBUG_ONLY(assert_valid();) - } +} PB_DS_CLASS_T_DEC inline void @@ -231,16 +228,15 @@ partition(Pred pred) else if (pred(m_a_entries[right])) --right; else - { + { _GLIBCXX_DEBUG_ASSERT(left < right); std::swap(m_a_entries[left], m_a_entries[right]); ++left; --right; - } + } } return left; } - 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 ebe8dc8416f..39a12c5a1b1 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 @@ -33,7 +33,7 @@ // representation about the suitability of this software for any // purpose. It is provided "as is" without express or implied // warranty. - + /** * @file debug_map_base.hpp * Contains a debug-mode base for all maps. @@ -58,7 +58,7 @@ namespace __gnu_pbds // Need std::pair ostream extractor. template<typename _CharT, typename _Traits, typename _Tp1, typename _Tp2> inline std::basic_ostream<_CharT, _Traits>& - operator<<(std::basic_ostream<_CharT, _Traits>& __out, + operator<<(std::basic_ostream<_CharT, _Traits>& __out, const std::pair<_Tp1, _Tp2>& p) { return (__out << '(' << p.first << ',' << p.second << ')'); } @@ -72,11 +72,14 @@ namespace __gnu_pbds class debug_map_base { private: - typedef typename std::allocator< Key> key_allocator; - - typedef typename key_allocator::size_type size_type; - - typedef Const_Key_Reference const_key_reference; + typedef typename std::allocator<Key> key_allocator; + typedef typename key_allocator::size_type size_type; + typedef Const_Key_Reference const_key_reference; + typedef std::__norm::list<Key> 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> key_db_allocator; + typedef typename key_db_allocator::never_adjustor never_adjustor; protected: debug_map_base(); @@ -114,14 +117,8 @@ namespace __gnu_pbds join(PB_DS_CLASS_C_DEC& other); private: - typedef std::list< Key> key_set; - typedef typename key_set::iterator key_set_iterator; - typedef typename key_set::const_iterator const_key_set_iterator; - -#ifdef _GLIBCXX_DEBUG void assert_valid() const; -#endif const_key_set_iterator find(const_key_reference r_key) const; @@ -154,26 +151,24 @@ namespace __gnu_pbds insert_new(const_key_reference r_key) { _GLIBCXX_DEBUG_ONLY(assert_valid();) - // XXX FIXME: Adapt for __gnu_cxx::throw_allocator_random. - //__gnu_cxx::throw_allocator<char> alloc; - // const double orig_throw_prob = alloc.get_probability(); - // alloc.set_probability(0); + if (find(r_key) != m_key_set.end()) { - std::cerr << "insert_new" << r_key << std::endl; - std::abort(); + std::cerr << "insert_new key already present " << r_key << std::endl; + std::abort; } + never_adjustor never; __try { m_key_set.push_back(r_key); } __catch(...) { - std::cerr << "insert_new" << r_key << std::endl; + std::cerr << "insert_new " << r_key << std::endl; std::abort(); } - // alloc.set_probability(orig_throw_prob); + _GLIBCXX_DEBUG_ONLY(assert_valid();) } @@ -210,10 +205,10 @@ namespace __gnu_pbds { _GLIBCXX_DEBUG_ONLY(assert_valid();) if (find(r_key) == m_key_set.end()) - { - std::cerr << "check_key_exists" << r_key << std::endl; - std::abort(); - } + { + std::cerr << "check_key_exists " << r_key << std::endl; + std::abort(); + } _GLIBCXX_DEBUG_ONLY(assert_valid();) } @@ -224,12 +219,12 @@ namespace __gnu_pbds { _GLIBCXX_DEBUG_ONLY(assert_valid();) if (find(r_key) != m_key_set.end()) - { + { using std::cerr; using std::endl; - cerr << "check_key_does_not_exist" << r_key << endl; - std::abort(); - } + cerr << "check_key_does_not_exist " << r_key << endl; + std::abort(); + } } PB_DS_CLASS_T_DEC @@ -241,7 +236,7 @@ namespace __gnu_pbds const size_type key_set_size = m_key_set.size(); if (size != key_set_size) { - std::cerr << "check_size " << size + std::cerr << "check_size " << size << " " << key_set_size << std::endl; std::abort(); } @@ -267,7 +262,7 @@ namespace __gnu_pbds typedef const_key_set_iterator iterator_type; for (iterator_type it = m_key_set.begin(); it != m_key_set.end(); ++it) if (m_eq(*it, r_key)) - return it; + return it; return m_key_set.end(); } @@ -281,14 +276,13 @@ namespace __gnu_pbds while (it != m_key_set.end()) { if (m_eq(*it, r_key)) - return it; + return it; ++it; } return it; _GLIBCXX_DEBUG_ONLY(assert_valid();) } -#ifdef _GLIBCXX_DEBUG PB_DS_CLASS_T_DEC void PB_DS_CLASS_C_DEC:: @@ -308,7 +302,6 @@ namespace __gnu_pbds ++prime_it; } } -#endif PB_DS_CLASS_T_DEC template<typename Cmp_Fn> @@ -316,21 +309,16 @@ namespace __gnu_pbds PB_DS_CLASS_C_DEC:: split(const_key_reference r_key, Cmp_Fn cmp_fn, PB_DS_CLASS_C_DEC& other) { - // XXX FIXME: Adapt for __gnu_cxx::throw_allocator_random. - // __gnu_cxx::throw_allocator<char> alloc; - // const double orig_throw_prob = alloc.get_probability(); - // alloc.set_probability(0); other.clear(); key_set_iterator it = m_key_set.begin(); while (it != m_key_set.end()) - if (cmp_fn(r_key, * it)) + if (cmp_fn(r_key, * it)) { - other.insert_new(*it); - it = m_key_set.erase(it); + other.insert_new(*it); + it = m_key_set.erase(it); } - else + else ++it; - // alloc.set_probability(orig_throw_prob); } PB_DS_CLASS_T_DEC @@ -338,10 +326,6 @@ namespace __gnu_pbds PB_DS_CLASS_C_DEC:: join(PB_DS_CLASS_C_DEC& other) { - // XXX FIXME: Adapt for __gnu_cxx::throw_allocator_random. - // __gnu_cxx::throw_allocator<char> alloc; - // const double orig_throw_prob = alloc.get_probability(); - // alloc.set_probability(0); key_set_iterator it = other.m_key_set.begin(); while (it != other.m_key_set.end()) { @@ -349,7 +333,6 @@ namespace __gnu_pbds it = other.m_key_set.erase(it); } _GLIBCXX_DEBUG_ASSERT(other.m_key_set.empty()); - // alloc.set_probability(orig_throw_prob); } #undef PB_DS_CLASS_T_DEC @@ -358,7 +341,6 @@ namespace __gnu_pbds } // namespace detail } // namespace __gnu_pbds -#endif - -#endif +#endif +#endif diff --git a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp index 9b17f9a9414..66f4ed66773 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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 @@ -46,7 +46,6 @@ PB_DS_CLASS_C_DEC:: assert_valid() const { std::cout << "av1" << std::endl; - if (m_a_values == 0 || m_end_it == 0 || m_size == 0) _GLIBCXX_DEBUG_ASSERT(m_a_values == 0 && m_end_it == 0 && m_size == 0); @@ -63,7 +62,7 @@ assert_iterators() const debug_base::check_size(m_size); size_type iterated_num = 0; const_iterator prev_it = end(); - _GLIBCXX_DEBUG_ASSERT( m_end_it == m_a_values + m_size); + _GLIBCXX_DEBUG_ASSERT(m_end_it == m_a_values + m_size); for (const_iterator it = begin(); it != end(); ++it) { ++iterated_num; diff --git a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp index 668a785aeaa..17f7c55d404 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp @@ -77,7 +77,7 @@ PB_DS_CLASS_C_DEC:: PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : #ifdef _GLIBCXX_DEBUG debug_base(other), -#endif +#endif synth_e_access_traits(other), node_update(other), m_p_head(s_head_allocator.allocate(1)), @@ -88,8 +88,8 @@ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) : _GLIBCXX_DEBUG_ONLY(other.assert_valid();) if (other.m_p_head->m_p_parent == 0) { - _GLIBCXX_DEBUG_ONLY(assert_valid();) - return; + _GLIBCXX_DEBUG_ONLY(assert_valid();) + return; } __try { @@ -205,7 +205,7 @@ recursive_copy_node(const_node_pointer p_other_nd) pref_begin(a_p_children[0])); --child_i; - _GLIBCXX_DEBUG_ASSERT(child_i > 1); + _GLIBCXX_DEBUG_ASSERT(child_i >= 1); do p_ret->add_child(a_p_children[child_i], pref_begin(a_p_children[child_i]), pref_end(a_p_children[child_i]), this); diff --git a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp index 3403b097629..1418bbe4555 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 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 terms @@ -40,7 +41,7 @@ PB_DS_CLASS_T_DEC PB_DS_CLASS_C_DEC:: -hash_load_check_resize_trigger(float load_min, float load_max) +hash_load_check_resize_trigger(float load_min, float load_max) : m_load_min(load_min), m_load_max(load_max), m_next_shrink_size(0), m_next_grow_size(0), m_resize_needed(false) { _GLIBCXX_DEBUG_ONLY(assert_valid();) } @@ -151,13 +152,13 @@ notify_resized(size_type new_size) m_next_shrink_size = size_type(m_load_min * new_size); #ifdef PB_DS_HT_MAP_RESIZE_TRACE_ - std::cerr << "hlcrt::notify_resized " << - static_cast<unsigned long>(new_size) << " " << - static_cast<unsigned long>(m_load_min) << " " << - static_cast<unsigned long>(m_load_max) << " " << - static_cast<unsigned long>(m_next_shrink_size) << " " << - static_cast<unsigned long>(m_next_grow_size) << " " << std::endl; -#endif + std::cerr << "hlcrt::notify_resized " << std::endl + << "1 " << new_size << std::endl + << "2 " << m_load_min << std::endl + << "3 " << m_load_max << std::endl + << "4 " << m_next_shrink_size << std::endl + << "5 " << m_next_grow_size << std::endl; +#endif _GLIBCXX_DEBUG_ONLY(assert_valid();) } @@ -170,34 +171,28 @@ notify_externally_resized(size_type new_size) m_resize_needed = false; size_type new_grow_size = size_type(m_load_max * new_size - 1); size_type new_shrink_size = size_type(m_load_min * new_size); + +#ifdef PB_DS_HT_MAP_RESIZE_TRACE_ + std::cerr << "hlcrt::notify_externally_resized " << std::endl + << "1 " << new_size << std::endl + << "2 " << m_load_min << std::endl + << "3 " << m_load_max << std::endl + << "4 " << m_next_shrink_size << std::endl + << "5 " << m_next_grow_size << std::endl + << "6 " << new_shrink_size << std::endl + << "7 " << new_grow_size << std::endl; +#endif + if (new_grow_size >= m_next_grow_size) { - _GLIBCXX_DEBUG_ASSERT(new_shrink_size > m_next_shrink_size); + _GLIBCXX_DEBUG_ASSERT(new_shrink_size >= m_next_shrink_size); m_next_grow_size = new_grow_size; - _GLIBCXX_DEBUG_ONLY(assert_valid();) - -#ifdef PB_DS_HT_MAP_RESIZE_TRACE_ - std::cerr << "hlcrt::notify_externally_resized1 " << - static_cast<unsigned long>(new_size) << " " << - static_cast<unsigned long>(m_load_min) << " " << - static_cast<unsigned long>(m_load_max) << " " << - static_cast<unsigned long>(m_next_shrink_size) << " " << - static_cast<unsigned long>(m_next_grow_size) << " " << std::endl; -#endif - return; } - - _GLIBCXX_DEBUG_ASSERT(new_shrink_size <= m_next_shrink_size); - m_next_shrink_size = new_shrink_size; - -#ifdef PB_DS_HT_MAP_RESIZE_TRACE_ - std::cerr << "hlcrt::notify_externally_resized2 " << - static_cast<unsigned long>(new_size) << " " << - static_cast<unsigned long>(m_load_min) << " " << - static_cast<unsigned long>(m_load_max) << " " << - static_cast<unsigned long>(m_next_shrink_size) << " " << - static_cast<unsigned long>(m_next_grow_size) << " " << std::endl; -#endif + else + { + _GLIBCXX_DEBUG_ASSERT(new_shrink_size <= m_next_shrink_size); + m_next_shrink_size = new_shrink_size; + } _GLIBCXX_DEBUG_ONLY(assert_valid();) } @@ -220,7 +215,7 @@ swap(PB_DS_CLASS_C_DEC& other) { _GLIBCXX_DEBUG_ONLY(assert_valid();) _GLIBCXX_DEBUG_ONLY(other.assert_valid();) - + size_base::swap(other); std::swap(m_load_min, other.m_load_min); std::swap(m_load_max, other.m_load_max); @@ -285,5 +280,4 @@ assert_valid() const _GLIBCXX_DEBUG_ASSERT(m_load_max > m_load_min); _GLIBCXX_DEBUG_ASSERT(m_next_grow_size >= m_next_shrink_size); } -#endif - +#endif diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 3700f3ee587..735e82c6418 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -1,6 +1,6 @@ // Versatile string -*- 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 @@ -2722,8 +2722,6 @@ _GLIBCXX_END_NAMESPACE #endif -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include "vstring.tcc" -#endif +#include "vstring.tcc" #endif /* _VSTRING_H */ diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque index 7af2b8e0866..7b0604bf908 100644 --- a/libstdc++-v3/include/std/deque +++ b/libstdc++-v3/include/std/deque @@ -1,6 +1,6 @@ // <deque> -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2001, 2002, 2003, 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 @@ -64,10 +64,7 @@ #include <bits/stl_uninitialized.h> #include <bits/stl_deque.h> #include <bits/range_access.h> - -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/deque.tcc> -#endif +#include <bits/deque.tcc> #ifdef _GLIBCXX_DEBUG # include <debug/deque> diff --git a/libstdc++-v3/include/std/forward_list b/libstdc++-v3/include/std/forward_list index 5378e545e2a..a1befcf4bdb 100644 --- a/libstdc++-v3/include/std/forward_list +++ b/libstdc++-v3/include/std/forward_list @@ -1,6 +1,6 @@ // <forward_list> -*- 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 @@ -37,10 +37,7 @@ #include <bits/forward_list.h> #include <bits/range_access.h> - -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/forward_list.tcc> -#endif +#include <bits/forward_list.tcc> #ifdef _GLIBCXX_DEBUG # include <debug/forward_list> diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream index ee31fc12b65..64623f5ba96 100644 --- a/libstdc++-v3/include/std/fstream +++ b/libstdc++-v3/include/std/fstream @@ -1,7 +1,7 @@ // File based streams -*- 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 @@ -915,8 +915,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/fstream.tcc> -#endif +#include <bits/fstream.tcc> #endif /* _GLIBCXX_FSTREAM */ diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream index df75718ae10..7b6d1520bf2 100644 --- a/libstdc++-v3/include/std/istream +++ b/libstdc++-v3/include/std/istream @@ -1,7 +1,7 @@ // Input streams -*- 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 @@ -850,8 +850,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/istream.tcc> -#endif +#include <bits/istream.tcc> #endif /* _GLIBCXX_ISTREAM */ diff --git a/libstdc++-v3/include/std/list b/libstdc++-v3/include/std/list index 177b9a9bae9..abcba859b0b 100644 --- a/libstdc++-v3/include/std/list +++ b/libstdc++-v3/include/std/list @@ -1,6 +1,6 @@ // <list> -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 +// Copyright (C) 2001, 2002, 2003, 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 @@ -60,12 +60,9 @@ #include <bits/stl_algobase.h> #include <bits/allocator.h> -#include <bits/stl_list.h> #include <bits/range_access.h> - -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/list.tcc> -#endif +#include <bits/stl_list.h> +#include <bits/list.tcc> #ifdef _GLIBCXX_DEBUG # include <debug/list> diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index 632a0e0414e..b25bdb0f5bc 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -1,7 +1,7 @@ // Output streams -*- 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 @@ -582,8 +582,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/ostream.tcc> -#endif +#include <bits/ostream.tcc> #endif /* _GLIBCXX_OSTREAM */ diff --git a/libstdc++-v3/include/std/random b/libstdc++-v3/include/std/random index 4d330eedd92..59aed8ef9d1 100644 --- a/libstdc++-v3/include/std/random +++ b/libstdc++-v3/include/std/random @@ -1,6 +1,6 @@ // <random> -*- 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 @@ -47,12 +47,8 @@ #ifdef _GLIBCXX_USE_C99_STDINT_TR1 #include <cstdint> // For uint_fast32_t, uint_fast64_t, uint_least32_t - #include <bits/random.h> - -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/random.tcc> -#endif +#include <bits/random.tcc> #endif // _GLIBCXX_USE_C99_STDINT_TR1 diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream index 7f9091c81fc..c30a5b74b16 100644 --- a/libstdc++-v3/include/std/sstream +++ b/libstdc++-v3/include/std/sstream @@ -1,7 +1,7 @@ // String based streams -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2008, 2009, 2010 Free Software Foundation, Inc. +// 2006, 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 @@ -569,8 +569,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/sstream.tcc> -#endif +#include <bits/sstream.tcc> #endif /* _GLIBCXX_SSTREAM */ diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf index e95a7523dca..9b05e04af21 100644 --- a/libstdc++-v3/include/std/streambuf +++ b/libstdc++-v3/include/std/streambuf @@ -1,7 +1,7 @@ // Stream buffer classes -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// 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 @@ -795,8 +795,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_END_NAMESPACE -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/streambuf.tcc> -#endif +#include <bits/streambuf.tcc> #endif /* _GLIBCXX_STREAMBUF */ diff --git a/libstdc++-v3/include/std/string b/libstdc++-v3/include/std/string index 8f6dd74f7ba..28933961a19 100644 --- a/libstdc++-v3/include/std/string +++ b/libstdc++-v3/include/std/string @@ -1,7 +1,7 @@ // Components for manipulating sequences of characters -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -// 2005, 2006, 2007, 2009, 2010 +// 2005, 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -50,11 +50,8 @@ #include <bits/stl_function.h> // For less #include <ext/numeric_traits.h> #include <bits/stl_algobase.h> -#include <bits/basic_string.h> #include <bits/range_access.h> - -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <bits/basic_string.tcc> -#endif +#include <bits/basic_string.h> +#include <bits/basic_string.tcc> #endif /* _GLIBCXX_STRING */ diff --git a/libstdc++-v3/include/tr1/random b/libstdc++-v3/include/tr1/random index b703d030ac4..55926479aff 100644 --- a/libstdc++-v3/include/tr1/random +++ b/libstdc++-v3/include/tr1/random @@ -1,6 +1,6 @@ // random number generation -*- C++ -*- -// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2006, 2007, 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 @@ -44,11 +44,7 @@ #include <debug/debug.h> #include <tr1/type_traits> #include <tr1/cmath> - #include <tr1/random.h> - -#ifndef _GLIBCXX_EXPORT_TEMPLATE -# include <tr1/random.tcc> -#endif +#include <tr1/random.tcc> #endif // _GLIBCXX_TR1_RANDOM diff --git a/libstdc++-v3/src/hashtable_c++0x.cc b/libstdc++-v3/src/hashtable_c++0x.cc index c99a094c046..0b5f79cc6f1 100644 --- a/libstdc++-v3/src/hashtable_c++0x.cc +++ b/libstdc++-v3/src/hashtable_c++0x.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,11 +22,14 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#include <bits/c++config.h> + #ifndef __GXX_EXPERIMENTAL_CXX0X__ # error "hashtable_c++0x.cc must be compiled with -std=gnu++0x" #endif -namespace std -{ +_GLIBCXX_BEGIN_NAMESPACE(std) + #include "hashtable-aux.cc" -} + +_GLIBCXX_END_NAMESPACE // namespace std diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc index bab267c7aff..3b239d43cba 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/example/hash_illegal_resize.cc @@ -1,6 +1,8 @@ +// { dg-timeout-factor 2.0 } + // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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 terms @@ -31,8 +33,7 @@ /** * @file hash_illegal_resize_example.cpp - * An example of illegally - * externally resizing a hash-based container object. + * An example of illegally externally resizing a hash-based container object. */ /** @@ -46,6 +47,15 @@ #include <ext/pb_ds/exception.hpp> #include <cassert> +// size of test containers +#ifdef _GLIBCXX_DEBUG +# define SIZE 100 +# define RESIZE 20 +#else +# define SIZE 1000 +# define RESIZE 200 +#endif + using namespace std; using namespace __gnu_pbds; @@ -68,8 +78,7 @@ int main() int, int, int_hash, - equal_to< - int>, + equal_to<int>, // Combining function. direct_mod_range_hashing<>, // Probe function. @@ -90,20 +99,20 @@ int main() // Insert some elements. int i; - for (i = 0; i < 1000; ++i) + for (i = 0; i < SIZE; ++i) g[i] = 2* i; // Check all ok. - assert(g.size() == 1000); - for (i = 0; i < 1000; ++i) - assert(g.find(i) != g.end()&& g.find(i)->second == 2* i); + assert(g.size() == SIZE); + for (i = 0; i < SIZE; ++i) + assert(g.find(i) != g.end() && g.find(i)->second == 2 * i); // Now attempt to resize the table to 200 (impossible). bool ex_thrown = false; try { - g.resize(200); + g.resize(RESIZE); } catch(__gnu_pbds::resize_error& ) { @@ -118,10 +127,9 @@ int main() // container object should still be in a valid state; the following // checks this. // Check all ok. - assert(g.size() == 1000); - for (i = 0; i < 1000; ++i) - assert(g.find(i) != g.end()&& g.find(i)->second == 2* i); + assert(g.size() == SIZE); + for (i = 0; i < SIZE; ++i) + assert(g.find(i) != g.end() && g.find(i)->second == 2 * i); return 0; } - diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc index 4e48bd85fd6..5656a5b2991 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc @@ -45,11 +45,21 @@ #include <regression/common_type.hpp> #ifndef ITERATIONS -#define ITERATIONS 5000 +# ifdef _GLIBCXX_DEBUG +# define ITERATIONS 100 +# else +# define ITERATIONS 5000 #endif +#endif + #ifndef KEYS -#define KEYS 10000 +# ifdef _GLIBCXX_DEBUG +# define KEYS 200 +# else +# define KEYS 10000 +# endif #endif + int main(int argc, char* a_p_argv[]) { diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc index ef4352716a6..e0530f579dc 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc @@ -5,7 +5,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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 terms @@ -45,11 +45,21 @@ #include <regression/common_type.hpp> #ifndef ITERATIONS -#define ITERATIONS 5000 +# ifdef _GLIBCXX_DEBUG +# define ITERATIONS 100 +# else +# define ITERATIONS 5000 #endif +#endif + #ifndef KEYS -#define KEYS 10000 +# ifdef _GLIBCXX_DEBUG +# define KEYS 200 +# else +# define KEYS 10000 +# endif #endif + int main(int argc, char* a_p_argv[]) { @@ -60,4 +70,3 @@ main(int argc, char* a_p_argv[]) "hash_no_data_map_rand_regression_test", map_tl_t()); } - diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc index 8d5869a2047..01751e39fc3 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc @@ -5,7 +5,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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 terms @@ -45,11 +45,21 @@ #include <regression/common_type.hpp> #ifndef ITERATIONS -#define ITERATIONS 5000 +# ifdef _GLIBCXX_DEBUG +# define ITERATIONS 100 +# else +# define ITERATIONS 5000 #endif +#endif + #ifndef KEYS -#define KEYS 10000 +# ifdef _GLIBCXX_DEBUG +# define KEYS 200 +# else +# define KEYS 10000 +# endif #endif + int main(int argc, char* a_p_argv[]) { @@ -60,4 +70,3 @@ main(int argc, char* a_p_argv[]) "tree_data_map_rand_regression_test", map_tl_t()); } - diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc index 8af31e0a265..c7dadb0d81e 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc @@ -5,7 +5,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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 terms @@ -44,12 +44,23 @@ #include <regression/rand/assoc/rand_regression_test.hpp> #include <regression/common_type.hpp> + #ifndef ITERATIONS -#define ITERATIONS 5000 +# ifdef _GLIBCXX_DEBUG +# define ITERATIONS 100 +# else +# define ITERATIONS 5000 +#endif #endif + #ifndef KEYS -#define KEYS 10000 +# ifdef _GLIBCXX_DEBUG +# define KEYS 200 +# else +# define KEYS 10000 +# endif #endif + int main(int argc, char* a_p_argv[]) { @@ -60,4 +71,3 @@ main(int argc, char* a_p_argv[]) "tree_no_data_map_rand_regression_test", map_tl_t()); } - diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc index 26f4325c62e..8a3902812fa 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc @@ -5,7 +5,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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 terms @@ -45,11 +45,21 @@ #include <regression/common_type.hpp> #ifndef ITERATIONS -#define ITERATIONS 5000 +# ifdef _GLIBCXX_DEBUG +# define ITERATIONS 100 +# else +# define ITERATIONS 5000 #endif +#endif + #ifndef KEYS -#define KEYS 10000 +# ifdef _GLIBCXX_DEBUG +# define KEYS 200 +# else +# define KEYS 10000 +# endif #endif + int main(int argc, char* a_p_argv[]) { @@ -60,4 +70,3 @@ main(int argc, char* a_p_argv[]) "trie_data_map_rand_regression_test", map_tl_t()); } - diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc index a0e1b5f281a..2414118da84 100644 --- a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc +++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc @@ -5,7 +5,7 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 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,11 +45,21 @@ #include <regression/common_type.hpp> #ifndef ITERATIONS -#define ITERATIONS 5000 +# ifdef _GLIBCXX_DEBUG +# define ITERATIONS 100 +# else +# define ITERATIONS 5000 #endif +#endif + #ifndef KEYS -#define KEYS 10000 +# ifdef _GLIBCXX_DEBUG +# define KEYS 200 +# else +# define KEYS 10000 +# endif #endif + int main(int argc, char* a_p_argv[]) { @@ -57,7 +67,6 @@ main(int argc, char* a_p_argv[]) typedef trie_set_tl_t map_tl_t; return rand_regression_test(ITERATIONS, KEYS, - "trie_no_data_map_rand_regression_test", + "trie_no_data_map_rand_regression_test", map_tl_t()); } - diff --git a/libstdc++-v3/testsuite/util/testsuite_rvalref.h b/libstdc++-v3/testsuite/util/testsuite_rvalref.h index 5610b77cc43..acf25da503a 100644 --- a/libstdc++-v3/testsuite/util/testsuite_rvalref.h +++ b/libstdc++-v3/testsuite/util/testsuite_rvalref.h @@ -1,7 +1,7 @@ // -*- C++ -*- // Testing utilities for the rvalue reference. // -// 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 @@ -174,10 +174,12 @@ namespace __gnu_test } // namespace __gnu_test +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + +#include <bits/functional_hash.h> + namespace std { - template<typename _Tp> struct hash; - /// std::hash specialization for type_index. template<> struct hash<__gnu_test::rvalstruct> @@ -190,5 +192,6 @@ namespace std { return __rvs.val; } }; } +#endif #endif // _GLIBCXX_TESTSUITE_TR1_H |