You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since in c++17 standard, we introduce the aggregate initialization with the following sentence
When an aggregate is initialized by an initializer list as specified in [dcl.init.list], the elements of the initializer list are taken as initializers for the elements of the aggregate, in order.
"In order" hints that each element is initialized with the subsequent element of the initializer list. "In order" is instead with "corresponding" in the current draft, such as
Otherwise, the element is copy-initialized from the corresponding initializer-clause or is initialized with the brace-or-equal-initializer of the corresponding designated-initializer-clause.
I would argue that the use of either "in order" or "corresponding" is a bit vague in the definitions of the aggregate initialization. We should give that definition a more formal approach? For instance
Otherwise, the nth element is copy-initialized from the correspondingnth initializer-clause or is initialized with the brace-or-equal-initializer of the correspondingnth designated-initializer-clause.
Which can coordinate with [dcl.init.aggr] p3.2
If the initializer list is a brace-enclosed initializer-list, the explicitly initialized elements of the aggregate are the first n elements of the aggregate, where n is the number of elements in the initializer list.
The text was updated successfully, but these errors were encountered:
Since in c++17 standard, we introduce the aggregate initialization with the following sentence
"In order" hints that each element is initialized with the subsequent element of the initializer list. "In order" is instead with "corresponding" in the current draft, such as
I would argue that the use of either "in order" or "corresponding" is a bit vague in the definitions of the aggregate initialization. We should give that definition a more formal approach? For instance
Which can coordinate with [dcl.init.aggr] p3.2
The text was updated successfully, but these errors were encountered: