xref: /llvm-project/libcxx/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp (revision a53eb79be683120402e7e57aebb47b36fc259066)
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++98, c++03, c++11, c++14
10 
11 // XFAIL: dylib-has-no-bad_optional_access
12 
13 // <optional>
14 
15 // class bad_optional_access is default constructible
16 
17 #include <optional>
18 #include <type_traits>
19 
20 int main(int, char**)
21 {
22     using std::bad_optional_access;
23     bad_optional_access ex;
24 
25   return 0;
26 }
27