diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp new file mode 100644 index 0000000000000..16ee000cd90fa --- /dev/null +++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp @@ -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 +#include + +struct Test { + std::vector > v; +}; + +std::pair p;