[cfe-dev] [libc++] Two more places to use std::addressof

Howard Hinnant hhinnant at apple.com
Wed Aug 7 16:05:01 PDT 2013


On Aug 7, 2013, at 2:18 PM, Zhihao Yuan <lichray at gmail.com> wrote:

> One is std::future, obviously; another one is std::reference_wrapper.

Partially committed revision 187927.

I needed to move the implementation of addresssof into <__functional_base> to keep the header dependency non-circular.

This treatment isn't needed in <future> because the type having its address taken is:

    typename aligned_storage<sizeof(_Rp), alignment_of<_Rp>::value>::type

This is a type that libc++ controls, and will never overload the operator&() on it.

Thanks,
Howard




More information about the cfe-dev mailing list