By default, the v argument patterns take precedence in overload resolution
1 answer
void f(int x = 0);
... During overload resolution, pattern is not always preferred over pattern when the argument type is an exact match (i.e., does not require conversions) - see Β§13.3.3 / 1.
(Note that if there was an overload instead of a template void f(long x = 0);
and callsite remained the same, or if the overload remained the same and callsite instead f(5L);
, the template overload would be called instead.)
+5
source to share