On Thu, Jul 20, 2017 at 12:53 PM, Jonathan Wakely wrote: > We have a more general problem with this, which is that if it's only > available for C++2a mode then we can't use the new feature in most of > the library. Which would be very unfortunate. I want to use this! > > In order to clean up the various places in the library that > could/should use to_address I think we need our own version of it. > Something like our std::__addressof which can be used even for C++98, > and is used by the implementation of the C++11 std::addressof. > > The attached patch does something like that. I think I'll commit this, > as it's a small improvement over what we have today. As the design of > P0653 evolves (*) we can revisit the definition of __to_address, to > use pointer_traits, or find user-defined overloads by ADL, or > something else. > > (*) there's an active discussion on the LEWG reflector, and Glen said > he's revising the paper.
Sounds good - thanks Jonathan. I'll revise the patch when P0653 evolves (and approaches acceptance), and when I do, I'll follow the suggestions and style that you've mentioned above. Glen