[Issue 4424] New: Copy constructor and templated opAssign cannot coexist
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 4 04:25:30 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4424
Summary: Copy constructor and templated opAssign cannot coexist
Product: D
Version: 2.041
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: rsinfu at gmail.com
--- Comment #0 from Shin Fujishiro <rsinfu at gmail.com> 2010-07-04 04:25:29 PDT ---
Templated opAssign cannot be declared in a struct with copy constructor.
-------------------- test.d
struct S
{
this(this) {}
void opAssign(T)(T rhs) if (! is(T == S))
{}
}
--------------------
% dmd -o- -c test
test.d: Error: function test.S.opAssign conflicts with template
test.S.opAssign(T) if (!is(T == S)) at test.d(4)
--------------------
--
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