terminate_handler.pass.cpp 610 B

1234567891011121314151617181920212223
  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. // test terminate_handler
  10. #include <exception>
  11. #include <type_traits>
  12. #include <cassert>
  13. void f() {}
  14. int main()
  15. {
  16. static_assert(std::is_same<std::terminate_handler, void(*)()>::value, "");
  17. std::terminate_handler p = f;
  18. assert(p == &f);
  19. }