Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
EXCEPTION_SPECIFICATION_ON_NEW.cpp
Go to the documentation of this file.
1// checking for exception specification on new
2
3
25#include <stdlib.h>
26#include <stddef.h>
27#include "config.h"
28
29
30#ifndef _RWSTD_NO_NAMESPACE
31
32namespace std {
33
34struct bad_alloc { };
35
36}
37
38void* operator new (size_t) throw (std::bad_alloc);
39
40#else // if defined (_RWSTD_NO_NAMESPACE)
41
42struct bad_alloc { };
43
44void* operator new (size_t) throw (bad_alloc);
45
46#endif // _RWSTD_NO_NAMESPACE
47
48
49void* foo ()
50{
51 void *p = operator new (1);
52 return p;
53}
#define p
Definition 17.names.cpp:132
Definition json.h:5363