File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ class doug_lea_alloc
43
43
void deallocate (pointer p, size_type n) const { g_render_allocator.free_impl ((void *&)p); }
44
44
void deallocate (void * p, size_type n) const { g_render_allocator.free_impl (p); }
45
45
char * __charalloc (size_type n) { return (char *)allocate (n); }
46
- void construct (pointer p, const T& _Val) { std::_Construct (p, _Val); }
47
- void destroy (pointer p) { std::_Destroy (p ); }
46
+ void construct (pointer p, const T& _Val) { new (p) T ( _Val); }
47
+ void destroy (pointer p) { p-> ~T ( ); }
48
48
size_type max_size () const
49
49
{
50
50
size_type _Count = (size_type)(-1 ) / sizeof (T);
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ class xalloc
108
108
char * _charalloc (size_type n) { return (char *)allocate (n); }
109
109
void deallocate (pointer p, size_type n) const { xr_free (p); }
110
110
void deallocate (void * p, size_type n) const { xr_free (p); }
111
- void construct (pointer p, const T& _Val) { std::_Construct (p, _Val); }
112
- void destroy (pointer p) { std::_Destroy (p ); }
111
+ void construct (pointer p, const T& _Val) { new (p) T ( _Val); }
112
+ void destroy (pointer p) { p-> ~T ( ); }
113
113
size_type max_size () const
114
114
{
115
115
size_type _Count = (size_type)(-1 ) / sizeof (T);
You can’t perform that action at this time.
0 commit comments