Title
Unknown bound array member with brace-or-equal-initializer
Status
nad
Section
9.4.2 [dcl.init.aggr]
Submitter
Hubert Tong

Created on 2014-08-09.00:00:00 last changed 114 months ago

Messages

Date: 2014-11-15.00:00:00

Rationale (November, 2014):

The requirement for determining an omitted bound in an aggregate is that it be “initialized” (9.4.5 [dcl.init.list] paragraph 4); since the brace-or-equal-initializer might, in fact, be ignored in some or all uses of the class, it should not be considered as definitively initializing the member and thus does not determine the array bound. Clarification of this intent could be done editorially, but CWG felt that no normative change was required.

Date: 2022-11-20.07:54:16

The correct interpretation of an example like the following is not clear:

  struct A {
    int x[] = { 0 };
  };

Should the initializer be considered as implicitly determining the omitted array bound?

History
Date User Action Args
2014-11-24 00:00:00adminsetmessages: + msg5284
2014-08-09 00:00:00admincreate