1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <tuple> 10 11 // template <class... Types> class tuple; 12 13 // template <class Alloc, class ...UTypes> 14 // tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&&); 15 16 // UNSUPPORTED: c++03 17 18 #include <tuple> 19 #include <memory> 20 21 struct ExplicitCopy { ExplicitCopyExplicitCopy22 explicit ExplicitCopy(int) {} ExplicitCopyExplicitCopy23 explicit ExplicitCopy(ExplicitCopy const&) {} 24 }; 25 explicit_move_test()26std::tuple<ExplicitCopy> explicit_move_test() { 27 std::tuple<int> t1(42); 28 return {std::allocator_arg, std::allocator<int>{}, std::move(t1)}; 29 // expected-error@-1 {{chosen constructor is explicit in copy-initialization}} 30 } 31