Bug 7679 – std.regex.split and splitter don't work w/ ctRegex
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-10T06:39:00Z
Last change time
2012-03-22T14:02:36Z
Assigned to
nobody
Creator
dsimcha
Comments
Comment #0 by dsimcha — 2012-03-10T06:39:43Z
Looks like it's just a constraint issue.
import std.regex;
void main() {
enum re = ctRegex!".";
auto str = "a.b";
std.regex.splitter(str, re);
}
test.d(6): Error: template std.regex.splitter(Range,RegEx) if (is(BasicElementOf!(Range) : dchar) && is(RegEx == Regex!(BasicElementOf!(Range)))) does not match any function template declaration
test.d(6): Error: template std.regex.splitter(Range,RegEx) if (is(BasicElementOf!(Range) : dchar) && is(RegEx == Regex!(BasicElementOf!(Range)))) cannot deduce template function from argument types !()(string,StaticRegex!(char))