C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Terse lambda quick outline of an alternative
From: Zhihao Yuan (zy_at_[hidden])
Date: 2020-02-27 11:54:06


On Thursday, February 27, 2020 11:06 AM, Arthur O'Dwyer via Std-Proposals <std-proposals_at_[hidden]> wrote:

> the syntax []foo is frequently mentioned as a way of "lifting" an overload set into a lambda — that is, []foo should mean roughly [](auto&&... as) noexcept(noexcept(foo(FWD(as)...))) -> decltype(foo(FWD(as)...)) { return foo(FWD(as)...) }.
>
> std::transform(first, last, []std::toupper); // OK
>
> If you want to take the syntax []foo {}, you'd better be grabbing it for something that will be better than lifting. I don't think you are.

I don't know why lifting has to be in the syntax
[]foo, we can propose etaexpr(foo) if we find
that's useful.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________



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

Standard Proposals Archives on Google Groups