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/infectedapricot Apr 20 '20 edited Apr 20 '20
Declaration:
Use:
Pros:
params.Cons:
On balance, usually only worth it when there are quite a few parameters, maybe at least four.
Edit: Just noticed that /u/jbandela suggested the same thing, and added named initializers (not sure about that though).