fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. struct EmptyType { };
  5.  
  6. template<class arg1=EmptyType, class arg2=EmptyType, class arg3=EmptyType>
  7. class my_class
  8. {
  9. // FILL_MY_CLASS_DEFINE(3)
  10. };
  11. template<class arg1, class arg2>
  12. class my_class<arg1,arg2,EmptyType>
  13. {
  14. // FILL_MY_CLASS_DEFINE(2)
  15. };
  16. template<class arg1>
  17. class my_class<arg1,EmptyType,EmptyType>
  18. {
  19. // FILL_MY_CLASS_DEFINE(1)
  20. };
  21. template<>
  22. class my_class<EmptyType,EmptyType,EmptyType>
  23. {
  24. // FILL_MY_CLASS_DEFINE(0)
  25. };
  26.  
  27. int main(int argc, const char *argv[])
  28. {
  29. my_class<std::string, double, int> a;
  30. my_class<std::string, int> b;
  31. my_class<void> c;
  32.  
  33. return 0;
  34. }
  35.  
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main(int, const char**)’:
prog.cpp:29: warning: unused variable ‘a’
prog.cpp:30: warning: unused variable ‘b’
prog.cpp:31: warning: unused variable ‘c’
stdout
Standard output is empty