September 16, 2014 [Issue 13483] New: std.range.tee should also accept a function name | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13483 Issue ID: 13483 Summary: std.range.tee should also accept a function name Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nobody@puremagic.com Reporter: electrolysis.jp+d@gmail.com 2.067.0-b1 ----- import std.stdio, std.range; void main() { auto r = [3, 1, 4]; r.tee!(a => writeln(a)); // OK r.tee!writeln; // NG } ----- D:\d\dmd2\windows\bin\..\..\src\phobos\std\range.d(10023): Error: writeln (int _param_0) is not callable using argument types () foo.d(7): Error: template instance std.range.tee!(writeln, cast(Flag)true, int[]) error instantiating -- |
Copyright © 1999-2021 by the D Language Foundation