Skip to content

Commit

Permalink
Add a regression test for recent regression in pair. (#97355)
Browse files Browse the repository at this point in the history
PR #96165 broke code similar to this test, and was subsequently
reverted. Add a test-case, to ensure the problem won't reoccur.

This error is potentially related to issues #59292 and #59966.
  • Loading branch information
jyknight authored Jul 2, 2024
1 parent 43b9888 commit cfbad45
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 reoccurrance of the issue introduced
// in 5e1de27f680591a870d78e9952b23f76aed7f456.

#include <utility>
#include <vector>

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

std::pair<int, Test> p;

0 comments on commit cfbad45

Please sign in to comment.