fork download
  1. template <typename T> struct X
  2. {
  3. T v;
  4.  
  5. void foo();
  6. };
  7.  
  8. typedef X<int> SomeTypedef;
  9.  
  10. #if 1
  11. template <typename T> void X<T>::foo() {
  12. //
  13. }
  14. #else
  15. template<> void SomeTypedef::foo() {
  16. //
  17. }
  18. #endif
  19.  
  20.  
  21. int main()
  22. {
  23. SomeTypedef a;
  24. a.foo();
  25. }
  26.  
  27.  
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty