Boost logo

Boost :

Subject: Re: [boost] Review Request: impl_ptr (pimpl)
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2017-08-22 21:57:20

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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at