Boston D Language Meetup in Back Bay
John Colvin via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Nov 17 07:38:53 PST 2016
On Thursday, 17 November 2016 at 13:59:25 UTC, Steven
Schveighoffer wrote:
> nullStream!char
> .bufferedInput
> .pushTo(
> arrayCastPipe!ubyte
> .outputFile("output.txt")
> );
>
> But then the parameters to the "pushTo" hypothetical function
> don't know what the source type is before calling. By inserting
> valves, I get the equivalent thing, but the types all are
> passed down the chain properly.
Can't you use a template lambda alias argument to pushTo instead,
so then you can instantiate it inside pushTo?
something like
nullStream!char
.bufferedInput
.pushTo!(_ => _
.arrayCastPipe!ubyte
.outputFile("output.txt")
);
maybe?
More information about the Digitalmars-d-announce
mailing list