1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // UNSUPPORTED: c++98, c++03, c++11, c++14
11 // <optional>
12
13 // struct nullopt_t{see below};
14 // constexpr nullopt_t nullopt(unspecified);
15
16 // [optional.nullopt]/2:
17 // Type nullopt_t shall not have a default constructor or an initializer-list constructor.
18 // It shall not be an aggregate and shall be a literal type.
19 // Constant nullopt shall be initialized with an argument of literal type.
20
21 #include <optional>
22 #include "test_macros.h"
23
main()24 int main()
25 {
26 std::nullopt_t n = {};
27 }
28