3 ms·
C++ has named parameters, too. If you want it to.
by blattimwind 8y ago
C++ has named parameters, too. If you want it to.
- hellofunk 8y agoWould like an example; this is hardly "solved" in C++. There is an old Boost library that does this, but it's not idiomatic and rarely used. Unless you are using a different definition of named parameters, I've never seen C++ code in the wild that used them.
- ninkendo 8y agoThat’s a bold statement, I’d love to see an example to show this.
- CmdrKrool 8y agoSounds like the "named parameter idiom", the function comes with a struct that contains all the possible parameters and the caller passes one of those to the function instead of each parameter seperately. http://www.cs.technion.ac.il/users/yechiel/c++-faq/named-parameter-idiom.html http://www.cs.technion.ac.il/users/yechiel/c++-faq/named-par...