fork(1) download
  1. #include <iostream>
  2.  
  3. template <typename T>
  4. class Foo
  5. {
  6. public:
  7. static int bar;
  8. };
  9.  
  10. template <typename T> int Foo<T>::bar;
  11.  
  12. int main() {
  13. std::cout << "Foo<int>::bar : " << &Foo<int>::bar << std::endl;
  14. std::cout << "Foo<double>::bar : " << &Foo<double>::bar << std::endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Foo<int>::bar : 0x8049b54
Foo<double>::bar : 0x8049b50