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