summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/bits/hashtable_policy.h
Commit message (Collapse)AuthorAgeFilesLines
* PR libstdc++/56267redi2014-01-201-13/+101
| | | | | | | | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Hash_code_base<... false>): Grant friendship to _Local_iterator_base<..., false>. (_Local_iterator_base): Give protected access to all existing members. (_Local_iterator_base::_M_curr()): New public accessor. (_Local_iterator_base::_M_get_bucket()): New public accessor. (_Local_iterator_base<..., false>::_M_init()): New function to manage the lifetime of the _Hash_code_base explicitly. (_Local_iterator_base<..., false>::_M_destroy()): Likewise. (_Local_iterator_base<..., false>): Define copy constructor and copy assignment operator that use new functions to manage _Hash_code_base. (operator==(const _Local_iterator_base&, const _Local_iterator_base&), operator==(const _Local_iterator_base&, const _Local_iterator_base&)): Use public API for _Local_iterator_base. * include/debug/safe_local_iterator.h (_Safe_local_iterator): Likewise. * include/debug/unordered_map (__debug::unordered_map::erase(), __debug::unordered_multimap::erase()): Likewise. * include/debug/unordered_set (__debug::unordered_set::erase(), __debug::unordered_multiset::erase()): Likewise. * testsuite/23_containers/unordered_set/56267-2.cc: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206834 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-15 François Dumont <fdumont@gcc.gnu.org>fdumont2014-01-151-3/+6
| | | | | | | | | | | | | | | * include/bits/hashtable_policy.h: Fix some long lines. * include/bits/hashtable.h (__hash_code_base_access): Define and use it to check its _M_bucket_index noexcept qualification. Use also in place of... (__access_protected_ctor): ...this. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adapt line number. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206632 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyright years in libstdc++-v3/rsandifo2014-01-021-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206301 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/bits/stl_map.h (map): Implement C++11 allocator-awareredi2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | container requirements. * include/bits/stl_multimap.h (multimap): Likewise. * include/bits/stl_multiset.h (multiset): Likewise. * include/bits/stl_set.h (set): Likewise. * include/bits/stl_tree.h (_Rb_tree_node): Use __aligned_buffer and add accessors for value. (_Rb_tree_iterator, _Rb_tree_const_iterator): Use _Rb_tree_node accessors. (_Rb_tree): Use allocator_traits and implement support for sets and maps the be allocator-aware. * include/bits/forward_list.h (_Fwd_list_base::_M_create_node): Do not zero-initialize storage buffer. * include/bits/hashtable_policy.h (_Hashtable_alloc::_M_allocate_node): Likewise. * include/bits/stl_vector.h (vector(vector&&, const allocator_type&)): Add conditional noexcept specification. * doc/xml/manual/status_cxx2011.xml: Update status of containers. * testsuite/util/testsuite_allocator.h: Re-indent. * testsuite/23_containers/forward_list/allocator/copy.cc: Test allocator-extended copy constructor. * testsuite/23_containers/unordered_map/allocator/copy.cc: Likewise. * testsuite/23_containers/unordered_multimap/allocator/copy.cc: Likewise. * testsuite/23_containers/unordered_multiset/allocator/copy.cc: Likewise. * testsuite/23_containers/unordered_set/allocator/copy.cc: Likewise. * testsuite/23_containers/vector/allocator/copy.cc: Likewise. * testsuite/23_containers/forward_list/allocator/move.cc: New. * testsuite/23_containers/unordered_map/allocator/move.cc: New. * testsuite/23_containers/unordered_multimap/allocator/move.cc: New. * testsuite/23_containers/unordered_multiset/allocator/move.cc: New. * testsuite/23_containers/unordered_set/allocator/move.cc: New. * testsuite/23_containers/vector/allocator/move.cc: New. * testsuite/23_containers/map/allocator/copy.cc: New. * testsuite/23_containers/map/allocator/copy_assign.cc: New. * testsuite/23_containers/map/allocator/minimal.cc: New. * testsuite/23_containers/map/allocator/move.cc: New. * testsuite/23_containers/map/allocator/move_assign.cc: New. * testsuite/23_containers/map/allocator/noexcept.cc: New. * testsuite/23_containers/map/allocator/swap.cc: New. * testsuite/23_containers/multimap/allocator/copy.cc: New. * testsuite/23_containers/multimap/allocator/copy_assign.cc: New. * testsuite/23_containers/multimap/allocator/minimal.cc: New. * testsuite/23_containers/multimap/allocator/move.cc: New. * testsuite/23_containers/multimap/allocator/move_assign.cc: New. * testsuite/23_containers/multimap/allocator/noexcept.cc: New. * testsuite/23_containers/multimap/allocator/swap.cc: New. * testsuite/23_containers/multiset/allocator/copy.cc: New. * testsuite/23_containers/multiset/allocator/copy_assign.cc: New. * testsuite/23_containers/multiset/allocator/minimal.cc: New. * testsuite/23_containers/multiset/allocator/move.cc: New. * testsuite/23_containers/multiset/allocator/move_assign.cc: New. * testsuite/23_containers/multiset/allocator/noexcept.cc: New. * testsuite/23_containers/multiset/allocator/swap.cc: New. * testsuite/23_containers/set/allocator/copy.cc: New. * testsuite/23_containers/set/allocator/copy_assign.cc: New. * testsuite/23_containers/set/allocator/minimal.cc: New. * testsuite/23_containers/set/allocator/move.cc: New. * testsuite/23_containers/set/allocator/move_assign.cc: New. * testsuite/23_containers/set/allocator/noexcept.cc: New. * testsuite/23_containers/set/allocator/swap.cc: New. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Adjust dg-error line number. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204848 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-25 Marc Glisse <marc.glisse@inria.fr>glisse2013-09-251-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libstdc++/58338 * include/bits/forward_list.h (_Fwd_list_node_base::_M_transfer_after): Mark as noexcept. (_Fwd_list_iterator) [_Fwd_list_iterator, operator*, operator->, operator++, operator==, operator!=, _M_next]: Likewise. (_Fwd_list_const_iterator) [_Fwd_list_const_iterator, operator*, operator->, operator++, operator==, operator!=, _M_next]: Likewise. (operator==(const _Fwd_list_iterator&, const _Fwd_list_const_iterator&), operator!=(const _Fwd_list_iterator&, const _Fwd_list_const_iterator&)): Likewise. * include/bits/hashtable_policy.h (_Hash_node_base::_Hash_node_base, _Hash_node::_M_next, _Node_iterator_base::_Node_iterator_base, _Node_iterator_base::_M_incr, operator==(const _Node_iterator_base&, const _Node_iterator_base&), operator!=(const _Node_iterator_base&, const _Node_iterator_base&)): Likewise. (_Node_iterator) [_Node_iterator, operator*, operator->, operator++]: Likewise. (_Node_const_iterator) [_Node_const_iterator, operator*, operator->, operator++]: Likewise. * include/debug/safe_iterator.h (_Safe_iterator) [_Safe_iterator, operator=, operator*, operator->, operator++, operator--, operator[], operator+=, operator+, operator-=, operator-, base, operator _Iterator]: Likewise. (operator==(const _Safe_iterator&, const _Safe_iterator&), operator!=(const _Safe_iterator&, const _Safe_iterator&), operator<(const _Safe_iterator&, const _Safe_iterator&), operator<=(const _Safe_iterator&, const _Safe_iterator&), operator>(const _Safe_iterator&, const _Safe_iterator&), operator>=(const _Safe_iterator&, const _Safe_iterator&), operator-(const _Safe_iterator&, const _Safe_iterator&), operator+(difference_type, const _Safe_iterator&)): Likewise. * include/profile/iterator_tracker.h (__iterator_tracker) [__iterator_tracker, base, operator _Iterator, operator->, operator++, operator--, operator=, operator*, operator[], operator+=, operator+, operator-=, operator-]: Likewise. (operator==(const __iterator_tracker&, const __iterator_tracker&), operator!=(const __iterator_tracker&, const __iterator_tracker&), operator<(const __iterator_tracker&, const __iterator_tracker&), operator<=(const __iterator_tracker&, const __iterator_tracker&), operator>(const __iterator_tracker&, const __iterator_tracker&), operator>=(const __iterator_tracker&, const __iterator_tracker&), operator-(const __iterator_tracker&, const __iterator_tracker&), operator+(difference_type, const __iterator_tracker&)): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202924 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-08-08 François Dumont <fdumont@gcc.gnu.org>fdumont2013-08-081-68/+181
| | | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Hashtable_alloc): New. (_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than _Hashtable. (_Before_begin<>): Remove. * include/bits/hashtable.h (_Hashtable): Inherit from _Hashtable_alloc and adapt. Restore _M_before_begin field. * src/c++11/hashtable_c++0x.cc: Add ext/alloc_traits.h include. * python/libstdcxx/v6/printers.py (StdHashtableIterator): Adapt access to hashtable before begin. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Adapt dg-error line number. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201592 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-08-06 Paolo Carlini <paolo.carlini@oracle.com>paolo2013-08-061-181/+68
| | | | | | | Revert the last commit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201525 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-08-06 François Dumont <fdumont@gcc.gnu.org>fdumont2013-08-061-68/+181
| | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Hashtable_alloc): New. (_ReuseOrAllocNode, _AllocNode): Adapt to use latter rather than _Hashtable. (_Before_begin<>): Remove. * include/bits/hashtable.h (_Hashtable): Inherit from _Hashtable_alloc and adapt. Restore _M_before_begin field. * python/libstdcxx/v6/printers.py (StdHashtableIterator): Adapt access to hashtable before begin. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Adapt dg-error line number. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201522 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-05 François Dumont <fdumont@gcc.gnu.org>fdumont2013-07-051-124/+120
| | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_ReuseOrAllocNode): Use forward pattern. (_MoveReuseOrAllocNode): Remove. (_Insert_base): Take a functor defining how the node is generated. * include/bits/hashtable.h: Adapt. (operator=(initializer_list<value_type>)): Reuse node if any. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust dg-error line number. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200724 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-06-29 François Dumont <fdumont@gcc.gnu.org>fdumont2013-06-291-15/+22
| | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Insert_base): Consider hint in insert methods. * include/bits/hashtable.h: Likewise. * testsuite/23_containers/unordered_multimap/insert/hint.cc: New. * testsuite/performance/23_containers/insert/unordered_multiset_hint.cc: New. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust dg-error line number. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: Likewise. * doc/xml/manual/containers.xml: Document hinting in unordered containers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200564 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/bits/hashtable_policy.h (_Hashtable_ebo_helper): Fixredi2013-04-281-2/+2
| | | | | | | comment. * include/std/mutex (__recursive_mutex_base): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198368 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-04-26 François Dumont <fdumont@gcc.gnu.org>fdumont2013-04-261-1/+1
| | | | | | | | | * include/bits/hashtable_policy.h (_Insert_base<>::insert<_It>(_It, _It)): Enable move semantics. * testsuite/23_containers/unordered_set/insert/move_range.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198346 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-04-22 François Dumont <fdumont@gcc.gnu.org>fdumont2013-04-221-36/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h: Add C++11 allocator support. * include/bits/hashtable.h: Likewise. * include/bits/unordered_set.h: Likewise. * include/bits/unordered_map.h: Likewise. * include/debug/unordered_set: Likewise. * include/debug/unordered_map: Likewise. * include/std/unordered_set: Remove bits/algobase.h include. Replace bits/alloc_traits.h by ext/alloc_traits.h. * include/std/unordered_map: Likewise. * include/ext/throw_allocator.h: Add checks on calls to allocator construct/destroy. (std::hash<__gnu_cxx::throw_value_limit>): Add conditional throw. (std::hash<__gnu_cxx::throw_value_random>): Likewise. * testsuite/util/regression/rand/priority_queue /container_rand_regression_test.tcc: Adapt. * testsuite/util/regression/rand/assoc /container_rand_regression_test.tcc: Likewise. * testsuite/util/testsuite_counter_type.h: Add count of destructors. * testsuite/23_containers/unordered_set /not_default_constructible_hash_neg.cc: Adjust dg-error line number. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise. * testsuite/23_containers/unordered_set/allocator/copy.cc: New. * testsuite/23_containers/unordered_set/allocator/copy_assign.cc: New. * testsuite/23_containers/unordered_set/allocator/minimal.cc: New. * testsuite/23_containers/unordered_set/allocator/move_assign.cc: New. * testsuite/23_containers/unordered_set/allocator/noexcept.cc: New. * testsuite/23_containers/unordered_set/allocator/swap.cc: New. * testsuite/23_containers/unordered_multiset/allocator/copy.cc: New. * testsuite/23_containers/unordered_multiset/allocator/copy_assign.cc: New. * testsuite/23_containers/unordered_multiset/allocator/minimal.cc: New. * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc: New. * testsuite/23_containers/unordered_multiset/allocator/noexcept.cc: New. * testsuite/23_containers/unordered_multiset/allocator/swap.cc: New. * testsuite/23_containers/unordered_map/allocator/copy.cc: New. * testsuite/23_containers/unordered_map/allocator/copy_assign.cc: New. * testsuite/23_containers/unordered_map/allocator/minimal.cc: New. * testsuite/23_containers/unordered_map/allocator/move_assign.cc: New. * testsuite/23_containers/unordered_map/allocator/noexcept.cc: New. * testsuite/23_containers/unordered_map/allocator/swap.cc: New. * testsuite/23_containers/unordered_multimap/allocator/copy.cc: New. * testsuite/23_containers/unordered_multimap/allocator/copy_assign.cc: New. * testsuite/23_containers/unordered_multimap/allocator/minimal.cc: New. * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc: New. * testsuite/23_containers/unordered_multimap/allocator/noexcept.cc: New. * testsuite/23_containers/unordered_multimap/allocator/swap.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198158 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-02-13 François Dumont <fdumont@gcc.gnu.org>fdumont2013-02-131-8/+6
| | | | | | | | | | * include/bits/hashtable_policy.h (_Hash_code_base): Restore default constructor protected. * include/bits/hashtable.h: static assert that _Hash_code_base has a default constructor available through inheritance. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196030 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libstdc++/56278redi2013-02-111-7/+8
| | | | | | | | * include/bits/hashtable_policy.h (_Hash_code_base): Make default constructor public. * testsuite/23_containers/unordered_set/56278.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195935 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-02-01 François Dumont <fdumont@gcc.gnu.org>fdumont2013-02-011-72/+2
| | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt) (_Prime_rehash_policy::_M_need_rehash): Move definition... * src/c++11/hashtable_c++0x.cc: ... here. * src/shared/hashtable-aux.cc: Remove c++config.h include. * config/abi/gnu.ver (GLIBCXX_3.4.18): Export _Prime_rehash_policy symbols. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195676 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libstdc++/56112redi2013-01-281-1/+1
| | | | | | | | * include/bits/hashtable_policy.h (insert(_Pair&&)): Use _M_emplace to construct value_type explicitly before trying to extract the key. * testsuite/23_containers/unordered_map/cons/56112.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195520 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-01-28 François Dumont <fdumont@gcc.gnu.org>fdumont2013-01-281-65/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_ebo_helper to embed functors into the local_iterator when necessary. Pass information about functors involved in hash code by copy. * include/bits/hashtable.h (__cache_default): Do not cache for builtin integral types unless the hash functor is not noexcept qualified or is not default constructible. Adapt static assertions and local iterator instantiations. * include/debug/unordered_set (std::__debug::unordered_set<>::erase): Detect local iterators to invalidate using contained node rather than generating a dummy local_iterator instance. (std::__debug::unordered_multiset<>::erase): Likewise. * include/debug/unordered_map (std::__debug::unordered_map<>::erase): Likewise. (std::__debug::unordered_multimap<>::erase): Likewise. * testsuite/performance/23_containers/insert_erase/41975.cc: Test std::tr1 and std versions of unordered_set regardless of any macro. Add test on default cache behavior. * testsuite/performance/23_containers/insert/54075.cc: Likewise. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adapt line number. * testsuite/23_containers/unordered_set/ not_default_constructible_hash_neg.cc: New. * testsuite/23_containers/unordered_set/buckets/swap.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195517 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/bits/hashtable.h: Improve comments.redi2012-11-191-6/+5
| | | | | | * include/bits/hashtable_policy.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193636 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-11-16 François Dumont <fdumont@gcc.gnu.org>fdumont2012-11-161-30/+13
| | | | | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Prime_rehash_policy): Remove automatic shrink. (_Prime_rehash_policy::_M_bkt_for_elements): Do not call _M_next_bkt anymore. (_Prime_rehash_policy::_M_next_bkt): Move usage of _S_growth_factor ... (_Prime_rehash_policy::_M_need_rehash): ... here. * include/bits/hashtable.h (_Hashtable<>): Adapt. * testsuite/performance/23_containers/insert_erase/41975.cc: Add _USE_TR1 to force build using std::tr1 container. * testsuite/performance/23_containers/insert/unordered_set.cc: Likewise. * testsuite/performance/23_containers/insert/54075.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193576 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-11-01 François Dumont <fdumont@gcc.gnu.org>fdumont2012-11-011-0/+18
| | | | | | | | | | | | | | | | * include/bits/hashtable_policy.h (__details::_Before_begin<>): New, combine a base node instance and an allocator. * include/bits/hashtable.h (_Hashtable<>::_M_node_allocator): Remove. (_Hashtable<>::_M_before_begin): Rename into _M_bbegin and type modified to __detail::_Before_begin<>. (_Hashtable<>::_M_node_allocator()): New, get the node allocator part of _M_bbegin. (_Hashtable<>::_M_before_begin()): New, get the before begin node part of _M_bbegin. (_Hashtable<>): Adapt to use latter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193068 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-12 Paolo Carlini <paolo.carlini@oracle.com>paolo2012-10-111-22/+15
| | | | | | | | * include/bits/hashtable_policy.h: Revert libstdc++/53067 quick hacks thanks to the resolution of c++/51213. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192380 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-10 François Dumont <fdumont@gcc.gnu.org>fdumont2012-08-131-5/+14
| | | | | | | | | | | | | | | | | | | | | | | Ollie Wild <aaw@google.com> * include/bits/hashtable.h (_Hashtable<>_M_insert_multi_node(hash_code, node_type*)): New. (_Hashtable<>_M_insert(_Args&&, false_type)): Use latter. (_Hashtable<>::_M_emplace(false_type, _Args&&...)): Likewise. (_Hashtable<>::_M_insert_bucket): Replace by ... (_Hashtable<>::_M_insert_unique_node(size_type, hash_code, node_type*)): ... this, new. (_Hashtable<>::_M_insert(_Args&&, true_type)): Use latter. (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise. * include/bits/hashtable_policy.h (_Map_base<>::operator[]): Use latter, emplace the value_type rather than insert. * include/std/unordered_map: Include tuple. * include/std/unordered_set: Likewise. * testsuite/util/testsuite_counter_type.h: New. * testsuite/23_containers/unordered_map/operators/2.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190355 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-29 François Dumont <fdumont@gcc.gnu.org>fdumont2012-07-291-15/+16
| | | | | | | | | | | PR libstdc++/54075 * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt): Add a growth factor set to 2 to boost growth in the number of buckets. * testsuite/performance/23_containers/insert/unordered_set.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189938 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-07-13 Paolo Carlini <paolo.carlini@oracle.com>paolo2012-07-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | PR libstdc++/53657 * include/bits/stl_pair.h (pair<>::pair(pair&&)): Declare defaulted, per C++11. * include/bits/stl_map.h (map<>::insert(_Pair&&), map<>::insert (const_iterator, _Pair&&)): Constrain with std::is_constructible, per LWG2005. * include/bits/stl_multimap.h (multimap<>::insert(_Pair&&), multimap<>::insert(const_iterator, _Pair&&)): Likewise. * include/bits/hashtable_policy.h (_Insert<>::insert(_Pair&&), _Insert<>::insert(const_iterator, _Pair&&)): Likewise. * include/debug/unordered_map: Adjust. * include/debug/map.h: Likewise. * include/debug/multimap.h: Likewise. * include/profile/unordered_map: Likewise. * include/profile/map.h: Likewise. * include/profile/multimap.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189456 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-05-31 Benjamin Kosnik <bkoz@redhat.com>bkoz2012-05-311-2/+2
| | | | | | | | PR libstdc++/53543 * include/bits/hashtable_policy.h (_Insert::__is_convertible): Rename to __is_conv to avoid clash with clang built-in. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188088 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>paolo2012-05-151-19/+34
| | | | | | | | | | | | | | | | | | | | | | PR libstdc++/53339 * include/bits/hashtable_policy.h (__detail::_Identity, __detail::_Select1st): Add. (_Map_base, _Hashtable_base): Use the latter, adjust parameters. * include/bits/hashtable.h (_Hashtable::__key_extract): Adjust. * include/bits/unordered_set.h (__uset_hashtable, __umset_hashtable): Likewise. * include/bits/unordered_map.h (__umap_hashtable, __ummap_hashtable): Likewise. * include/bits/stl_function.h (_Identity, _Select1st, _Select2nd) Unconditionally derive from unary_function. * include/ext/functional (identity, select1st, select2nd): Remove #ifdef __GXX_EXPERIMENTAL_CXX0X__ bits. * testsuite/23_containers/unordered_map/requirements/53339.cc: New. * testsuite/23_containers/unordered_multimap/requirements/ 53339.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187515 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-05-02 Benjamin Kosnik <bkoz@redhat.com>bkoz2012-05-021-0/+4
| | | | | | | * include/bits/hashtable_policy.h: Correct namepace nesting for _Hashtable forward declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187052 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-04-25 Benjamin Kosnik <bkoz@redhat.com>bkoz2012-04-261-8/+20
| | | | | | | * include/bits/hashtable.h: Adjust doxygen markup for base classes. * include/bits/hashtable_policy.h: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186856 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-04-22 Paolo Carlini <paolo.carlini@oracle.com>paolo2012-04-221-14/+22
| | | | | | | | | | PR libstdc++/53067 * include/bits/hashtable_policy.h: Change inheritances to public. * testsuite/23_containers/unordered_map/requirements/53067.cc: New. * testsuite/23_containers/unordered_set/requirements/53067.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186676 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-04-12 Benjamin Kosnik <bkoz@redhat.com>bkoz2012-04-131-318/+779
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/bits/unordered_map.h (__unordered_map): Remove. (__unordered_multimap): Remove. Add aliases for __umap_traits, __umap_hashtable, __ummap_traits, __ummap_hashtable. (unordered_map): Derive from __umap_hashtable. (unordered_multimap): Derive from __ummap_hashtable. * include/bits/unordered_set.h (__unordered_set): Remove. (__unordered_multiset): Remove. Add aliases for __uset_traits, __uset_hashtable, __umset_traits, __umset_hashtable. (unordered_set): Derive from __uset_hashtable. (unordered_multiset): Derive from __umset_hashtable. * include/bits/hashtable.h (__cache_default): New, consolidated cache defaults for _Hashtable. Adjust comments for doxygen. (_Hashtable): Consolidate bool template parameters into new, _Traits class. Inherited base classes synthesize _Hashtable in CRTP via original 10 parameters. Prefer using declarations to typedefs, add __node_type, __bucket_type, etc. Push many nested types down hierarchy to _Hashtable_base. Add constructors necessary for top-level unordered_containers. Consolidate insert member functions and logic in new base class, __detail::_Insert and __detail::_Insert_base. (_Hashtable::operator=(initializer_list)): Add. * include/bits/hashtable_policy.h: Convert to doxygen markup. (_Hashtable_traits) New. Consolidate bool template parameters here. (_Insert, _Insert_base): New, consolidated insert member functions. (_Map_base, _Equality, _Rehash_base): Adjust template parameters, use base types. (_Hashtable_base): Move type declarations useful to other base classes into this class. * python/libstdcxx/v6/printers.py (Tr1HashtableIterator): Update. * testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust traits, line numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186403 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-02-20 Paolo Carlini <paolo.carlini@oracle.com>paolo2012-02-201-2/+2
| | | | | | | | | | | PR libstdc++/52309 * include/bits/hashtable_policy.h (_Equality_base<, true,>:: _M_equal(const _Hashtable&)): Compare values with operator==. * testsuite/23_containers/unordered_set/operators/52309.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184388 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-13 François Dumont <fdumont@gcc.gnu.org>fdumont2012-01-131-11/+23
| | | | | | | | | | | | * include/bits/hashtable_policy.h (_Hash_node_base): New, use it as base class of ... (_Hash_node<Value, true>, _Hash_node<Value, false>): ... those. * include/bits/hashtable.h (_Hashtable): Replace _M_begin_bucket_index by _M_before_begin. Review implementation so that we do not need to look for previous non-empty bucket when inserting nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183164 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-05 François Dumont <fdumont@gcc.gnu.org>fdumont2012-01-051-1/+1
| | | | | | | | | | | | | | * include/bits/hashtable_policy.h (_Hashtable_base<>::_M_eq()): protected rather than private, use it... * include/bits/hashtable.h (_Hashtable<>::key_eq()): ... here. * testsuite/23_containers/unordered_set/observers.cc: New. * testsuite/23_containers/unordered_multiset/observers.cc: New. * testsuite/23_containers/unordered_map/observers.cc: New. * testsuite/23_containers/unordered_multimap/observers.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182928 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-03 François Dumont <fdumont@gcc.gnu.org>fdumont2012-01-031-34/+41
| | | | | | | | | * include/bits/hashtable_policy.h (_Ebo_helper<>): Rename to the more specific _Hashtable_ebo_helper. Hide this implementation detail thanks to private inheritance. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182857 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-29 Paolo Carlini <paolo.carlini@oracle.com>paolo2011-12-291-21/+21
| | | | | | | | * include/bits/hashtable_policy.h (struct _Ebo_helper<>): Don't use _N, badname on Solaris; minor stylistic changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182734 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-29 François Dumont <fdumont@gcc.gnu.org>fdumont2011-12-291-85/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libstdc++/51608 * include/bits/hashtable_policy.h (_Equal_helper<>): New, change the way the _Equal functor is used depending on whether hash code is cached or not. (_Ebo_helper<>): New helper type to introduce EBO when possible. (_Hash_code_base): Use _Ebo_helper to limit memory footprint. Move _Equal functor management... (_Hashtable_base): ...here, new, use _Equal_helper. (_Local_iterator_base<>, _Locale_iterator<>, _Locale_const_iterator<>): New, use _Hash_code_base, implementation of... * include/bits/hashtable.h (_Hashtable<>::local_iterator, _Hashtable<>::const_local_iterator): ...those. Add static assertions checking that some functors are empty depending on whether hash code is cache or not. (_Hashtable<>::_M_bucket_index): New overloads using current bucket count, use through out the _Hastable<> implementation. * include/bits/unordered_set.h (__unordered_set<>, __unordered_multiset<>): Cache hash code iff hash functor is not empty and not final. * include/bits/unordered_map.h (__unordered_map<>, __unordered_multimap<>): Likewise. * include/debug/unordered_map (unordered_map<>::_S_to_local, unordered_multimap<>::_S_to_local): Adapt to match new local iterator implementation. * include/debug/unordered_set (unordered_set<>::_S_to_local, unordered_multiset<>::_S_to_local): Likewise. * include/profile/unordered_map (unordered_map<>::_M_profile_destruct, unordered_multimap<>::_M_profile_destruct): Enhance thanks to usage of local iterators. * include/profile/unordered_set (unordered_set<>::_M_profile_destruct, unordered_multiset<>::_M_profile_destruct): Likewise. * testsuite_files/23_containers/unordered_set/instantiation_neg.cc: Fix error line. * testsuite_files/23_containers/unordered_set/final_hash.cc: New. * testsuite_files/23_containers/unordered_multiset/final_hash.cc: New. * testsuite_files/23_containers/unordered_map/final_hash.cc: New. * testsuite_files/23_containers/unordered_multimap/final_hash.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182727 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-12-07 François Dumont <fdumont@gcc.gnu.org>fdumont2011-12-071-13/+20
| | | | | | | | | | PR libstdc++/51386 * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt): Fix computation of _M_prev_resize so that hashtable do not keep on being rehashed when _M_max_load_factor is lower than 1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182085 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-23 François Dumont <fdumont@gcc.gnu.org>fdumont2011-11-231-176/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libstdc++/41975 * include/bits/hashtable.h (_Hashtable<>): Major data model modification to limit performance impact of empty buckets in erase(iterator) implementation. * include/bits/hashtable_policy.h (_Hashtable_iterator, _Hashtable_const_iterator): Remove not used anymore. * include/bits/hashtable_policy.h (_Prime_rehash_policy): Remove _M_grow_factor, just use natural evolution of prime numbers. Add _M_prev_size to know when the number of buckets can be reduced. * include/bits/unordered_set.h (__unordered_set<>, __unordered_multiset<>), unordered_map.h (__unordered_map<>, __unordered_multimap<>): Change default value of cache hash code template parameter, false for integral types with noexcept hash functor, true otherwise. * include/debug/unordered_map, unordered_set: Adapt transformation from iterator/const_iterator to respectively local_iterator/const_local_iterator. * testsuite/performance/23_containers/copy_construct/unordered_set.cc: New. * testsuite/23_containers/unordered_set/instantiation_neg.cc: New. * testsuite/23_containers/unordered_set/hash_policy/rehash.cc: New. * testsuite/23_containers/unordered_multiset/cons/copy.cc: New. * testsuite/23_containers/unordered_multiset/erase/1.cc, 24061-multiset.cc: Add checks on the number of bucket elements. * testsuite/23_containers/unordered_multiset/insert/multiset_range.cc, multiset_single.cc, multiset_single_move.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181677 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-06 François Dumont <fdumont@gcc.gnu.org>paolo2011-09-061-23/+12
| | | | | | | | | | | | | Paolo Carlini <paolo.carlini@oracle.com> * include/bits/hashtable_policy.h (_Prime_rehash_policy:: _M_next_bkt): Cast _M_max_load_factor to long double. (_Prime_rehash_policy::_M_bkt_for_elements): Use _M_next_bkt. (_Prime_rehash_policy::_M_need_rehash): Likewise; cast all float quantities to long double. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178615 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-09-06 Paolo Carlini <paolo.carlini@oracle.com>paolo2011-09-061-2/+9
| | | | | | | | | PR libstdc++/50257 * include/bits/hashtable_policy.h (_Prime_rehash_policy:: _M_next_bkt): Optimize for small argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178581 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-07-24 Paolo Carlini <paolo.carlini@oracle.com>paolo2011-07-241-3/+3
| | | | | | | | * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt, _M_bkt_for_elements, _M_need_rehash): Fix typos in the last commit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176718 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-07-24 François Dumont <francois.cppdevs@free.fr>fdumont2011-07-241-9/+9
| | | | | | | | | | | | * include/bits/hashtable_policy.h (_Prime_rehash_policy): Use __builtin_floor rather than __builtin_ceil to compute next resize value. * testsuite/23_containers/unordered_set/hash_policy/load_factor.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176717 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-26 Paolo Carlini <paolo.carlini@oracle.com>paolo2011-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/list.cc: Use noexcept per the FDIS. * src/compatibility-list-2.cc: Likewise. * include/debug/set.h: Likewise. * include/debug/unordered_map: Likewise. * include/debug/multiset.h: Likewise. * include/debug/forward_list: Likewise. * include/debug/unordered_set: Likewise. * include/debug/vector: Likewise. * include/debug/map.h: Likewise. * include/debug/deque: Likewise. * include/debug/list: Likewise. * include/debug/multimap.h: Likewise. * include/profile/set.h: Likewise. * include/profile/unordered_map: Likewise. * include/profile/multiset.h: Likewise. * include/profile/forward_list: Likewise. * include/profile/vector: Likewise. * include/profile/unordered_set: Likewise. * include/profile/map.h: Likewise. * include/profile/deque: Likewise. * include/profile/list: Likewise. * include/profile/multimap.h: Likewise. * include/bits/hashtable.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_map.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/stl_set.h: Likewise. * include/bits/forward_list.h: Likewise. * include/bits/stl_multimap.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_tree.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174295 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-30 Benjamin Kosnik <bkoz@redhat.com>bkoz2011-01-301-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169421 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-19 Benjamin Kosnik <bkoz@redhat.com>bkoz2011-01-191-2/+2
| | | | | | | | | | PR libstdc++/36104 part two * include/bits/hashtable.h: Revert to non-nested macro usage. * include/bits/hashtable_policy.h: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169021 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-14 Benjamin Kosnik <bkoz@redhat.com>bkoz2011-01-151-57/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libstdc++/36104 * include/Makefile.am (bits_sup_headers, stamp-bits-sup): New. * include/Makefile.in: Regenerate. * libsupc++/Makefile.am (std_HEADERS, bits_HEADERS): New. (install-stdHEADERS, install-bitsHEADERS): New. * libsupc++/Makefile.in: Regenerate. * include/bits/c++config: Update for inline namespaces. * libsupc++/cxxabi-forced.h: To... * libsupc++/cxxabi_forced.h: ...this. * libsupc++/hash_bytes.h: Separate file. * libsupc++/typeinfo: Use it. * libsupc++/exception: Adjust for bits subdirectory. * libsupc++/eh_aux_runtime.cc: Same. * libsupc++/eh_ptr.cc: Same. * libsupc++/new_op.cc: Same. * libsupc++/exception_defines.h: Same. * libsupc++/nested_exception.h: Same. * libsupc++/eh_terminate.cc: Same. * libsupc++/vec.cc: Same. * libsupc++/vterminate.cc: Same. * libsupc++/exception_ptr.h: Same. * libsupc++/eh_personality.cc: Same. * libsupc++/eh_call.cc: Same. * libsupc++/new_opnt.cc: Same. * libsupc++/hash_bytes.cc: Same. * config/cpu/arm/cxxabi_tweaks.h: Same. * config/cpu/generic/cxxabi_tweaks.h: Same. * libsupc++/cxxabi.h: Same. Consolidate _GLIBCXX_NOTHROW defines. * include/std/bitset: Same. * include/ext/vstring.tcc: Same. * include/bits/hashtable.h: Same. * include/bits/functional_hash.h: Same. * include/bits/hashtable_policy.h: Same. * include/bits/basic_string.h: Same. * include/bits/istream.tcc: Same. * include/bits/ostream.tcc: Same. * include/bits/algorithmfwd.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/ostream_insert.h: Same. * include/bits/fstream.tcc: Same. * include/bits/functexcept.h: Same. * doc/doxygen/user.cfg.in: Adjust names. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168831 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-11-18 Benjamin Kosnik <bkoz@redhat.com>bkoz2010-12-191-1/+2
| | | | | | | | | | | | | | | | * config/*/*: Use headername alias to associate private includes to public includes. * include/*/*: Same. * scripts/run_doxygen: Update for doxygen 1.7.2. * doc/doxygen/user.cfg.in: Same. * doc/doxygen/TODO: Remove. * testsuite/*/std_c++0x_neg.cc: Adjust line number. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168046 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-29 Paolo Carlini <paolo.carlini@oracle.com>paolo2010-10-291-20/+12
| | | | | | | | | | | * include/bits/stl_function.h (_Select1st<>::operator()): Add templatized overloads. * include/bits/hashtable_policy.h (_Select1st): Remove; revert everything to std::_Select1st. * include/bits/unordered_map.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166062 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-28 Paolo Carlini <paolo.carlini@oracle.com>paolo2010-10-281-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libstdc++/44436 (partial) * include/bits/hashtable.h (_Hashtable<>::insert(value_type&&), insert(_Pair&&), insert(const_iterator, value_type&&), insert(const_iterator, _Pair&&)): Add. (_M_allocate_node, _M_insert, _M_insert_bucket): Templatize. * include/bits/hashtable_policy.h (__detail::_Select1st): Add; use it throughout. (_Map_base<>::operator[](_Key&&)): Add. * include/bits/unordered_map.h: Use __detail::_Select1st throughout. * include/debug/unordered_map: Update. * include/debug/unordered_set: Likewise. * include/profile/unordered_map: Likewise. * include/profile/unordered_set: Likewise. * testsuite/util/testsuite_rvalref.h (struct hash<rvalstruct>): Add; minor tweaks throughout, use deleted special members. * testsuite/23_containers/unordered_map/insert/map_single_move-1.cc: New. * testsuite/23_containers/unordered_map/insert/map_single_move-2.cc: Likewise. * testsuite/23_containers/unordered_map/insert/array_syntax_move.cc: Likewise. * testsuite/23_containers/unordered_multimap/insert/ multimap_single_move-1.cc: Likewise. * testsuite/23_containers/unordered_multimap/insert/ multimap_single_move-2.cc: Likewise. * testsuite/23_containers/unordered_set/insert/set_single_move.cc: Likewise. * testsuite/23_containers/unordered_multiset/insert/ multiset_single_move.cc: Likewise. * testsuite/23_containers/unordered_map/insert/array_syntax.cc: Minor cosmetic changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166030 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud