fork download
  1. #include <iostream>
  2. #include <tuple>
  3.  
  4. void Func(int num = 1, int num2 = 2)
  5. {
  6. std::cout << num << '\n';
  7. std::cout << num2 << '\n';
  8. }
  9.  
  10. void Func(decltype(std::ignore), int num2 = 2)
  11. {
  12. Func(1, num2);
  13. }
  14.  
  15. int main()
  16. {
  17. Func(std::ignore, 99); // as in i want the first parameter to use the default one
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
1
99