[OpenACC] Implement 'device_type' for 'data' construct
[llvm-project.git] / libcxx / test / std / language.support / support.exception / exception.terminate / set.terminate / get_terminate.pass.cpp
blobdebc8b42820d951e4a12e9cfe182e0505cc016cf
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 //===----------------------------------------------------------------------===//
9 // test get_terminate
11 #include <exception>
12 #include <cstdlib>
13 #include <cassert>
15 #include "test_macros.h"
17 void f1() {}
18 void f2() {}
20 int main(int, char**)
22 std::set_terminate(f1);
23 assert(std::get_terminate() == f1);
24 std::set_terminate(f2);
25 assert(std::get_terminate() == f2);
27 return 0;