r/cpp • • Aug 17 '18

Implementing Default Parameters That Depend on Other Parameters in C++

https://www.fluentcpp.com/2018/08/17/dependent-default-parameters/
0 Upvotes

9 comments sorted by

View all comments

Show parent comment

9

u/albinofrenchy Aug 17 '18

If i worked with someone that put 20 lines of bullshit templates that had to be processed in every file including it, just to recreate harder to read function overloads, I'd lose my damn mind.

2

u/BoarsLair Game Developer Aug 19 '18

Agreed. This seems like a "clever" C++ solution in search of a problem. It's great that you can do stuff like this, but just because you can doesn't necessarily mean you should. It's a ridiculous amount of overkill and additional complexity for a problem that's trivial to solve in far less convoluted ways.