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++03
17 
18 #include <tuple>
19 #include <utility>
20 #include <cassert>
21 
22 #include "test_macros.h"
23 
24 int main(int, char**)
25 {
26     {
27         typedef std::pair<long, char> T0;
28         typedef std::tuple<long long, short> T1;
29         T0 t0(2, 'a');
30         T1 t1;
31         t1 = t0;
32         assert(std::get<0>(t1) == 2);
33         assert(std::get<1>(t1) == short('a'));
34     }
35 
36   return 0;
37 }
38