From 441c75f68ca1adfcf833ae778ac150baf16ded2f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 29 Mar 2022 10:25:10 +0200 Subject: Add variable_map::lookup_namespace(string) overload --- libbuild2/variable.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbuild2/variable.hxx') diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index 54d573b..2bfab05 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -1574,6 +1574,16 @@ namespace build2 const_iterator (r.second, *this)); } + pair + lookup_namespace (string ns) const + { + // It's ok to use the temporary here since we compare names and don't + // insert anything. + // + return lookup_namespace (variable { + move (ns), nullptr, nullptr, nullptr, variable_visibility::project}); + } + // Convert a lookup pointing to a value belonging to this variable map // to its non-const version. Note that this is only safe on the original // values (see lookup_original()). -- cgit v1.1