C++ Logo

std-discussion

Advanced search

Structured binding declarations of arrays

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Sat, 12 Mar 2022 14:47:51 +0300
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?
 
With best regards
(Vlad from Moscow)
 
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

Received on 2022-03-12 11:48:00