fork download
  1. #include <iostream>
  2.  
  3. template <typename T> struct S {
  4. static int a;
  5. int b;
  6. };
  7.  
  8. template<typename T>
  9. int S<T>::a;
  10.  
  11. int main() {
  12. S<int>::a = 42;
  13. std::cout << S<char>::a << std::endl;
  14. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
0