C++ Logo

std-proposals

Advanced search

Re: Function proposal: generic value_or

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 7 Jul 2021 14:56:00 +0300
On Wed, 7 Jul 2021 at 12:38, Gašper Ažman <gasper.azman_at_[hidden]> wrote:
>
> Ah yes, that failed, I remember. But would it still fail now that we have fold expressions? The 'unevaluated' aspects of op? are very verbose to emulate without additional language features.

Hard to guess; I'm not sure how fold expressions would make this
hypothetical language facility more palatable.
I'm not sure what you mean by verbosity of the unevaluated parts; [&]{
return thatVariable; } doesn't seem hugely
verbose to me.

Received on 2021-07-07 06:56:13