C++ Logo

std-proposals

Advanced search

Re: std::equality_comparable_with: relaxing the common reference requirements

From: Justin Bassett <jbassett271_at_[hidden]>
Date: Mon, 5 Jul 2021 09:43:56 -0700
After significantly more thought, I now have a draft proposal. There are a
few notable changes:

   - The previously proposed solution only solved one half of the problem,
   where CR is T and T is move-only. The solution in the draft additionally
   contains a fix for the case where CR is T and T(const U&) doesn't exist;
   only T(U&&).
      - It sounds crazy to move arguments just to determine if t == u, but
      we never actually do this at runtime; we only need that a conversion to a
      good supertype exists.
      - Is it concerning that a type with CR(const T&) but CR(T&&) = delete
      will fail this changed requirement? We could require convertible_to<const
      T&, const CR&> || convertible_to<T&&, const CR&> instead, although this
      would still break if the CR(T&&) constructor uses a static_assert rather
      than = delete.
      - std::three_way_comparable has the same issue as
   std::equality_comparable_with.

Some specific questions because I have never written a proposal before:

   - What are the different C++ working groups? I need to know what
   audience to select.
   - Are there any editorial changes or missing sections that should be
   added?
   - What is the process I need to follow to submit this proposal? I know I
   need to get a paper number and somehow submit it to the mailing by the July
   15th deadline.

Thanks,
Justin

Received on 2021-07-05 11:44:16