https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416

--- Comment #16 from Glen Joseph Fernandes <glenjofe at gmail dot com> ---
> should a wording defect be raised against std::to_address(Ptr), to state that 
> pointer_traits<Ptr> being well-formed is actually a prerequisite?

That's not an omission in the specification of to_address. The function is
intended for pointers, and specified in terms of checking for a
pointer_traits<P> member, and this means pointer_traits<P> must be well-formed. 

Adding an additional text to the specification saying this explicitly is
unlikely to help anyone. The real change that users of iterators[1] would want
is to make pointer_traits SFINAE friendly.

[1] Users of pointers don't care much, since all the pointer types people are
using with to_address(p) already have a well-formed pointer_traits<P>.

Reply via email to