14 Templates [temp]

14.5 Template declarations [temp.decls]

14.5.1 Class templates [temp.class]

14.5.1.3 Static data members of class templates [temp.static]

A definition for a static data member may be provided in a namespace scope enclosing the definition of the static member's class template. [ Example:

template<class T> class X {
  static T s;
};
template<class T> T X<T>::s = 0;

 — end example ]

An explicit specialization of a static data member declared as an array of unknown bound can have a different bound from its definition, if any. [ Example:

template <class T> struct A {
  static int i[];
};
template <class T> int A<T>::i[4];    // 4 elements
template <> int A<int>::i[] = { 1 };  // OK: 1 element

 — end example ]