C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Flexible function parameters
From: Matthew Woehlke (mwoehlke.floss_at_[hidden])
Date: 2020-07-09 15:19:19


On 09/07/2020 11.06, Filippo Casarin via Std-Proposals wrote:
> Given the code
>
> void foo(int a=1000696967, int b=1000696969);
>
> In c++20 there is no way to call `foo` specifying a value for `b` but not
> for `a`

I would much prefer named parameters for that.

Also, use of `;` inside a parameter list is very nearly 'over my dead
body' territory, at least for me. And I want `:` for named parameters.

> In c++20 you can't have multiple parameters packs in a function

Language-level tuples, which have been kicked around, are probably a
better solution to that.

-- 
Matthew

STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups