Title
Kind of expression referring to member of anonymous union
Status
cd4
Section
11.5 [class.union]
Submitter
David Majnemer

Created on 2013-10-24.00:00:00 last changed 37 months ago

Messages

Date: 2014-02-15.00:00:00

Notes from the February, 2014 meeting:

CWG agreed that the example should be ill-formed.

Date: 2014-11-15.00:00:00
[Adopted at the November, 2014 meeting as part of paper N4268.]

It is not clear whether naming a member of a global anonymous union should be considered an id-expression or implicitly a member access expression. For example, given

  static union {
    int i;
  };

  template <int &> struct S {};
  S<i> V;

is the last line well-formed? There is implementation variance on this question.

History
Date User Action Args
2021-02-17 00:00:00adminsetstatus: drafting -> cd4
2014-03-03 00:00:00adminsetmessages: + msg4889
2014-03-03 00:00:00adminsetstatus: open -> drafting
2013-10-24 00:00:00admincreate