C++ Logo

std-proposals

Advanced search

Re: Proposal: template function solution to Pythonic optional function arguments

From: codusnocturnus <codusnocturnus_at_[hidden]>
Date: Mon, 20 Jul 2020 16:02:58 +0000
This would be great - just remove the braces, and the .’s, and the struct.

Sent from ProtonMail Mobile

On Mon, Jul 20, 2020 at 2:10 AM, Richard Hodges via Std-Proposals <std-proposals_at_[hidden]> wrote:

>> Its possible something like this already exists in the latest versions of C++ but if so I am not aware of it
>
> As of C++20, one could use designated initialisers to achieve this.
>
> Whether it's a good idea in C++ is another matter.
>
> https://godbolt.org/z/cd8szq
>
> --
>
> Richard Hodges
> hodges.r_at_[hidden]
> office: +442032898513
> home: +376841522
> mobile: +376380212

Received on 2020-07-20 11:06:27