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

--- Comment #45 from fdlbxtqi <euloanty at live dot com> ---
(In reply to Jonathan Wakely from comment #43)
> (In reply to fdlbxtqi from comment #39)
> > const auto __c = __builtin_memcmp(&*__first1, &*__first2, __len) <=> 0;
> 
> Are you mistakenly reading this as dereferencing &*begin and &*end of an
> iterator range? Because that's not what it does. It dereferences the begin
> iterator of two separate non-empty ranges.
> 
> There is no past-the-end iterator in this statement.

But I still think &* is not a good idea tbh. Better just call
to_address(__first) to avoid potential issues of a contiguous iterator.

Reply via email to