C++ Logo

std-proposals

Advanced search

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

From: Peter Sommerlad (C++) <"Peter>
Date: Mon, 1 May 2023 15:40:13 +0200
Hi,

first, I think I found a typo:

// Forwarding only needs typenames for ts
void wrap(auto x, Any Ts&& ...ts);

shouldn't that "Any" be spelled "auto" ? I also see more potential typos
but am unsure (i.e. function declaration "something(other)" seems to
miss a type or concept auto)

second, I am very reluctant to such a proposal where there is no keyword
recognizable to see that a name in a function decleration actually
denotes a concept and not a type. I was in favor of having to use
"concept" but can live with "auto"

third, how is disambiguation happening when one wants to omit the
parameter name? Has this been implemented in a parser?

ie.
auto func(Number N x, Float f) --> is f a typename or parameter?
or name hiding rules affected?




Михаил Найденов via Std-Proposals wrote on 01.05.23 13:45:
> 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.
>
>

Regards
Peter.
-- 
Peter Sommerlad
Better Software: Consulting, Training, Reviews
Modern, Safe & Agile C++
peter.cpp_at_[hidden]
+41 79 432 23 32

Received on 2023-05-01 13:40:20