mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
This is similar to the r16-3536-g0bb0d1d2880d56 change for std::pair, so that CTAD ignores the tuple(const Types&...) constructor and only uses the tuple(Types...) -> tuple<Types...> deduction guide. This ensures that the deduced type comes from the decayed argument types. libstdc++-v3/ChangeLog: PR libstdc++/121771 * include/std/tuple (tuple::tuple(const Elements&...)): Use type_identity_t to prevent constructor being used for CTAD. (tuple::tuple(allocator_arg_t, const A&, const Elements&...)): Likewise. * testsuite/20_util/tuple/cons/121771.cc: New test. Reviewed-by: Ville Voutilainen <ville.voutilainen@gmail.com>