r/cpp • • 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

149 comments sorted by

View all comments

Show parent comment

4

u/serviscope_minor Apr 21 '20

Takes up an extra two lines of code

foo([]{Parameters p; p.blartleCount=2; return p;}());

Obviously that's much clearer!