|
@@ -238,6 +238,21 @@ int main(int, char**)
|
|
|
);
|
|
|
assert(t2 == std::make_tuple(std::make_tuple(1), std::make_tuple(2)));
|
|
|
}
|
|
|
+ {
|
|
|
+ int x = 101;
|
|
|
+ std::tuple<int, int&, const int&, int&&> t(42, x, x, std::move(x));
|
|
|
+ const auto& ct = t;
|
|
|
+ std::tuple<int, int&, const int&> t2(42, x, x);
|
|
|
+ const auto& ct2 = t2;
|
|
|
+
|
|
|
+ auto r = std::tuple_cat(std::move(t), std::move(ct), t2, ct2);
|
|
|
|
|
|
+ ASSERT_SAME_TYPE(decltype(r), std::tuple<
|
|
|
+ int, int&, const int&, int&&,
|
|
|
+ int, int&, const int&, int&&,
|
|
|
+ int, int&, const int&,
|
|
|
+ int, int&, const int&>);
|
|
|
+ ((void)r);
|
|
|
+ }
|
|
|
return 0;
|
|
|
}
|