summaryrefslogtreecommitdiffstats
path: root/test/language.support/support.exception/exception.terminate/set.terminate/set_terminate.pass.cpp
blob: 9a2c549795b7a6370720d5d24fc3e5b22d4f5eef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
 
// test set_terminate

#include <exception>
#include <cstdlib>
#include <cassert>

void f1() {}
void f2() {}

int main()
{
    std::set_terminate(f1);
    assert(std::set_terminate(f2) == f1);
}