xref: /llvm-project/libcxx/test/std/utilities/utility/pairs/pairs.pair/lwg3382.compile.pass.cpp (revision 44d4b3b2eebdd5eed95dd78dc3939dd9f5ebc5e6)
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 
11 #include <utility>
12 
13 template <auto>
14 struct Test {};
15 
test()16 void test() {
17   // LWG 3382. NTTP for pair and array
18   // https://cplusplus.github.io/LWG/issue3382
19 #if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
20   constexpr std::pair<int, long> a{};
21   [[maybe_unused]] Test<a> test1{};
22 #endif
23 }
24