Tidy up calls to placement new

This commit is contained in:
Vinnie Falco
2018-12-02 19:48:42 -08:00
parent 397c388e18
commit b3a8e6edb5
5 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -1168,7 +1168,7 @@ new_element(field name,
auto const p = alloc_traits::allocate(a,
(sizeof(element) + off + len + 2 + sizeof(align_type) - 1) /
sizeof(align_type));
return *(new(p) element(name, sname, value));
return *(::new(p) element(name, sname, value));
}
template<class Allocator>
@@ -276,7 +276,7 @@ private:
16, sizeof(prng_type));
if(! p)
BOOST_THROW_EXCEPTION(std::bad_alloc{});
return *(new(p) prng_type(seed(), n_++));
return *(::new(p) prng_type(seed(), n_++));
}
void