C++ Logo


Advanced search

Re: [std-proposals] [Resurrected Proposal] Concept introduces a typename

From: Andrew Tomazos <andrewtomazos_at_[hidden]>
Date: Tue, 2 May 2023 21:32:17 +1000
For what it's worth, I'm strongly in favor of the underlying motivation of
this proposal.

You should be able to write:

   void sort(Sortable& x);

as was originally intended when concepts were designed.

They added this auto nonsense at the last minute to obtain consensus from
those that wanted to make such concept-based functions more distinctive as
function templates than normal functions. Most think that's silly and not
worth fouling up the syntax, but we needed the votes of that minority to
get it through.

It's possible that consensus can be obtained to overturn that design
decision now that more people have gotten the chance to actually use
concepts in the field. (Although it's possible people are getting used to
the bad syntax, too.)

On Mon, May 1, 2023 at 9:46 PM Михаил Найденов via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Hello, I am resurrecting a 5 year proposal I never presented.
> It suggests, "auto" in a "constrained auto" scenario can be replaced with
> a name, which will be a typename, introduced for the current function.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2023-05-02 11:32:30