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_NOTHROW.cpp
Go to the documentation of this file.
1
// checking for std::nothrow
2
3
26
// will fail if namespaces aren't supported
27
namespace
std
{
28
29
struct
nothrow_t
{ };
30
31
extern
const
nothrow_t
nothrow
;
32
33
}
// std
34
35
36
// force a failure by using the same name for an object of a diferent
37
// type than std:nothrow_t if namespace std isn't honored
38
const
std::nothrow_t
*
nothrow
= &std::nothrow;
39
40
41
int
main
(
int
argc,
char
*argv[])
42
{
43
(void)&argv;
44
45
// foil clever optimizers
46
if
(argc > 2)
47
nothrow
= 0;
48
49
// will fail at link-time if std::nothrow is not defined
50
// in the compiler support library
51
return
!(0 !=
nothrow
);
52
}
main
#define main
Definition
BAD_ALLOC_COPY_CTOR.cpp:32
nothrow
const nothrow_t nothrow
Definition
STD_NOTHROW.cpp:38
nothrow
const std::nothrow_t * nothrow
Definition
STD_NOTHROW.cpp:38
std
Definition
json.h:5363
nothrow_t
Definition
GLOBAL_NOTHROW.cpp:25
std::nothrow_t
Definition
OPERATOR_DELETE_ARRAY_NOTHROW.cpp:36
Generated by
1.9.8