Fix return type of std::tuple_cat.
authorEric Fiselier <eric@efcs.ca>
Fri, 26 Apr 2019 01:02:18 +0000 (01:02 +0000)
committerEric Fiselier <eric@efcs.ca>
Fri, 26 Apr 2019 01:02:18 +0000 (01:02 +0000)
commit7e528bc4ce51daae5b90bf641f15ea564901de8b
treedcbce5acb5b1133b8608ebc91ceedc0ec9530eb6
parent1b76063a5e023b39b4a395d7fc68fd5fe1e6aba3
Fix return type of std::tuple_cat.

When the arguments to tuple cat were const, the const was incorrectly
propagated into the type of the resulting tuple. For example:

const std::tuple<int> t(42);
auto r = std::tuple_cat(t, t);
// Incorrect! should be std::tuple<int, int>.
static_assert(is_same_v<decltype(r), std::tuple<const int, const int>>);

llvm-svn: 359255
libcxx/include/tuple
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp