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_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
35
namespace
std
{
36
37
typedef
void (*
unexpected_handler
)();
38
39
// looking for a definition in compiler support library
40
unexpected_handler
set_unexpected
(
unexpected_handler
)
throw
();
41
42
}
43
44
// will cause an ambiguity if namespace std isn't being honored
45
int
set_unexpected
();
46
47
void
handler
() { }
48
49
int
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
}
save
#define save
Definition
17.names.cpp:538
main
#define main
Definition
BAD_ALLOC_COPY_CTOR.cpp:32
unexpected_handler
void(* unexpected_handler)()
Definition
GLOBAL_SET_UNEXPECTED.cpp:33
handler
void handler()
Definition
STD_SET_UNEXPECTED.cpp:47
set_unexpected
int set_unexpected()
std
Definition
json.h:5363
Generated by
1.9.8