diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-09-02 22:30:46 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-09-03 10:49:12 +0100 |
commit | 0bb0d1d2880d562298eeec8eee4ab4e8ba943260 (patch) | |
tree | 42715b93ffa73c1a5058ef623bb770841366049a /libffi/src/riscv | |
parent | 381dbd4a9564525d930737a790c9b7d31dfc181f (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
For the pair(T1, T2) explicit deduction type to decay its arguments as
intended, we need the pair(const T1&, const T2&) constructor to not be
used for CTAD. Otherwise we try to instantiate pair<T1, T2> without
decaying, which is ill-formed for function lvalues.
Use std::type_identity_t<T1> to make the constructor unusable for an
implicit deduction guide.
libstdc++-v3/ChangeLog:
PR libstdc++/110853
* include/bits/stl_pair.h [C++20] (pair(const T1&, const T2&)):
Use std::type_identity_t<T1> for first parameter.
* testsuite/20_util/pair/cons/110853.cc: New test.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
Diffstat (limited to 'libffi/src/riscv')
0 files changed, 0 insertions, 0 deletions