diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-14 18:30:28 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-16 16:49:58 +0300 |
commit | 55e858010b9ba53c27475d9ce6f864a84d28fa81 (patch) | |
tree | ddbbcc909abc23310117afee2225f6197f475f18 /build2/functions-regex.cxx | |
parent | 3f2b42c3c01ecfee6a63653172d437aa0e915b68 (diff) |
Resolve function overload via the argument reversal to untyped
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), |