No property 'clear/shrinkTo' for type 'Appender!(string)'

Eric Desbiens olace.mail at gmail.com
Thu Nov 11 12:33:41 PST 2010


Hello,

If I create an appender for a string, I cannot call the funtion clear or
shrinkTo. For example:

    auto strAppender = appender!string();
    strAppender.clear();
    strAppender.shrinkTo();

gives compilation error. In std.array source code, it seems that it allows
those function to work only on types that are not immutable. But on a normal
string, I can change the length with no problem or reinitialize it.

I am pretty new to D and I just want to be sure that this is a bug before
reporting it in bugzilla or if this is by design.

Thanks


More information about the Digitalmars-d mailing list