4 ms·
Personally I'd like c++ to: a) have default parameters in any parameter position. I.e. for this to be legal: foo(int x = 0, int y, int z = 0) {} b) to al
by axilmar 6y ago
Personally I'd like c++ to:
a) have default parameters in any parameter position. I.e. for this to be legal:
foo(int x = 0, int y, int z = 0) {}
b) to allow me to invoke a function like this:
foo(,) //x and z are passed as default values:
c) or like this using named parameters:
foo(x = 5, y = 1,)