fork download
  1. template<typename T>
  2. bool is_valid(T);
  3.  
  4. template<typename T>
  5. struct S
  6. {
  7. bool valid(T a)
  8. {
  9. return is_valid(a);
  10. }
  11. };
  12.  
  13. bool is_valid(int)
  14. {
  15. return true;
  16. }
  17.  
  18. int main()
  19. {
  20. S<int> s;
  21. s.valid(0);
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/3tYLlh/ccRsB0BO.o: In function `main':
prog.cpp:(.text.startup+0x7): undefined reference to `bool is_valid<int>(int)'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty