C++ Logo

std-discussion

Advanced search

Re: Positioning the && after the ...

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Thu, 30 Nov 2023 11:58:37 +0100
Il 30/11/23 11:26, Frederick Virchanza Gotham via Std-Discussion ha scritto:
> The syntax of Func1 makes more sense because we have to define
> variables as follows:
>
> int &&a = monkey, &&b = donkey, &&c = fish;
>
> That is to say: The '&&' goes with the name -- not with the type.

It goes with the type.

Multiple declarations in one statement is a syntax abomination that
should've never been introduced. It's banned from most coding guidelines.

My 2 c,
-- 
Giuseppe D'Angelo

Received on 2023-11-30 10:58:40