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 U1, class U2>
15 //   tuple& operator=(const pair<U1, U2>& u);
16 
17 // UNSUPPORTED: c++98, c++03
18 
19 #include <tuple>
20 #include <utility>
21 #include <cassert>
22 
main()23 int main()
24 {
25     {
26         typedef std::pair<double, char> T0;
27         typedef std::tuple<int, short> T1;
28         T0 t0(2.5, 'a');
29         T1 t1;
30         t1 = t0;
31         assert(std::get<0>(t1) == 2);
32         assert(std::get<1>(t1) == short('a'));
33     }
34 }
35