C++ Logo

std-proposals

Advanced search

Re: [std-proposals] A new C++ keyword: forget

From: Yongwei Wu <wuyongwei_at_[hidden]>
Date: Thu, 13 Aug 2026 19:18:14 +0800
On Wed, 12 Aug 2026 at 19:44, Rainer Deyke via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> There's is no need to allow a void variable to have its address taken,
> or to treat it as a real variable at all. Void is already a special
> case in the C++ type system with special rules. This actually makes
> grammatical sense in English if we treat "void" as a verb instead of a
> noun. "void a;" voids the variable a.
>
> I'm not a fan of this proposed feature at all, but at least re-using the
> "void" keyword avoids introducing yet another keyword into the language.

I second this. No more keywords are necessary here.

I also think it is semantically better than either `forget` or `unset`.

-- 
Yongwei Wu
URL: http://wyw.dcweb.cn/

Received on 2026-08-13 11:18:35