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
6
u/jbandela Apr 21 '20
You can disable aggregate initialization like this.
Now, you either have to do default init the args struct or use designated initializers.
https://gcc.godbolt.org/z/BPuozB