C++ Logo

std-discussion

Advanced search

Re: Structured binding declarations of arrays

From: language.lawyer_at <language.lawyer_at_[hidden]>
Date: Sat, 12 Mar 2022 14:55:27 +0300
On 12/03/2022 14:47, Vladimir Grigoriev via Std-Discussion wrote:
>
> In the C++ Standard (9.6 Structured binding declarations, p.#1) there is written:
>
> If the assignment-expression in the initializer has array type A and no ref-qualifier is present, e is defined by
>
> attribute-specifier-seqopt S cv A e ;
>
> and then
>
> Otherwise, e is defined as-if by
>
> attribute-specifier-seqopt decl-specifier-seq ref-qualifieropt e initializer ;
>
> Should ref_qualifier be mandatory (instead of optional) in the second case?

There are two conditions after «If». «Otherwise» part is applied when either (or both) of them is false.

Received on 2022-03-12 11:55:31