C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Labelled parameters

From: David Brown <david.brown_at_[hidden]>
Date: Tue, 6 Jan 2026 09:27:16 +0100
On 06/01/2026 00:32, Jonathan Wakely via Std-Proposals wrote:
>
>
> On Mon, 5 Jan 2026, 23:09 Jason McKesson via Std-Proposals,
> <std-proposals_at_[hidden] <mailto:std-proposals_at_[hidden]>>
> wrote:
>

>
> Is it even legal for a C++ standard library implementation to use the
> standard-defined parameter names?
>
>
> It depends on the name. Some parameter names happen to use names that
> are already reserved by the standard library (e.g. "first" is reserved
> because of std::pair::first so any parameter called first can be named
> exactly that in an implementation).
>
>
> My understanding is that a lot of
> them use `_Capital` names
>
>
> Only one of the Majestic Three does that. The other two use __lower.
>
>
> for parameters to provide protection against
> rogue macros. If they don't do that, then it's possible for
> implementations included via headers to be broken by macros defining
> parameter names.
>
>
> Yes.
>

Am I correct in thinking that a C++ standard library /could/ use the
parameter names as documented in the standard, if modules were used
rather than headers? If so, then that might give a path towards being
able to use named parameters with the standard library functions.

Received on 2026-01-06 08:27:24