On Monday, February 12, 2018 17:56:45 H. S. Teoh via Digitalmars-d-learn 
wrote:
> On Tue, Feb 13, 2018 at 01:58:42AM +0000, Marc via Digitalmars-d-learn 
wrote:
> > appender doesn't support string[] so in such case:
> Why not? This seems to work:
>
>   import std.array;
>   import std.stdio;
>   void main() {
>       auto app = appender!(string[]);
>       foreach (i; 0 .. 1000) {
>           app.put("abc");
>       }
>       writeln(app.data);
>   }

LOL. I read his message too quickly and missed that he had problem with
appender and told him about appender and some alternatives.

I assume that his problem is that he didn't use parens. If he tried
appender!string[], then it's not going to work, because the [] ends up being
associated with the result of appender!string instead of being associated
with string and the passed to appender.

- Jonathan M Davis

Reply via email to