struct vs. class, int vs. char.

Denis Koroskin 2korden at gmail.com
Wed Apr 29 02:10:20 PDT 2009


On Wed, 29 Apr 2009 13:06:18 +0400, Denis Koroskin <2korden at gmail.com> wrote:

> It is a DMD bug: calling an object's dtor should call dtors on all its  
> fields.

This could be temporarily worked around by little template magic:

foreach(field; filterFields(__traits(allMembers,T))) {
    field.dtor();
}




More information about the Digitalmars-d mailing list