https://issues.dlang.org/show_bug.cgi?id=18135
Issue ID: 18135 Summary: [REG2.078] can't join RegexMatch anymore Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: greensunn...@gmail.com This used to compile, it doesn't anymore with 2.078.0: ``` import std.algorithm : joiner, map; auto matchIssueRefs(string message) { import std.regex; static auto matchToRefs(M)(M m) { enum splitRE = regex(`foo`); return m.captures[0].splitter(splitRE); } enum issueRE = ctRegex!`foo`; return message.matchAll(issueRE).map!matchToRefs; } auto getIssueRefs(string[] commits) { return commits .map!matchIssueRefs .joiner; } ``` with: ``` /home/seb/dlang/phobos/std/algorithm/iteration.d(2504): Error: cannot modify struct this._current MapResult!(matchToRefs, RegexMatch!string) with immutable members test.d(21): Error: template instance std.algorithm.iteration.joiner!(MapResult!(matchIssueRefs, string[])) error instantiating ``` --