Title
Parenthesized braced-init-list and arrays
Status
nad
Section
9.4 [dcl.init]
Submitter
Jason Merrill

Created on 2011-08-03.00:00:00 last changed 141 months ago

Messages

Date: 2011-08-15.00:00:00

Rationale (August, 2011):

A non-static data member initializer can be used in this case.

Date: 2022-11-20.07:54:16

The resolution of issue 1214 makes it ill-formed to use an initializer of the form ({...}) with a variable of a non-class type. This can cause problems with a mem-initializer of the form

  constexpr cond_variable() : cond(PTHREAD_COND_INITIALIZER) {}

If pthread_cond_t is an array, PTHREAD_COND_INITIALIZER will be a braced-init-list and the mem-initializer will be ill-formed.

History
Date User Action Args
2012-09-24 00:00:00adminsetmessages: + msg4025
2011-08-03 00:00:00admincreate