diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-23 14:25:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-26 09:38:09 +0200 |
commit | f98262e37f608330fcfce799dcacc6fbacac8f8a (patch) | |
tree | 080ef26d80ee6419ef3a2f27434d75136f502cb2 /build2/variable.hxx | |
parent | c414abe13450e2b4e204f6368ba83c8916de1ebd (diff) |
Implement forwarded configurations and backlinking
Diffstat (limited to 'build2/variable.hxx')
-rw-r--r-- | build2/variable.hxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/build2/variable.hxx b/build2/variable.hxx index 299ec71..d61bb1c 100644 --- a/build2/variable.hxx +++ b/build2/variable.hxx @@ -96,13 +96,13 @@ namespace build2 enum class variable_visibility { + // Note that the search for target type/pattern-specific terminates at + // the project boundary. + // target, // Target and target type/pattern-specific. scope, // This scope (no outer scopes). project, // This project (no outer projects). normal // All outer scopes. - - // Note that the search for target type/pattern-specific terminates at - // the project boundary. }; // variable @@ -307,7 +307,7 @@ namespace build2 // from lookup expects the value to also be defined. // // Note that a cast to names expects the value to be untyped while a cast - // to vector<names> -- typed. + // to vector<name> -- typed. // // Why are these non-members? The cast is easier on the eyes and is also // consistent with the cast operators. The other two are for symmetry. @@ -1236,6 +1236,13 @@ namespace build2 value& assign (const variable& var) {return insert (var).first;} + value& + assign (const variable* var) // For cached variables. + { + assert (var != nullptr); + return assign (*var); + } + // Note that the variable is expected to have already been registered. // value& |