Title
Instantiated static data member templates
Status
cd5
Section
13.9 [temp.spec]
Submitter
Mike Miller

Created on 2016-03-29.00:00:00 last changed 40 months ago

Messages

Date: 2017-11-15.00:00:00

Proposed resolution (November, 2017)

Change 13.9 [temp.spec] paragraph 2 as follows:

A function instantiated from a function template is called an instantiated function. A class instantiated from a class template is called an instantiated class. A member function, a member class, a member enumeration, or a static data member of a class template instantiated from the member definition of the class template is called, respectively, an instantiated member function, member class, member enumeration, or static data member. A member function instantiated from a member function template is called an instantiated member function. A member class instantiated from a member class template is called an instantiated member class. A variable instantiated from a variable template is called an instantiated variable. A static data member instantiated from a static data member template is called an instantiated static data member.
Date: 2018-03-15.00:00:00

[Accepted as a DR at the March, 2018 (Jacksonville) meeting.]

The current wording does not state that a specialization of a static data member template (Clause 13 [temp] paragraph 1) is a static data member, which leaves the status of an example like the following unclear (since 7.6.1.5 [expr.ref] bullet 4.1 is phrased in terms of static data members):

  template <class T> struct A {
    template <class U> static const U x = 1;
    static const int y = 2;
  };

  int main() {
    A<int> a;
    int y = a.y;         // OK
    int x = a.x<int>;    // ???
  }
History
Date User Action Args
2020-12-15 00:00:00adminsetstatus: dr -> cd5
2018-04-11 00:00:00adminsetstatus: tentatively ready -> dr
2018-02-27 00:00:00adminsetmessages: + msg5871
2018-02-27 00:00:00adminsetstatus: open -> tentatively ready
2016-03-29 00:00:00admincreate