This makes debug_three_way_comp consistent with debug_less and
in particular gets rid of a potential use-after-move caused by the
use of std::forward. In the previous version of the code, we would
call __do_compare_assert after forwarding the arguments into the
comparator, which could end up using the arguments after they've been
moved from.
This also simplifies how we call __do_compare_assert by using
if constexpr and adds a missing test for proxy iterators in
lexicographical_compare_three_way, which could have found this
issue.
I might have missed it, but I can't find any reason why we need this overload in the old threads. Do you have any reasoning for having this overload?