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

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

pet-addressof.patch (2.31 KB)

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.


Errahhh, I did not look into _Rp too deep... sry.

What about line 730 and 745?

I missed those. I will take a closer look, thanks!


Thanks! Committed revision 187997.