The latest installment in the ever-evolving saga of __cpp17_contiguous_iterator, __wrap_iter, and __unwrap_iter...
Instead of overloading __to_address, let's specialize pointer_traits. Function overloads need to be in scope at the point where they're called, whereas template specializations do not. (User code can provide pointer_traits specializations to be used by already-included library code, so obviously __wrap_iter can do the same.)
pointer_traits<__wrap_iter<It>> cannot provide pointer_to, because you generally cannot create a __wrap_iter without also knowing the identity of the container into which you're trying to create an iterator. I believe this is OK; contiguous iterators are required to provide to_address but *not* necessarily pointer_to.
I'm less sure about whether pointer_traits must provide rebind... but I don't see how it could possibly be implementable, so I think it'll be OK to omit it.
I think we should only specialize for __wrap_iter<_Tp*>, or perhaps for any _It that is a contiguous iterator. Otherwise, we're not guaranteed that it's legal to call to_address(__w.base()) below. WDYT?