aboutsummaryrefslogtreecommitdiff
path: root/libjava/javax/xml/xpath/XPathConstants.h
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2025-04-04 15:05:09 -0400
committerPatrick Palka <ppalka@redhat.com>2025-04-04 15:05:09 -0400
commit2a36d22ab52d6ffce9a1fcaf7aca83336679e111 (patch)
tree1a7e785a74125a42ff6881802eed3e7708dc8e44 /libjava/javax/xml/xpath/XPathConstants.h
parentd25728c98682c058bfda79333c94b0a8cf2a3f49 (diff)
downloadgcc-2a36d22ab52d6ffce9a1fcaf7aca83336679e111.zip
gcc-2a36d22ab52d6ffce9a1fcaf7aca83336679e111.tar.gz
gcc-2a36d22ab52d6ffce9a1fcaf7aca83336679e111.tar.bz2
libstdc++: Avoid redundant value_type object in flat_set::emplace [PR119620]
flat_set::emplace (and flat_multiset's) currently unconditionally constructs an object outside of the container, but if we're passed a value_type object we can and should avoid that. PR libstdc++/119620 libstdc++-v3/ChangeLog: * include/std/flat_set (_Flat_set_impl::_M_try_emplace): Split out into two overloads, one taking at least one argument and one taking zero arguments. Turn __k into an auto&& reference bound to __arg if it's already a value_type and otherwise bound to a lifetime-extended value_type temporary. * testsuite/23_containers/flat_multiset/1.cc (test08): New test. * testsuite/23_containers/flat_set/1.cc (test08): New test. Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com> Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Diffstat (limited to 'libjava/javax/xml/xpath/XPathConstants.h')
0 files changed, 0 insertions, 0 deletions