C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Parameters with default values at arbitrary positions, with empty arguments

From: Alejandro Colomar <une+cxx_std-proposals_at_[hidden]>
Date: Fri, 27 Nov 2026 15:02:00 +0100
Hi David, Simon,

> Date: 2026-11-27 14:31:45+0100
> From: David Brown via Std-Proposals <std-proposals_at_[hidden]>
>
>
>
> On 27/11/2026 14:12, Simon Schröder wrote:
> >
> > On Fri, Nov 27, 2026 at 1:57 PM David Brown via Std-Proposals <std-
> > proposals_at_[hidden] <mailto:std-proposals_at_[hidden]>>
> > wrote:
> >
> >
> > For C, you could just have
> >
> > #define default
> >
> > and then include the "default" for clarity and portability. That would
> > not force the use of "default", but it would at least allow it.
> >
> >
> > C still has 'switch'. So, you shouldn't be doing that...
>
> Good point!

Does C++ not have 'switch'? I see 8.5.3 "The switch statement" in
n5054.

> I guess the obvious answer in C is to use _Default instead :-)

Having default and _Default mean different things would be confusing.


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es>

Received on 2026-11-27 14:02:05