C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Explicitly specifying default arguments

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Wed, 1 Feb 2023 15:59:21 +0000
On Wed, 1 Feb 2023 at 15:40, Andrey Semashev via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On 2/1/23 17:25, Bo Persson via Std-Proposals wrote:
> > One argument could be that there are several ways around the limitation.
> >
> > Like if the arguments are not all of the same type, you can have
> > overloads with fewer arguments that forwards to the full function.
>
> Obviously, this would complicate maintenance as you'd have to provide
> all permutations of the specified/not specified optional arguments.
>

Which is exactly what we do with std:: container constructors, and it's a
major pain.

Received on 2023-02-01 15:59:35