C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow using type alias in requires-clause

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Sat, 20 Jun 2026 20:55:13 +0200
On 6/20/26 11:32, Hewill Kang via Std-Proposals wrote:
> Hi all,
>
> After three years, I finally had the opportunity to finish this paper, and I am grateful for any feedback:
>
> https://isocpp.org/files/papers/D4281R0.html <https://isocpp.org/files/papers/D4281R0.html>

I don't follow the second one of the two reasons given for requiring
"typename": "Second, it ensures parser simplification."

If we can get away without typename for alias-declarations, we sure can
get away without typename in requires-expressions, too. Do you have actual
compiler implementation experience to the contrary?

" If a type-requirement introduces an identifier, "

We don't know whether this "introduces an identifier".
The grammar has one, sure, but we don't know whether
that identifier is "introduced". Maybe it's looked up.

Why do we need the special text about "in scope" here?
If we need special text about scope (I think we do),
it should go into [basic.scope].

Jens

Received on 2026-06-20 18:55:17