2 ms·
The difference is neither of these can introspect a functions arguments at runtime. C++ probably doesn’t need to, as it can do it at compile time with templates
by orf 5y ago
The difference is neither of these can introspect a functions arguments at runtime. C++ probably doesn’t need to, as it can do it at compile time with templates, but therein lies the difference.
Not to say that it can’t is not confusing (at least to begin with), but it’s not an oversight. It’s a conscious choice and I think the only safe one you can make.