Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
OPERATOR_NEW_NOTHROW.cpp
Go to the documentation of this file.
1// checking for operator new (size_t, nothrow_t)
2
3
25
44#include "config.h"
45
46#include <stddef.h> // for size_t
47
48#ifndef _RWSTD_NO_NAMESPACE
49# ifndef _RWSTD_NO_STD_NOTHROW_T
50
51namespace std {
52
53# endif // _RWSTD_NO_STD_NOTHROW_T
54#endif // _RWSTD_NO_NAMESPACE
55
56struct nothrow_t { };
57
58#ifndef _RWSTD_NO_NAMESPACE
59# ifndef _RWSTD_NO_STD_NOTHROW_T
60
61} // end namespace std
62
63using std::nothrow_t;
64
65# endif // _RWSTD_NO_STD_NOTHROW_T
66#endif // _RWSTD_NO_NAMESPACE
67
68
69#ifdef _RWSTD_NO_EXCEPTION_SPECIFICATION
70# define throw()
71#endif // _RWSTD_NO_EXCEPTION_SPECIFICATION
72
73
74void* operator new (size_t, const nothrow_t&) throw ();
75
76int main ()
77{
78 ::operator new (1, nothrow_t ());
79
80 return 0;
81}
int main()
Definition json.h:5363