Merge r55012 adding Wine3D control panel as per Amine's request.
[reactos.git] / include / c++ / new
1 // Standard C++ dynamic memory management header
2
3 #ifndef _NEW
4 #define _NEW
5
6 #include <cstddef>
7 #include <exception>
8
9 extern "C++" {
10
11 namespace std
12 {
13 class bad_alloc : public exception
14 {
15 public:
16 bad_alloc() throw() { }
17
18 // This declaration is not useless:
19 // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
20 virtual ~bad_alloc() throw();
21
22 // See comment in eh_exception.cc.
23 virtual const char* what() const throw();
24 };
25
26 struct nothrow_t { };
27
28 extern const nothrow_t nothrow;
29 } // namespace std
30
31 typedef void (*new_handler)();
32
33 new_handler set_new_handler(new_handler) throw();
34
35 void* operator new (std::size_t size, const std::nothrow_t& nothrow_constant) throw();
36 inline void* operator new (std::size_t size, void* ptr) throw() { return ptr; }
37 void* operator new[] (std::size_t size, const std::nothrow_t& nothrow_constant) throw();
38 inline void* operator new[] (std::size_t size, void* ptr) throw() { return ptr; }
39
40 void operator delete (void* ptr) throw ();
41 void operator delete (void* ptr, const std::nothrow_t& nothrow_constant) throw();
42 inline void operator delete (void* ptr, void* voidptr2) throw() { }
43 void operator delete[] (void* ptr) throw ();
44 void operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant) throw();
45 inline void operator delete[] (void* ptr, void* voidptr2) throw() { }
46 //@}
47 } // extern "C++"
48
49 #endif