Debian Codegraph @

libcxx/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp

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