https://d.puremagic.com/issues/show_bug.cgi?id=11779
Summary: pointer to slice is not an input range Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: monarchdo...@gmail.com --- Comment #0 from monarchdo...@gmail.com 2013-12-19 13:25:38 PST --- As a rule thumb, when the type "S" is an input range, than so is "S*". Indeed, all of "S's primitives" can also be called using a pointer, EG: S* p; p.popFront(); //OK! This works for *all* input ranges... except for slices. This is because the "slice range primitives" are actually non-member functions: int[]* p; p.popFront(); //DERP! Error: template std.array.popFront does not match any function template declaration I think, to be consistent with the "emulate a member primitive", that the range functions in std.array should also work on pointer to slice. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------