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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to M Welinder from comment #2)
> I think the current magic-pointer code could be improved with something like
> 
>     template<class T,std::enable_if_t<std::is_same_v<T,std::nullptr_t>>>
>     bool operator< (..., T) = delete;

Or another constructor for the __cmp_cat::__unspec type. I did try that at one
point.

The current code was the least bad solution of several that I tried. I didn't
notice the -Wzero-as-null-pointer-constant warning because it's not enabled by
default (because it's about coding style, not correctness).

Reply via email to