[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1623

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|2.007   |D2

--


[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.

2012-02-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1623


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||clugd...@yahoo.com.au
 Resolution||FIXED


--- Comment #5 from Don  2012-02-08 06:54:34 PST ---
The test case in comment 2 was fixed in DMD2.049 when bug 4430 was fixed.
That seems to be the only valid test case in this bug report.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.

2010-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1623



--- Comment #4 from Tomasz Sowiński  2010-03-14 13:58:37 
PDT ---
(In reply to comment #3)
> Is this useful?
> 
> struct Matrix {
> Matrix opOpAssign(string op, T:real)(T a);
> Matrix opOpAssign(string op, T:Matrix)(T m);
> }

It is, thanks. Still, it'd be a lot cleaner to do without dummy template
params... Is there some bigger problem that prevents the compiler to look at
both template and runtime params when resolving templated function overloads?
I'm guessing that it currently matches only against template signatures and
bails out upon ambiguity.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.

2010-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1623


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #3 from bearophile_h...@eml.cc 2010-03-14 12:00:37 PDT ---
Is this useful?

struct Matrix {
Matrix opOpAssign(string op, T:real)(T a);
Matrix opOpAssign(string op, T:Matrix)(T m);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 1623] Overloading on different parameters numbers gratuitously restrictive.

2010-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1623


Tomasz Sowiński  changed:

   What|Removed |Added

 CC||tomeks...@gmail.com


--- Comment #2 from Tomasz Sowiński  2010-03-14 10:20:30 
PDT ---
I confirm this bug is still present in DMD 2.041. I expect it to be a major
hindrance with the new operator overloading regime in which idioms like below
are bound to get popular:

struct Matrix {
Matrix opOpAssign(string op)(real a);
Matrix opOpAssign(string op)(Matrix m);
}

void main() {
Matrix a;
a += 3;
}

Error: template instance opOpAssign!("+=") matches more than one template
declaration, opOpAssign(string op) and opOpAssign(string op)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---