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 get_terminate 11 12#include <exception> 13#include <cstdlib> 14#include <cassert> 15 16void f1() {} 17void f2() {} 18 19int main() 20{ 21 std::set_terminate(f1); 22 assert(std::get_terminate() == f1); 23 std::set_terminate(f2); 24 assert(std::get_terminate() == f2); 25} 26