opAssign and template class
Stanislav Blinov
stanislav.blinov at gmail.com
Wed Feb 5 02:48:22 PST 2014
On Wednesday, 5 February 2014 at 10:33:08 UTC, dbjdbj wrote:
>
> Please consider this: http://dpaste.dzfl.pl/dc4a3c29e57f
>
> What is my mistake ?
>
> Thanks ...
You cannot overload identity assignment for classes. It's a
language construct that rebinds a reference and cannot be
overridden. Such opAssign overloading is only possible for
structs.
See http://dlang.org/operatoroverloading.html#Assignment.
More information about the Digitalmars-d
mailing list