C++ Logo

std-proposals

Advanced search

Re: Flexible function parameters

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Thu, 9 Jul 2020 16:19:19 -0400
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

Received on 2020-07-09 15:22:36