diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-01-11 22:38:02 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2024-01-12 09:45:53 +0000 |
commit | 35f8c661d67f53486f2f3e25887323476a7d0c2b (patch) | |
tree | 8ec16e507f4aaf9109b6ad7d6776a19f1286880b /gcc | |
parent | e9035183a20af10a80a97b57accb76699c9c2530 (diff) | |
download | gcc-35f8c661d67f53486f2f3e25887323476a7d0c2b.zip gcc-35f8c661d67f53486f2f3e25887323476a7d0c2b.tar.gz gcc-35f8c661d67f53486f2f3e25887323476a7d0c2b.tar.bz2 |
libstdc++: Implement C++23 P1951R1 (Default Args for pair's Forwarding Ctor) [PR105505]
This was approved for C++23 at he June 2021 virtual meeting.
This allows more efficient construction of std::pair members when {} is
used as a constructor argument. The perfect forwarding constructor can
be used, so that the member variables are constructed from forwarded
arguments instead of being copy constructed from temporaries.
libstdc++-v3/ChangeLog:
PR libstdc++/105505
* include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
default template arguments, as per P1951R1.
* testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions