D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7679 - std.regex.split and splitter don't work w/ ctRegex
Summary: std.regex.split and splitter don't work w/ ctRegex
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-10 06:39 UTC by David Simcha
Modified: 2012-03-22 14:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2012-03-10 06:39:43 UTC
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))
Comment 1 Dmitry Olshansky 2012-03-12 03:13:19 UTC
https://github.com/D-Programming-Language/phobos/pull/490

BTW probably you meant ctRegex!r"\."
Comment 2 github-bugzilla 2012-03-15 13:43:22 UTC
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/9ce1020904a4fd99e880038686bf0cccbb1f3cff
fix Issue 7679 - std.regex.split and splitter don't work w/ ctRegex

https://github.com/D-Programming-Language/phobos/commit/4c3ddc268882e777f2a6dd513a633919f2795c13
Merge pull request #490 from blackwhale/regex-splitter

fix Issue 7679 - std.regex.split and splitter don't work w/ ctRegex