Comment #0 by bus_dbugzilla — 2013-08-27T13:05:29Z
The following worked in v2.063.2, but not in the latest github masters (This is preventing the "ddemangle" tool from compiling in the latest github master):
-------------------------------------------
import core.demangle;
import std.regex;
void main()
{
replace!((a) => demangle(a.hit))("blah", regex(`a`));
}
-------------------------------------------
Result with github master:
-------------------------------------------
../dmd/src/../../phobos/std/regex.d(6078): Error: template D main.__lambda2 does not match any function template declaration. Candidates are:
test.d(5): test.main.__lambda2(__T1)(a)
../dmd/src/../../phobos/std/regex.d(6078): Error: template test.main.__lambda2(__T1)(a) cannot deduce template function from argument types !()(Captures!(string, uint), Appender!string)
../dmd/src/../../phobos/std/regex.d(6106): Error: template instance test.main.replaceMatchesInto!(__lambda2, Appender!string, string, RegexMatch!(string, ThompsonMatcher)) error instantiating
../dmd/src/../../phobos/std/regex.d(6399): instantiated from here: replaceAllWith!(__lambda2, match, string, Regex!char)
test.d(5): instantiated from here: replace!(__lambda2, string, Regex!char)
../dmd/src/../../phobos/std/regex.d(6399): Error: template instance test.main.replaceAllWith!(__lambda2, match, string, Regex!char) error instantiating
test.d(5): instantiated from here: replace!(__lambda2, string, Regex!char)
test.d(5): Error: template instance test.main.replace!(__lambda2, string, Regex!char) error instantiating
-------------------------------------------
Comment #1 by hsteoh — 2013-08-27T15:15:43Z
*** This issue has been marked as a duplicate of issue 10896 ***
Comment #2 by dmitry.olsh — 2013-08-28T02:22:21Z
It's about replace function in std.regex not just ddemangle failing to compile.
Comment #3 by hsteoh — 2013-08-28T20:32:17Z
This bug is not in DMD, it's a backward incompatibility caused by the latest changes to std.regex.