[Issue 4338] Structs with non-const destructors cannot be used as const parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 23 23:59:26 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4338
Austin Hastings <ah08010-d at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ah08010-d at yahoo.com
--- Comment #2 from Austin Hastings <ah08010-d at yahoo.com> 2010-10-23 23:58:39 PDT ---
I stumbled into this problem with a struct having an immutable member.
Apparently, any kind of const-ness taints the struct, which prevents calling
the destructor.
In my case, declaring the destructor const/immutable didn't help. :(
Apparently, you can't have struct with immutable members as an "in" parameter,
since that does the "const scope" thing, which triggers the destructor, which
causes the failure.
Also: the "const ~this()" syntax works, but "~this() const" does not, which
seems odd since it works for other method names.
--
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