Michael Priceon Stack Overflow • Recommends
On “Why the warning for default arguments?”
There are several odd corner cases when it comes to default arguments on function parameters.
Here is a presentation from CppCon 2017 detailing a lot of tricky behavior. link to this video
To summarize the main points:
Redeclarations cause potentially confusing behavior
The default arguments used in virtual function calls are not determined by the function called, but by the static type.
Default arguments on function templates can potentially look ill-formed, but may compile as long as they are not instantiated.
Of course, for your case of a non-template constructor, they are fairly innocuous. It can’t be overridden or redeclared (although an out-of-line definition might cause you possible…