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

By: Peter Baum

$
0
0

1. Is there any good reason why C++ does not support more flexible default values such as

and

?

2. It seems strange that “Once declared, a default parameter can not be redeclared.” even when the declarations are exactly the same.  Is there any good reason why this is not allowed?

3. In the function overload example:

the statement is made that “… the compiler would not be able to disambiguate…” such a situation.  Note that it could easily do this if the requirement is to write

if the second function were desired.


Viewing all articles
Browse latest Browse all 48

Trending Articles