[Issue 3935] New: opBinary is instantiated with "="
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 11 16:50:40 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3935
Summary: opBinary is instantiated with "="
Product: D
Version: 2.041
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2010-03-11 16:50:40 PST ---
This is really strange behavior. It gets even stranger over time.
It once started with
Vector2f _pos = Vector2f(0.f, 0.f);
yields:
Error: template instance opBinary!("=") matches more than one template
declaration
Now I can't seem to reproduce it anymore.
But in a bigger project, with the following code:
Vector2 opBinary(string op, U:Vector2)(U v)
{
pragma(msg, "opBinary!"~op);
}
I get several instantiations with opBinary!=
Even though http://www.digitalmars.com/d/2.0/operatoroverloading.html#Binary
clearly states that "=" isn't overloadable which totally makes sense since
there is http://www.digitalmars.com/d/2.0/operatoroverloading.html#Assignment
--
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