aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-04-04 13:11:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-04-04 13:11:56 +0200
commit5e51d523e71231cb190e9ed981962df527f4ee7e (patch)
tree1ca26842d0629d23feb10c498364758a90f2dd68 /libbuild2/variable.hxx
parentb3bc26dc284cf73e97b88c9979d49368d07e686c (diff)
Add base functionality for hermetic build configurationshermetic
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r--libbuild2/variable.hxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx
index 898648c..d59a891 100644
--- a/libbuild2/variable.hxx
+++ b/libbuild2/variable.hxx
@@ -1562,6 +1562,14 @@ namespace build2
pair<value_data*, const variable&>
lookup_to_modify (const variable&, bool typed = true);
+ pair<const_iterator, const_iterator>
+ lookup_namespace (const variable& ns) const
+ {
+ auto r (m_.find_sub (ns));
+ return make_pair (const_iterator (r.first, *this),
+ const_iterator (r.second, *this));
+ }
+
// 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 find_original()).
@@ -1599,13 +1607,10 @@ namespace build2
pair<value&, bool>
insert (const variable&, bool typed = true);
- pair<const_iterator, const_iterator>
- lookup_namespace (const variable& ns) const
- {
- auto r (m_.find_sub (ns));
- return make_pair (const_iterator (r.first, *this),
- const_iterator (r.second, *this));
- }
+ // Note: does not deal with aliases.
+ //
+ bool
+ erase (const variable&);
const_iterator
begin () const {return const_iterator (m_.begin (), *this);}