aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.cc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-12-05 12:46:26 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2024-12-05 14:45:24 +0000
commit0368c42507328774cadbea589509b95aaf3cb826 (patch)
tree9eb7beb3f16a651f927ad2739aa91d2f9e754be0 /libcpp/files.cc
parent237fdf51fbfcfa4829471c18fe67535ae9c3efdb (diff)
downloadgcc-0368c42507328774cadbea589509b95aaf3cb826.zip
gcc-0368c42507328774cadbea589509b95aaf3cb826.tar.gz
gcc-0368c42507328774cadbea589509b95aaf3cb826.tar.bz2
libstdc++: Use ADL swap for containers' function objects [PR117921]
The standard says that Compare, Pred and Hash objects should be swapped as described in [swappable.requirements] which means calling swap unqualified with std::swap visible to name lookup. libstdc++-v3/ChangeLog: PR libstdc++/117921 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use ADL swap for Hash members. (_Hashtable_base::_M_swap): Use ADL swap for _Equal members. * include/bits/stl_tree.h (_Rb_tree::swap): Use ADL swap for _Compare members. * testsuite/23_containers/set/modifiers/swap/adl.cc: New test. * testsuite/23_containers/unordered_set/modifiers/swap-2.cc: New test.
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions