[Issue 14802] Template argument deduction depends on order of arguments

2015-07-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14802 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 14802] Template argument deduction depends on order of arguments

2015-07-16 Thread via Digitalmars-d-bugs
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

[Issue 14802] Template argument deduction depends on order of arguments

2015-07-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14802 Kenji Hara changed: What|Removed |Added Status|RESOLVED|REOPENED Hardware|x86_64

[Issue 14802] Template argument deduction depends on order of arguments

2015-07-16 Thread via Digitalmars-d-bugs
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

[Issue 14802] Template argument deduction depends on order of arguments

2015-07-16 Thread via Digitalmars-d-bugs
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

[Issue 14802] Template argument deduction depends on order of arguments

2015-07-16 Thread via Digitalmars-d-bugs
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]; > >

[Issue 14802] Template argument deduction depends on order of arguments

2015-07-17 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14802 Kenji Hara changed: What|Removed |Added Keywords||pull, wrong-code --- Comment #7 from Kenji Hara

[Issue 14802] Template argument deduction depends on order of arguments

2015-08-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14802 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|-

[Issue 14802] Template argument deduction depends on order of arguments

2015-08-31 Thread via Digitalmars-d-bugs
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 --

[Issue 14802] Template argument deduction depends on order of arguments

2017-08-02 Thread via Digitalmars-d-bugs
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