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// UNSUPPORTED: c++98, c++03
11
12// <utility>
13
14// template <class T1, class T2> struct pair
15
16// template <class... Args1, class... Args2>
17//     pair(piecewise_construct_t, tuple<Args1...> first_args,
18//                                 tuple<Args2...> second_args);
19
20#include <utility>
21#include <tuple>
22#include <cassert>
23
24int main()
25{
26    {
27        typedef std::pair<int, int*> P1;
28        typedef std::pair<int*, int> P2;
29        typedef std::pair<P1, P2> P3;
30        P3 p3(std::piecewise_construct, std::tuple<int, int*>(3, nullptr),
31                                        std::tuple<int*, int>(nullptr, 4));
32        assert(p3.first == P1(3, nullptr));
33        assert(p3.second == P2(nullptr, 4));
34    }
35}
36