fork download
  1. template<class T>
  2. struct A {};
  3.  
  4. template<>
  5. struct A<int>;
  6.  
  7. template<>
  8. struct A<float>
  9. {
  10. A<int> f();
  11. };
  12.  
  13. template<>
  14. struct A<int> {
  15. int value;
  16. };
  17.  
  18. A<int> A<float>::f()
  19. {
  20. return A<int>{};
  21. }
  22.  
  23. int main()
  24. {
  25. A<float> a;
  26. a.f();
  27. }
  28.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty