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