2026-05-12 19:34 UTC
TIL that in C++ you can specify a default parameter value in a function/method declaration even if you omit the parameter name. This is valid:
void f(int = 3);
(The code I was reading was something like void f(..., timestamp = 0) and it took me a while to realize that timestamp was a custom type and not a parameter name…)
Replies (0)
No replies.