Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
STD_NOTHROW_T.cpp
Go to the documentation of this file.
1// checking for std::nothrow_t
2
3
25#include <stddef.h> // for size_t
26
27#include "config.h"
28
29
30// will fail if namespaces aren't supported
31namespace std
32{
33 struct nothrow_t { };
34}
35
36
37// force a failure if namespace std isn't honored
38void nothrow_t ();
39
40
41#ifdef _RWSTD_NO_EXCEPTION_SPECIFICATION
42# define throw()
43#endif // _RWSTD_NO_EXCEPTION_SPECIFICATION
44
45
46// try to use ::operator new (size_t, std::nothrow_t)
47// and guess whether std::nothrow_t is defined or not
48void* operator new (size_t, const std::nothrow_t&) throw ();
49
50
51int main ()
52{
53 ::operator new (1, std::nothrow_t ());
54
55 return 0;
56}
void nothrow_t()
int main()
Definition json.h:5363