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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 14 10:20:31 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=1623


Tomasz Sowiński <tomeksowi at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomeksowi at gmail.com


--- Comment #2 from Tomasz Sowiński <tomeksowi at gmail.com> 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: -------


More information about the Digitalmars-d-bugs mailing list