b7fd0be37076c8fe5a26a5850580426bcd4c0740 |
|
17-Feb-2017 |
Eric Fiselier <eric@efcs.ca> |
Update all bug URL's to point to https://bugs.llvm.org/... git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@295434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
|
410ed303baa8973a7418b8f40b2a3b45d4d48a98 |
|
11-Feb-2016 |
Eric Fiselier <eric@efcs.ca> |
Fix LWG issue 2469 - Use piecewise construction in unordered_map::operator[]. unordered_map's allocator may only be used to construct objects of 'value_type', or in this case 'pair<const Key, Value>'. In order to respect this requirement in operator[], which requires default constructing the 'mapped_type', we have to use pair's piecewise constructor with '(tuple<Kep>, tuple<>)'. Unfortunately we still need to provide a fallback implementation for C++03 since we don't have <tuple>. Even worse this fallback is the last remaining user of '__hash_map_node_destructor' and '__construct_node_with_key'. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
|
ab4148260e6326b8c0360deb8ed07bf1d1917bd3 |
|
11-Feb-2016 |
Eric Fiselier <eric@efcs.ca> |
Revert r260514 because it has a bogus commit message. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
|
ba41d7e1ff83f1aff8ec58815b4147c97c7ced97 |
|
11-Feb-2016 |
Eric Fiselier <eric@efcs.ca> |
Teach __hash_table how to handle unordered_map's __hash_value_type. This patch is fairly large and contains a number of changes. The main change is teaching '__hash_table' how to handle '__hash_value_type'. Unfortunately this change is a rampant layering violation, but it's required to make unordered_map conforming without re-writing all of __hash_table. After this change 'unordered_map' can delegate to '__hash_table' in almost all cases. The major changes found in this patch are: * Teach __hash_table to differentiate between the true container value type and the node value type by introducing the "__container_value_type" and "__node_value_type" typedefs. In the case of unordered_map '__container_value_type' is 'pair<const Key, Value>' and '__node_value_type' is '__hash_value_type'. * Switch almost all overloads in '__hash_table' previously taking 'value_type' (AKA '__node_value_type) to take '__container_value_type' instead. Previously 'pair<K, V>' would be implicitly converted to '__hash_value_type<K, V>' because of the function signature. * Add '__get_key', '__get_value', '__get_ptr', and '__move' static functions to '__key_value_types'. These functions allow '__hash_table' to unwrap '__node_value_type' objects into '__container_value_type' and its sub-parts. * Pass '__hash_value_type::__value_' to 'a.construct(p, ...)' instead of '__hash_value_type' itself. The C++14 standard requires that 'a.construct()' and 'a.destroy()' are only ever instantiated for the containers value type. * Remove '__hash_value_type's constructors and destructors. We should never construct an instance of this type. (TODO this is UB but we already do it in plenty of places). * Add a generic "try-emplace" function to '__hash_table' called '__emplace_unique_key_args(Key const&, Args...)'. The following changes were done as cleanup: * Introduce the '_LIBCPP_CXX03_LANG' macro to be used in place of '_LIBCPP_HAS_NO_VARIADICS' or '_LIBCPP_HAS_NO_RVALUE_REFERENCE'. * Cleanup C++11 only overloads that assume an incomplete C++11 implementation. For example this patch removes the __construct_node overloads that do manual pack expansion. * Forward 'unordered_map::emplace' to '__hash_table' and remove dead code resulting from the change. This includes almost all 'unordered_map::__construct_node' overloads. The following changes are planed for future revisions: * Fix LWG issue #2469 by delegating 'unordered_map::operator[]' to use '__emplace_unique_key_args'. * Rewrite 'unordered_map::try_emplace' in terms of '__emplace_unique_key_args'. * Optimize '__emplace_unique' to call '__emplace_unique_key_args' when possible. This prevent unneeded allocations when inserting duplicate entries. The additional follow up work needed after this patch: * Respect the lifetime rules for '__hash_value_type' by actually constructing it. * Make '__insert_multi' act similar to '__insert_unique' for objects of type 'T&' and 'T const &&' with 'T = __container_value_type'. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@260514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
|
a90c6dd46005b2b14de3bb889a8d03bb34bd3256 |
|
20-Dec-2014 |
Eric Fiselier <eric@efcs.ca> |
Move test into test/std subdirectory. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp
|