diff options
Diffstat (limited to 'build2/functions-regex.cxx')
-rw-r--r-- | build2/functions-regex.cxx | 132 |
1 files changed, 4 insertions, 128 deletions
diff --git a/build2/functions-regex.cxx b/build2/functions-regex.cxx index 9c428fd..8c1e4c5 100644 --- a/build2/functions-regex.cxx +++ b/build2/functions-regex.cxx @@ -423,22 +423,6 @@ namespace build2 return replace (move (s), re, fmt, move (flags)); }; - f[".replace"] = [](value s, string re, names fmt, optional<names> flags) - { - return replace (move (s), - re, - convert<string> (move (fmt)), - move (flags)); - }; - - f[".replace"] = [](value s, names re, string fmt, optional<names> flags) - { - return replace (move (s), - convert<string> (move (re)), - fmt, - move (flags)); - }; - f[".replace"] = [](value s, names re, names fmt, optional<names> flags) { return replace (move (s), @@ -467,22 +451,6 @@ namespace build2 return split (move (s), re, fmt, move (flags)); }; - f[".split"] = [](value s, string re, names fmt, optional<names> flags) - { - return split (move (s), - re, - convert<string> (move (fmt)), - move (flags)); - }; - - f[".split"] = [](value s, names re, string fmt, optional<names> flags) - { - return split (move (s), - convert<string> (move (re)), - fmt, - move (flags)); - }; - f[".split"] = [](value s, names re, names fmt, optional<names> flags) { return split (move (s), @@ -523,93 +491,17 @@ namespace build2 }; f[".merge"] = [](names s, - string re, - names fmt, - optional<string> delim, - optional<names> flags) - { - return merge (move (s), - re, - convert<string> (move (fmt)), - move (delim), - move (flags)); - }; - - f[".merge"] = [](names s, - names re, - string fmt, - optional<string> delim, - optional<names> flags) - { - return merge (move (s), - convert<string> (move (re)), - fmt, - move (delim), - move (flags)); - }; - - f[".merge"] = [](names s, names re, names fmt, - optional<string> delim, + optional<names> delim, optional<names> flags) { return merge (move (s), convert<string> (move (re)), convert<string> (move (fmt)), - move (delim), - move (flags)); - }; - - f[".merge"] = [](names s, - string re, - string fmt, - names delim, - optional<names> flags) - { - return merge (move (s), - re, - fmt, - convert<string> (move (delim)), - move (flags)); - }; - - f[".merge"] = [](names s, - string re, - names fmt, - names delim, - optional<names> flags) - { - return merge (move (s), - re, - convert<string> (move (fmt)), - convert<string> (move (delim)), - move (flags)); - }; - - f[".merge"] = [](names s, - names re, - string fmt, - names delim, - optional<names> flags) - { - return merge (move (s), - convert<string> (move (re)), - fmt, - convert<string> (move (delim)), - move (flags)); - }; - - f[".merge"] = [](names s, - names re, - names fmt, - names delim, - optional<names> flags) - { - return merge (move (s), - convert<string> (move (re)), - convert<string> (move (fmt)), - convert<string> (move (delim)), + delim + ? convert<string> (move (*delim)) + : optional<string> (), move (flags)); }; @@ -639,22 +531,6 @@ namespace build2 return apply (move (s), re, fmt, move (flags)); }; - f[".apply"] = [](names s, string re, names fmt, optional<names> flags) - { - return apply (move (s), - re, - convert<string> (move (fmt)), - move (flags)); - }; - - f[".apply"] = [](names s, names re, string fmt, optional<names> flags) - { - return apply (move (s), - convert<string> (move (re)), - fmt, - move (flags)); - }; - f[".apply"] = [](names s, names re, names fmt, optional<names> flags) { return apply (move (s), |