Am I right in reading the standard that from min
and max
(and minmax
for that matter) there are new initializer_list variants, but no Variadic Template variants?
Thus, this is ok:
int a = min( { 1,2,a,b,5 } );
but this is not:
int b = min( 1,2,a,b,5 ); // err!
I guess, many people would expect that Variadic Templates could have easily implemented this, therefore they might be disappointed.
I'd say that using V.T. for min
and max
would be overkill
therefore I.L. are much better suited for the task.
Is my interpretation correct?
Your interpretation is correct. N2772 contains more in-depth rationale.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With