1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class... Types> class tuple;
14 // template <class U1, class U2> tuple(pair<U1, U2>&& u);
16 // UNSUPPORTED: c++98, c++03
27 explicit B(int i) : id_(i) {}
35 explicit D(int i) : B(i) {}
41 typedef std::pair<long, std::unique_ptr<D>> T0;
42 typedef std::tuple<long long, std::unique_ptr<B>> T1;
43 T0 t0(2, std::unique_ptr<D>(new D(3)));
44 T1 t1 = std::move(t0);
45 assert(std::get<0>(t1) == 2);
46 assert(std::get<1>(t1)->id_ == 3);