1e280407aSLouis Dionne //===----------------------------------------------------------------------===// 2*6a54dfbfSLouis Dionne // 3e280407aSLouis Dionne // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4e280407aSLouis Dionne // See https://llvm.org/LICENSE.txt for license information. 5e280407aSLouis Dionne // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6e280407aSLouis Dionne // 7e280407aSLouis Dionne //===----------------------------------------------------------------------===// 8e280407aSLouis Dionne 9e280407aSLouis Dionne // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 10e280407aSLouis Dionne 11e280407aSLouis Dionne // Make sure std::bad_expected_access<E> inherits from std::bad_expected_access<void>. 12e280407aSLouis Dionne 13e280407aSLouis Dionne #include <expected> 14e280407aSLouis Dionne #include <type_traits> 15e280407aSLouis Dionne 16e280407aSLouis Dionne struct Foo {}; 17e280407aSLouis Dionne 18e280407aSLouis Dionne static_assert(std::is_base_of_v<std::bad_expected_access<void>, std::bad_expected_access<int>>); 19e280407aSLouis Dionne static_assert(std::is_base_of_v<std::bad_expected_access<void>, std::bad_expected_access<Foo>>); 20