Bug 13483 – std.range.tee should also accept a function name

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-09-16T15:52:00Z
Last change time
2014-09-19T19:04:41Z
Assigned to
nobody
Creator
electrolysis.jp+d

Comments

Comment #0 by electrolysis.jp+d — 2014-09-16T15:52:19Z
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
Comment #1 by github-bugzilla — 2014-09-19T19:04:40Z