C++ Logo

std-proposals

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 12 Aug 2026 02:52:30 +0300
On Wed, 12 Aug 2026 at 02:42, Mital Ashok via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> I can see a use case like:
>
> // header file
> namespace detail { // Or impl, internal, etc
> // ...
> }
> inline int api_function() {
> // Use detail::*
> }
> forget detail;
>
> But this purpose (inline function needing internal helpers but not exposing the helpers) can be achieved with modules

Fascinating. Other than such otherwise visible internal helpers, I
have certainly run into situations where you want
"use this wrapping, not the wrapped thing directly", but I'm not
entirely convinced this idea is the right tool for that.

Received on 2026-08-11 23:52:49