r/cpp • u/anonymous23874 • Apr 19 '20
Default function arguments are the devil
https://quuxplusone.github.io/blog/2020/04/18/default-function-arguments-are-the-devil/
90
Upvotes
r/cpp • u/anonymous23874 • Apr 19 '20
View all comments
Show parent comment
2
u/Wouter-van-Ooijen Apr 19 '20
Not if you have multiple arguments of the same type. Yes, you can force the user to specify different types for int x and int y, but the implementations I have seen are ugly.