C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Limited friendship

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Tue, 6 May 2025 21:44:22 -0400
On Tue, May 6, 2025 at 8:30 PM Magnus Fromreide via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Hello!
>
> One problem with friendship is that it is all or nothing.
> I think there should exist a kind of limited friendship as follows:
>

There is; check out the "passkey idiom."
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2893r3.html#passkey-idiom
https://playfulprogramming.com/posts/a-forgotten-idiom-revisited-pass-key

HTH,
Arthur

Received on 2025-05-07 01:44:39