derive.pass.cpp 741 B

12345678910111213141516171819202122232425
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03, c++11, c++14
  10. // <optional>
  11. // class bad_optional_access : public logic_error
  12. #include <optional>
  13. #include <type_traits>
  14. int main()
  15. {
  16. using std::bad_optional_access;
  17. static_assert(std::is_base_of<std::logic_error, bad_optional_access>::value, "");
  18. static_assert(std::is_convertible<bad_optional_access*, std::logic_error*>::value, "");
  19. }