C++ Logo


Advanced search

Re: Function proposal: generic value_or

From: Bo Persson <bo_at_[hidden]>
Date: Wed, 18 Aug 2021 14:00:42 +0200
On 2021-08-18 at 10:25, Francesco Pretto via Std-Proposals wrote:
> On Wed, 7 Jul 2021 at 11:18, Ville Voutilainen via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>> It's not at all obvious to me why something like this should have a
>> dedicated core language syntax
> One could argue the same for the comma operator (expression)[1], which
> I personally never found practical uses or I was always able to
> replace it with something more readable.

The fact that we already have some pretty useless operators is a very
weak argument for adding more special operators.

We could rather argue that the possibility of overloading the comma
operator ought to be removed. Preferrably together with
non-short-curcuiting operators && and ||.

Received on 2021-08-18 07:00:58