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?

Reply via email to