C++ Logo


Advanced search

Re: [std-proposals] Contradiction about this parameter in the C++ standard

From: language.lawyer_at <language.lawyer_at_[hidden]>
Date: Mon, 18 Apr 2022 22:07:36 +0300
On 18/04/2022 19:45, Anoop Rana via Std-Proposals wrote:
> we know that if we have a function parameter named `var`, then the
> value category of that parameter `var`(as an expression) is an *lvalue*.

We know this about `var`s which are id-expressions.

> Thus, reading the 2nd quoted statement above(that implies that a non-static
> member function has a `this` parameter), the same should apply to the
> `this` parameter.

`this` is a separate grammar production which is not an id-expression. Thus, your reasoning is trivially incorrect.
But it doesn't mean there is no [editorial] defect in the wording. «the `this` parameter of the function» sounds really weird.

Received on 2022-04-18 19:07:40