aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-10-08 13:41:19 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-10-09 00:57:47 +0100
commitd87105d697ced10e1f7af3f1f80ef6c9890c8585 (patch)
tree90db83e14b835e7f1fdb571c052700404e0eb9e0 /gcc
parent64acc43de1e33616e43b239887a260eb4a51fcc7 (diff)
downloadgcc-d87105d697ced10e1f7af3f1f80ef6c9890c8585.zip
gcc-d87105d697ced10e1f7af3f1f80ef6c9890c8585.tar.gz
gcc-d87105d697ced10e1f7af3f1f80ef6c9890c8585.tar.bz2
libstdc++: Access std::pair members without tuple-like helpers
This avoids the tuple-like API for std::pair in the unordered containers, removing some overly generic code. The _Select1st projection can figure out the member types of a std::pair without using decltype(std::get<0>(...)). We don't need _Select2nd because it's only needed in _NodeBuilder::_S_build, and that can just access the .second member of the pair directly. The return type of that function doesn't need to be deduced by decltype, we can just expose the __node_type typedef of the node generator. libstdc++-v3/ChangeLog: * include/bits/hashtable_policy.h (_Select1st): Replace use of std::get. (_Select2nd): Remove. (_NodeBuilder::_S_build): Use _NodeGenerator::__node_type typedef instead of deducing it. Remove unnecessary piecewise construction. (_ReuseOrAllocNode): Make __node_type public. (_Map_base): Adjust partial specialization to be able to extract the mapped_type without using tuple_element. (_Map_base::at): Define inline * testsuite/23_containers/unordered_map/requirements/53339.cc: Remove XFAIL. * testsuite/23_containers/unordered_multimap/requirements/53339.cc: Likewise.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions