This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1339. Parenthesized braced-init-list and arrays

Section: 9.4  [dcl.init]     Status: NAD     Submitter: Jason Merrill     Date: 2011-08-03

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.

Rationale (August, 2011):

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