Thread overview
How do I pass a template type as parameter?
Apr 16, 2019
Machine Code
Apr 16, 2019
Adam D. Ruppe
Apr 16, 2019
Machine Code
April 16, 2019
I've tried those syntaxes:

void f(appender!string buffer) { }
void f(A = appender)(A!string buffer) { }

but no luck... how do I do that?
April 16, 2019
On Tuesday, 16 April 2019 at 21:07:51 UTC, Machine Code wrote:
> void f(appender!string buffer) { }

appender isn't a type, it is a helper function that returns a type called Appender:

http://dpldocs.info/experimental-docs/std.array.appender.1.html

http://dpldocs.info/experimental-docs/std.array.Appender.html



So try like `void f(Appender!string buffer) {}`
April 16, 2019
On Tuesday, 16 April 2019 at 21:24:54 UTC, Adam D. Ruppe wrote:
> On Tuesday, 16 April 2019 at 21:07:51 UTC, Machine Code wrote:
>> void f(appender!string buffer) { }
>
> appender isn't a type, it is a helper function that returns a type called Appender:
>
> http://dpldocs.info/experimental-docs/std.array.appender.1.html
>
> http://dpldocs.info/experimental-docs/std.array.Appender.html
>
>
>
> So try like `void f(Appender!string buffer) {}`

I see. Thank you!