https://issues.dlang.org/show_bug.cgi?id=14802
Steven Schveighoffer changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=14802
--- Comment #2 from Ivan Timokhin ---
(In reply to Steven Schveighoffer from comment #1)
> template deduction depends on "common type" deduction.
>
> For two types that implicitly cast to each other, it has to make an
> arbitrary decision. Same thin
https://issues.dlang.org/show_bug.cgi?id=14802
Kenji Hara changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Hardware|x86_64
https://issues.dlang.org/show_bug.cgi?id=14802
--- Comment #4 from Steven Schveighoffer ---
In the case of integer literal + short array, this is a different story,
because:
foo!int(1, a) and foo!short(1, a) do not both compile.
However, for double/float:
f!double(1.0, 1.0f) and f!float(1.0, 1
https://issues.dlang.org/show_bug.cgi?id=14802
--- Comment #5 from Ivan Timokhin ---
(In reply to Steven Schveighoffer from comment #4)
> ...
>
> However, for double/float:
>
> f!double(1.0, 1.0f) and f!float(1.0, 1.0f) both compile.
>
> Decision is necessarily arbitrary because both can compi
https://issues.dlang.org/show_bug.cgi?id=14802
--- Comment #6 from Kenji Hara ---
(In reply to Steven Schveighoffer from comment #4)
> However, I'll note that in other cases, the compiler prefers one over the
> other:
>
> // both double[]
> auto arr = [1.0, 1.0f];
> auto arr2 = [1.0f, 1.0];
>
>
https://issues.dlang.org/show_bug.cgi?id=14802
Kenji Hara changed:
What|Removed |Added
Keywords||pull, wrong-code
--- Comment #7 from Kenji Hara
https://issues.dlang.org/show_bug.cgi?id=14802
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|REOPENED|RESOLVED
Resolution|-
argument deduction depends on order of arguments
https://github.com/D-Programming-Language/dmd/commit/d902de1dd9d254c8efd7e7ae4057adb1184513a1
Merge pull request #4818 from 9rnsr/fix14802
Issue 14802 - Template argument deduction depends on order of arguments
--
https://issues.dlang.org/show_bug.cgi?id=14802
--- Comment #9 from github-bugzi...@puremagic.com ---
Commit pushed to dmd-cxx at https://github.com/dlang/dmd
https://github.com/dlang/dmd/commit/2e8899541d51890f116a90d4d2f6f6c07a7ae955
Issue 14802 - Template argument deduction depends on order of
10 matches
Mail list logo