C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Initial draft for C++: Uniform Initialization for Multiple Variables

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 12 Aug 2024 08:35:58 -0700
On Monday 12 August 2024 04:44:35 GMT-7 Amber Bhardwaj via Std-Proposals
wrote:
> > *type {var1, var2, ..., varn} = value;*

This syntax is already valid, so you'll have to find another. If you happen to
match the number of arguments of the constructor, the type is assignable, and
the variables you're trying to declare are shadowing existing variables, it
even compiles:

https://gcc.godbolt.org/z/edPnh6c5n

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-08-12 15:36:05