sqrt(2) must go
Manu
turkeyman at gmail.com
Thu Oct 20 06:05:12 PDT 2011
I vote for "Error: Ambiguous call to overloaded function". NOT implicit
conversion to arbitrary type 'double' :)
On 20 October 2011 15:49, dsimcha <dsimcha at yahoo.com> wrote:
> On 10/20/2011 8:13 AM, Don wrote:
>
>> There's no problem with assignment, it's never ambiguous.
>>
>> There seems to be some confusion about what the issue is.
>> To reiterate:
>>
>> void foo(float x) {}
>> void foo(double x) {}
>>
>> void bar(float x) {}
>>
>> void baz(double x) {}
>>
>> void main()
>> {
>> bar(2); // OK -- 2 becomes 2.0f
>> baz(2); // OK -- 2 becomes 2.0
>> foo(2); // fails -- ambiguous.
>> }
>>
>> My proposal was effectively: if it's ambiguous, choose double. That's all.
>>
>
> This proposal seems like a no-brainer to me. I sincerely apologize for
> not supporting it before. I looked at when it was created, and I realized
> that I was with my family for Christmas/New Years at the time, with little
> time to spend on the D newsgroup.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111020/c3d14a0d/attachment.html>
More information about the Digitalmars-d
mailing list