]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/language.support/support.exception/exception.terminate/terminate.handler/terminate_handler.pass.cpp
Vendor import of libc++ trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / std / language.support / support.exception / exception.terminate / terminate.handler / terminate_handler.pass.cpp
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
10 // test terminate_handler
11
12 #include <exception>
13 #include <type_traits>
14 #include <cassert>
15
16 void f() {}
17
18 int main()
19 {
20     static_assert((std::is_same<std::terminate_handler, void(*)()>::value), "");
21     std::terminate_handler p = f;
22     assert(p == &f);
23 }