C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Proposal: template function solution to Pythonic optional function arguments
From: Richard Hodges (hodges.r_at_[hidden])
Date: 2020-07-20 04:10:59


>
>
>
> 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


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

Standard Proposals Archives on Google Groups