C++ Logo

std-proposals

Advanced search

Re: Function proposal: generic value_or

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 7 Jul 2021 12:18:13 +0300
On Wed, 7 Jul 2021 at 12:02, Gašper Ažman via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> How about proposing the elvis operator instead?

That would be http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf,
which wasn't successful.
It's not at all obvious to me why something like this should have a
dedicated core language syntax,
as opposed to having a utility function along the lines of what's
suggested in this thread. The questions
about a language change motivation and its costs and concerns attached
to them don't really arise
for a utility function.

Received on 2021-07-07 04:18:26