fork download
  1. template< typename >
  2. struct s {
  3. template< typename >
  4. void f() {}
  5. };
  6.  
  7. template< typename t >
  8. void tf( t const & ) {}
  9.  
  10. template< typename t >
  11. void g() {
  12. tf( & s< t >::template f< void > );
  13. tf( & s< t >::f< void > );
  14. }
  15.  
  16. int main() {
  17. g< void >();
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void g()’:
prog.cpp:13:22: error: expected primary-expression before ‘void’
prog.cpp:13:22: error: expected ‘)’ before ‘void’
stdout
Standard output is empty