llvm-project/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr
Louis Dionne 17f2d1cb9b [libc++] Fix QoI bug with construction of std::tuple involving std::any
In std::tuple, we should try to avoid calling std::is_copy_constructible
whenever we can to avoid surprising interactions with (I believe) compiler
builtins. This bug was reported in https://reviews.llvm.org/D96523#2730953.

The issue was that when tuple<_Up...> was the same as tuple<_Tp...>, we
would short-circuit the _Or (because sizeof...(_Tp) != 1) and go evaluate
the following `is_constructible<_Tp, const _Up&>...`. That shouldn't
actually be a problem, but see the analysis in https://reviews.llvm.org/D101770#2736470
for why it is with Clang and GCC.

Instead, after this patch, we check whether the constructed-from tuple
is the same as the current tuple regardless of the number of elements,
since we should always prefer the normal copy constructor in that case
anyway.

Differential Revision: https://reviews.llvm.org/D101770
2021-05-04 16:42:36 -04:00
..
PR20855_tuple_ref_binding_diagnostics.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
PR22806_constrain_tuple_like_ctor.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
PR23256_constrain_UTypes_ctor.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
PR27684_contains_ref_to_incomplete_type.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
PR31384.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
UTypes.compile.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
UTypes.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
alloc.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_UTypes.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
alloc_const_Types.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
alloc_const_Types.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_const_pair.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_convert_copy.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
alloc_convert_copy.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_convert_move.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
alloc_convert_move.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_copy.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_move.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
alloc_move_pair.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
cnstr_with_any.compile.pass.cpp [libc++] Fix QoI bug with construction of std::tuple involving std::any 2021-05-04 16:42:36 -04:00
const_Types.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
const_Types.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
const_Types2.compile.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
const_pair.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
convert_copy.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
convert_move.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
copy.compile.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
copy.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
deduct.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
default.fail.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
default.lazy.verify.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00
default.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
dtor.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
move.pass.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
move_pair.pass.cpp [libc++] Fix constexpr-ness of std::tuple's constructor 2021-04-30 15:55:10 -04:00
recursion_depth.pass.cpp [libc++] Fix template instantiation depth issues with std::tuple 2021-05-03 14:42:07 -04:00
test_lazy_sfinae.pass.cpp [libc++] Rewrite the tuple constructors to be strictly Standards conforming 2021-04-23 12:46:37 -04:00