xref: /llvm-project/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.lazy.verify.cpp (revision a3ab5120fd572215afeac190757834a041dda73a)
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 // This test makes sure that we don't evaluate `is_default_constructible<T>`
10 // too early in std::tuple's default constructor.
11 
12 // UNSUPPORTED: c++03
13 
14 #include <tuple>
15 
16 #include "test_macros.h"
17 
18 struct Outer {
19     template <class T>
20     struct Inner {
21         bool foo = false;
22     };
23     std::tuple<Inner<int>> tup;
24 };
25 
26 Outer x; // expected-no-diagnostics
27