aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/functions-path.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-09-13 19:56:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-09-13 19:56:27 +0300
commit505021d9297fcbc9232f7d5c2de432d5316dad08 (patch)
treeed0a43cb73f841610f8570f555cf3bd760ca3514 /libbuild2/functions-path.cxx
parentce4b3b115957575c2055291c54fc6452817dab87 (diff)
Add $builtin.concat(dir_path, dir_path) and $builtin.concat(dir_path, path) overloads
Diffstat (limited to 'libbuild2/functions-path.cxx')
-rw-r--r--libbuild2/functions-path.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbuild2/functions-path.cxx b/libbuild2/functions-path.cxx
index 8362d2e..b79585d 100644
--- a/libbuild2/functions-path.cxx
+++ b/libbuild2/functions-path.cxx
@@ -667,5 +667,15 @@ namespace build2
{
return concat_dir_path_string (move (l), convert<string> (move (ur)));
};
+
+ b[".concat"] += [](dir_path l, dir_path r)
+ {
+ return value (move (l /= r));
+ };
+
+ b[".concat"] += [](dir_path l, path r)
+ {
+ return value (path_cast<path> (move (l)) /= r);
+ };
}
}