Issue2255

Title 2255. Instantiated static data member templates
Status dr Section 17.8 [temp.spec]
Submitter Mike Miller

Created on 2016-03-29.00:00:00 by admin, last changed by admin.

Messages
msg5991 (view) Date: 2017-11-15.00:00:00

Proposed resolution (November, 2017)

Change 17.8 [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.
msg5817 (view) Date: 2018-03-15.00:00:00

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

The current wording does not state that a specialization of a static data member template (17 [temp] paragraph 1) is a static data member, which leaves the status of an example like the following unclear (since 8.2.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
2018-04-11 00:00:00adminsetstatus: tentatively ready -> dr
2018-02-27 00:00:00adminsetstatus: open -> tentatively ready
section: 14 [temp] -> 17.8 [temp.spec]
2018-02-27 00:00:00adminsetmessages: + msg5991
2016-03-29 00:00:00admincreate