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