fork download
  1. #include <iostream>
  2.  
  3. template <int V>
  4. void div(char(*)[V - 1] = 0)
  5. {
  6. std::cout << "-1" << std::endl;
  7. }
  8. template <int V>
  9. void div(char(*)[V - 2] = 0)
  10. {
  11. std::cout << "-2" << std::endl;
  12. }
  13. template <int V>
  14. void div(char(*)[V - 3] = 0)
  15. {
  16. std::cout << "-3" << std::endl;
  17. }
  18.  
  19. int main()
  20. {
  21. div<2>();
  22. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
-1