Date: Fri, 9 Jan 2026 09:01:47 -0800
On Fri, Jan 9, 2026 at 8:37 AM Steve Weinrich via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Consider two methods:
>
> void interest (double arg1, bool minor);
> void interest (double arg1, int factor);
>
> The call: interest(5.5, 5); is ambiguous because 5 will freely convert to a bool.
It is not ambiguous. 5 is an int literal and thus will exactly match
the second. Make the second one
void interest(double arg1, long factor);
and now you've got an ambiguity.
<std-proposals_at_[hidden]> wrote:
>
> Consider two methods:
>
> void interest (double arg1, bool minor);
> void interest (double arg1, int factor);
>
> The call: interest(5.5, 5); is ambiguous because 5 will freely convert to a bool.
It is not ambiguous. 5 is an int literal and thus will exactly match
the second. Make the second one
void interest(double arg1, long factor);
and now you've got an ambiguity.
Received on 2026-01-09 17:02:01
