Home | History | Annotate | Download | only in set.new.handler
      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 set_new_handler
     11 
     12 #include <new>
     13 #include <cassert>
     14 
     15 void f1() {}
     16 void f2() {}
     17 
     18 int main()
     19 {
     20     assert(std::set_new_handler(f1) == 0);
     21     assert(std::set_new_handler(f2) == f1);
     22 }
     23