- Title
- Is value-initialization of an array constant initialization?
- Status
- cd3
- Section
- 6.10.3.2 [basic.start.static]
- Submitter
- Steve Adamczyk
Created on 2012-03-29.00:00:00 last changed 152 months ago
Messages
Date: 2013-04-15.00:00:00
[Moved to DR at the April, 2013 meeting.]
Date: 2012-10-15.00:00:00
Proposed resolution (October, 2012): Change 6.10.3.2 [basic.start.static] paragraph 2 as follows: Constant initialization is performed: ... if an object with static or thread storage duration is not
initialized by a constructor call and if either the object is
value-initialized or every full-expression that appears in its
initializer is a constant expression.
Date: 2016-02-15.00:00:00
According to 6.10.3.2 [basic.start.static] paragraph 2,
Constant initialization is performed: ... if an object with static or thread storage duration is not initialized
by a constructor call and if every full-expression that appears in its
initializer is a constant expression.
Presumably this would include a value-initialization (i.e., with no
expressions) such as However, we have recently clarified the degenerate cases of other
similar rules referencing “every,” so it wouldn't hurt to
be more explicit here.
int a[1000]{};
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
| 2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
| 2013-05-03 00:00:00 | admin | set | messages: + msg4371 |
| 2013-05-03 00:00:00 | admin | set | status: ready -> dr |
| 2012-11-03 00:00:00 | admin | set | messages: + msg4044 |
| 2012-11-03 00:00:00 | admin | set | status: open -> ready |
| 2012-03-29 00:00:00 | admin | create | |