aboutsummaryrefslogtreecommitdiff
path: root/build2/scope
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-31 09:01:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-31 09:01:50 +0200
commit6417a4e6af2b7732ec0da6af24f1a56f7cdada3f (patch)
tree58ffae7ef0cdac55acd6d498dfc66ce0967f4e9a /build2/scope
parent31bd69c56bc29ec1c154a7c0623b6f0ccce78af1 (diff)
Set part of variable override implementation
Diffstat (limited to 'build2/scope')
-rw-r--r--build2/scope5
1 files changed, 4 insertions, 1 deletions
diff --git a/build2/scope b/build2/scope
index 9878e7f..7ec8c3b 100644
--- a/build2/scope
+++ b/build2/scope
@@ -143,9 +143,12 @@ namespace build2
value&
assign (const string& name) {return vars.assign (name).first.get ();}
+ // Unlike the two above, assign a non-overridable variable with normal
+ // visibility.
+ //
template <typename T>
value&
- assign (const string& name) {return vars.assign<T> (name).first.get ();}
+ assign (string name) {return vars.assign<T> (move (name)).first.get ();}
// Return a value suitable for appending. If the variable does not
// exist in this scope's map, then outer scopes are searched for