Closed vinniefalco closed 2 years ago
Looks like the right one to use is actually return ::operator new(size, do_allocate(size, align));
I must confess I don't understand yet what launder does. Were concerns raised in P0532r0 addressed?
Do we have some kind of BOOST_LAUNDER (calling some kind of "__builtin_launder", I guess) macro that avoids including
Well Peter's comment suggests you don't need launder
Allocator::allocate must create objects using launder( new(p) byte[n*sizeof(T)]
https://cplusplus.github.io/LWG/issue3471Change
memory_resource::allocate
to:On the build configurations that need it (C++17?) with suitable ifdefs.