Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
GLOBAL_NOTHROW.cpp
Go to the documentation of this file.
1// checking for ::nothrow
2
3
25struct nothrow_t { };
26
27extern const nothrow_t nothrow;
28
30
31
32int main (int argc, char *argv[])
33{
34 (void)&argv;
35
36 // foil clever optimizers
37 if (argc > 2)
38 ptr = 0;
39
40 // will fail at link-time if ::nothrow is not defined
41 // in the compiler support library
42 return !(0 != ptr);
43}
#define main
const nothrow_t * ptr
const nothrow_t nothrow