Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
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
34
namespace
std
{
35
36
typedef
void (*
new_handler
)();
37
38
// looking for a definition in compiler support library
39
new_handler
set_new_handler
(
new_handler
)
throw
();
40
41
}
42
43
// will cause an ambiguity if namespace std isn't being honored
44
int
set_new_handler
();
45
46
void
handler
() { }
47
48
int
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
}
save
#define save
Definition
17.names.cpp:538
main
#define main
Definition
BAD_ALLOC_COPY_CTOR.cpp:32
new_handler
void(* new_handler)()
Definition
GLOBAL_SET_NEW_HANDLER.cpp:33
handler
void handler()
Definition
STD_SET_NEW_HANDLER.cpp:46
set_new_handler
int set_new_handler()
std
Definition
json.h:5363
Generated by
1.9.8