aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/std/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp
blob: 2c670d7432ac3240894493add661ba80c55562c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// Check that instantiating pair doesn't look up type traits "too early", before
// the contained types have been completed.
//
// This is a regression test, to prevent a reoccurrence of the issue introduced
// in 5e1de27f680591a870d78e9952b23f76aed7f456.

#include <utility>
#include <vector>

struct Test {
  std::vector<std::pair<int, Test> > v;
};

std::pair<int, Test> p;