
22 Aug
2017
22 Aug
'17
9:57 p.m.
On Tue, Aug 22, 2017 at 5:41 PM, Gary Furnish wrote:
You can then use std::address_of(*raw memory) to get the raw memory address.
addressof(*p) to construct an object (e.g. via placement new or via an allocator) is undefined if p points to storage without an object constructed in it. It is the reason libstdc++, libc++, Boost use to_raw_pointer(), to_address() functions). See P0653r1.[1] boost::to_address(p) instead should be fine. [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0653r1.html