I wrote that:

 

You may also like to define a macro:

 

#define _M(expr) ##expr = std::move(##expr)

 

Now, if this macro gets named as _MOVE_CAPTURE (or something similar...) in <stdlib.h>, your suggestion becomes redundant.

 

From: Jason McKesson via Std-Proposals
Sent: 01 June 2022 18:26
To: std-proposals@lists.isocpp.org
Cc: Jason McKesson
Subject: Re: [std-proposals] Easier syntax for move-capture in lambdas

 

On Wed, Jun 1, 2022 at 3:52 AM Abdullah Qasim via Std-Proposals
<std-proposals@lists.isocpp.org> wrote:
>
> However, remember that “&&” primarily means “R-value” reference!
>
>
>
> [&&] {
>
>           // this should mean “R-value” reference (sim. to const ref)
>
> }
>
>
>
> Also, you can use:
>
>
>
> using std::move;
>
>
>
> [a = move(a) , b = move(b)] {
>
>
>
> }
>
>
>
> You may also like to define a macro:
>
>
>
> #define _M(expr) ##expr = std::move(##expr)

Be aware that all identifiers starting with an underscore followed by
a capital letter are reserved for the implementation and cannot be
used by you.
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals