Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
STD_SET_NEW_HANDLER.cpp
Go to the documentation of this file.
1// checking for std::set_new_handler()
2
3
25#include "config.h"
26
27#ifdef _RWSTD_NO_EXCEPTION_SPECIFICATION
28
29# define throw()
30
31#endif // _RWSTD_NO_EXCEPTION_SPECIFICATION
32
33// will fail if namespaces aren't supported
34namespace std {
35
36typedef void (*new_handler)();
37
38// looking for a definition in compiler support library
40
41}
42
43// will cause an ambiguity if namespace std isn't being honored
45
46void handler () { }
47
48int main (int argc, char *argv[])
49{
50 (void)&argv;
51
52 if (argc > 1) {
53 std::new_handler save = std::set_new_handler (handler);
54
55 return save == handler;
56 }
57
58 return 0;
59}
#define save
Definition 17.names.cpp:538
#define main
void(* new_handler)()
void handler()
int set_new_handler()
Definition json.h:5363