Title
Aggregate initialization with parenthesized string literal
Status
nad
Section
9.4.2 [dcl.init.aggr]
Submitter
Daveed Vandevoorde

Created on 2012-04-25.00:00:00 last changed 146 months ago

Messages

Date: 2012-10-15.00:00:00

Rationale (October, 2012):

CWG agreed that this is already permitted by virtue of _N4567_.5.1.1 [expr.prim.general] paragraph 6.

Date: 2022-11-20.07:54:16

Existing practice appears to be to allow C++03-style aggregate initialization from a parenthesized string literal, e.g.,

  struct S {
    char arr[4];
  } s = {("abc")};

This should be standardized, to allow examples like

  struct S {
    char arr[4];
  };
  void f(S);
  void g() {
    f({("abc")});
  }
History
Date User Action Args
2012-11-03 00:00:00adminsetmessages: + msg4176
2012-11-03 00:00:00adminsetstatus: open -> nad
2012-04-25 00:00:00admincreate