Home | History | Annotate | Download | only in tuple.cnstr
      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 // <tuple>
     11 
     12 // template <class... Types> class tuple;
     13 
     14 // template <class Alloc, class ...UTypes>
     15 //   tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&&);
     16 
     17 // UNSUPPORTED: c++98, c++03
     18 
     19 #include <tuple>
     20 #include <memory>
     21 
     22 struct ExplicitCopy {
     23   explicit ExplicitCopy(int) {}
     24   explicit ExplicitCopy(ExplicitCopy const&) {}
     25 };
     26 
     27 std::tuple<ExplicitCopy> explicit_move_test() {
     28     std::tuple<int> t1(42);
     29     return {std::allocator_arg, std::allocator<void>{}, std::move(t1)};
     30     // expected-error@-1 {{chosen constructor is explicit in copy-initialization}}
     31 }
     32 
     33 int main()
     34 {
     35 
     36 }
     37