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
10 // XFAIL: dylib-has-no-bad_optional_access
11 
12 // <optional>
13 
14 // class bad_optional_access : public exception
15 
16 #include <optional>
17 #include <type_traits>
18 
19 #include "test_macros.h"
20 
21 int main(int, char**)
22 {
23     using std::bad_optional_access;
24 
25     static_assert(std::is_base_of<std::exception, bad_optional_access>::value, "");
26     static_assert(std::is_convertible<bad_optional_access*, std::exception*>::value, "");
27 
28   return 0;
29 }
30