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 // 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 int main(int, char**) 20 { 21 using std::bad_optional_access; 22 23 static_assert(std::is_base_of<std::exception, bad_optional_access>::value, ""); 24 static_assert(std::is_convertible<bad_optional_access*, std::exception*>::value, ""); 25 26 return 0; 27 } 28