Quantcast
Channel: Comments on: 7.7 — Default parameters
Viewing all articles
Browse latest Browse all 48

By: nascardriver

$
0
0

@std::optional can be used, but you'd have to set the default value in the function body which isn't where default values should be located in my opinion.
If there is a better way I'd love to know it.

Output
Waldo is wearing a red shirt and is located at 12.3, 45.6
Waldo is wearing a blue shirt and is located at 78.9, 1.2


Viewing all articles
Browse latest Browse all 48

Trending Articles