Summary: autogenerated opEquals does no handle well Variant
--- Comment #0 from Fawzi Mohamed <fa...@gmx.ch> 2012-10-04 14:40:00 PDT ---
Not sure where to put this (if it is a phobos or dmd bug), but the interaction
is ugly: adding the field a (or any field that has opEquals with const) to
struct B makes the compilation fail with the given error.
Manually implementing a const opEquals with casts is a workaround for this, but
I find it ugly because a small change to a (adding opEquals), requires
opEquals to struct using it.
int opEquals(ref const(A) o) const /+ this const is the trigger of the bug
return &o is &this;
fails compiling with dmd 2.060 with:
static assert "Assigning Variant objects from const Variant objects is
currently not supported."
instantiated from here: opAssign!(const(VariantN!(32LU)))
instantiated from here: __ctor!(const(VariantN!(32LU)))
t.d(10): instantiated from here: opEquals!(const(VariantN!(32LU)))
might be or be related with issue5310 or issue8328
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------