From Jason Turner

[temp.static]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppn9xzpox/{from.md → to.md} +11 -2
tmp/tmppn9xzpox/{from.md → to.md} RENAMED
@@ -1,15 +1,24 @@
1
  #### Static data members of class templates <a id="temp.static">[[temp.static]]</a>
2
 
3
- A definition for a static data member may be provided in a namespace
4
- scope enclosing the definition of the static member’s class template.
 
5
 
6
  ``` cpp
7
  template<class T> class X {
8
  static T s;
9
  };
10
  template<class T> T X<T>::s = 0;
 
 
 
 
 
 
 
 
11
  ```
12
 
13
  An explicit specialization of a static data member declared as an array
14
  of unknown bound can have a different bound from its definition, if any.
15
 
 
1
  #### Static data members of class templates <a id="temp.static">[[temp.static]]</a>
2
 
3
+ A definition for a static data member or static data member template may
4
+ be provided in a namespace scope enclosing the definition of the static
5
+ member’s class template.
6
 
7
  ``` cpp
8
  template<class T> class X {
9
  static T s;
10
  };
11
  template<class T> T X<T>::s = 0;
12
+
13
+ struct limits {
14
+ template<class T>
15
+ static const T min; // declaration
16
+ };
17
+
18
+ template<class T>
19
+ const T limits::min = { }; // definition
20
  ```
21
 
22
  An explicit specialization of a static data member declared as an array
23
  of unknown bound can have a different bound from its definition, if any.
24