STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcruntime_new.h
Go to the documentation of this file.
1 //
2 // vcruntime_new.h
3 //
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // Declarations and definitions of memory management functions in the VCRuntime.
7 //
8 #pragma once
9 
10 #include <vcruntime.h>
11 
12 #ifdef __cplusplus
13 extern "C++" {
14 
15 #pragma pack(push, _CRT_PACKING)
16 
17 #pragma warning(push)
18 #pragma warning(disable: 4985) // attributes not present on previous declaration
19 
20 #pragma push_macro("new")
21 #undef new
22 
23 #ifndef __NOTHROW_T_DEFINED
24 #define __NOTHROW_T_DEFINED
25  namespace std
26  {
27  struct nothrow_t { };
28 
29  extern nothrow_t const nothrow;
30  }
31 #endif
32 
34 _VCRT_ALLOCATOR void* __CRTDECL operator new(
35  size_t _Size
36  );
37 
39 _VCRT_ALLOCATOR void* __CRTDECL operator new(
40  size_t _Size,
41  std::nothrow_t const&
42  ) throw();
43 
45 _VCRT_ALLOCATOR void* __CRTDECL operator new[](
46  size_t _Size
47  );
48 
50 _VCRT_ALLOCATOR void* __CRTDECL operator new[](
51  size_t _Size,
52  std::nothrow_t const&
53  ) throw();
54 
55 void __CRTDECL operator delete(
56  void* _Block
57  ) throw();
58 
59 void __CRTDECL operator delete(
60  void* _Block,
61  std::nothrow_t const&
62  ) throw();
63 
64 void __CRTDECL operator delete[](
65  void* _Block
66  ) throw();
67 
68 void __CRTDECL operator delete[](
69  void* _Block,
70  std::nothrow_t const&
71  ) throw();
72 
73 void __CRTDECL operator delete(
74  void* _Block,
75  size_t _Size
76  ) throw();
77 
78 void __CRTDECL operator delete[](
79  void* _Block,
80  size_t _Size
81  ) throw();
82 
83 #ifndef __PLACEMENT_NEW_INLINE
84  #define __PLACEMENT_NEW_INLINE
86  inline void* __CRTDECL operator new(size_t _Size, _Writable_bytes_(_Size) void* _Where) throw()
87  {
88  (void)_Size;
89  return _Where;
90  }
91 
92  inline void __CRTDECL operator delete(void*, void*) throw()
93  {
94  return;
95  }
96 #endif
97 
98 #ifndef __PLACEMENT_VEC_NEW_INLINE
99  #define __PLACEMENT_VEC_NEW_INLINE
101  inline void* __CRTDECL operator new[](size_t _Size, _Writable_bytes_(_Size) void* _Where) throw()
102  {
103  (void)_Size;
104  return _Where;
105  }
106 
107  inline void __CRTDECL operator delete[](void*, void*) throw()
108  {
109  }
110 #endif
111 
112 #pragma pop_macro("new")
113 
114 #pragma warning(pop)
115 #pragma pack(pop)
116 
117 } // extern "C++"
118 #endif // __cplusplus
#define NULL
Definition: vcruntime.h:236
#define _Ret_maybenull_
Definition: sal.h:526
STL namespace.
#define __CRTDECL
Definition: vcruntime.h:156
#define _Ret_notnull_
Definition: sal.h:525
#define _VCRT_ALLOCATOR
Definition: vcruntime.h:163
return(_PAIR_TYPE(_FwdIt)(_First, _First))
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
#define _Post_writable_byte_size_(size)
Definition: sal.h:649
#define _Writable_bytes_(size)
Definition: sal.h:634
#define _Success_(expr)
Definition: sal.h:256
_Size
Definition: vcruntime_string.h:36