[Issue 13483] New: std.range.tee should also accept a function name
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 16 08:52:19 PDT 2014
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 at puremagic.com
Reporter: electrolysis.jp+d at 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
--
More information about the Digitalmars-d-bugs
mailing list