blob: d3539cebf9500d7378f2570330ab77a3fd5b1154 [file] [log] [blame]
Eric Fiselier95526d32016-04-19 01:19:25 +00001//===----------------------------------------------------------------------===//
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
22struct ExplicitCopy {
23 explicit ExplicitCopy(int) {}
24 explicit ExplicitCopy(ExplicitCopy const&) {}
25};
26
27std::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
33int main()
34{
35
36}