Skip to content

Commit

Permalink
Add a regression test for recent regression in pair.
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.
  • Loading branch information
jyknight committed Jul 1, 2024
1 parent bf52884 commit 832d981
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 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.

// expected-no-diagnostics
#include <utility>
#include <vector>

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

std::pair<int, Test> p;

0 comments on commit 832d981

Please sign in to comment.