C++ Logo

std-proposals

Advanced search

Re: [std-proposals] The syntax of forward and move macros

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 29 Aug 2022 17:34:43 -0300
On Monday, 29 August 2022 10:53:55 -03 Михаил Найденов via Std-Proposals
wrote:
> I personally think, this should be a minimal-syntax, non-overridable, unary
> postscript operator that will work for both forward and move, much like
> cast-to-T&& today
>
> template <typename T> Dog(T&& name) : name(name&&) //< forward
> {}


And what is this expression?

 foo = bar&& + 1;

Mind you, it's valid today.

Unless this proposal is requiring that the unary postfix operator use
parentheses:

 foo = (bar&&) + 1;

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2022-08-29 20:34:47