aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-31 18:42:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-31 18:44:07 +0200
commita84ff43b183181e0a12c6d5e31c1f366d39ce2fe (patch)
tree3dce54b64fd8e9917ed034a3e2c9e20f057eece4 /build2/variable.hxx
parent89f5bc3b423a1269a60ccca05174226c8de40357 (diff)
Experimental (and probably broken) pkg-config generation support
Diffstat (limited to 'build2/variable.hxx')
-rw-r--r--build2/variable.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/build2/variable.hxx b/build2/variable.hxx
index f0218fe..decc300 100644
--- a/build2/variable.hxx
+++ b/build2/variable.hxx
@@ -336,13 +336,18 @@ namespace build2
const value_type* operator-> () const {return value;}
// Return true if this value belongs to the specified scope or target.
- // Note that it can also be a target type/pattern-specific value (in
- // which case it won't belong to either).
+ // Note that it can also be a target type/pattern-specific value in which
+ // case it won't belong to either unless we pass true as a second argument
+ // to consider it belonging to a scope (note that this test is expensive).
//
template <typename T>
bool
belongs (const T& x) const {return vars == &x.vars;}
+ template <typename T>
+ bool
+ belongs (const T& x, bool target_type_pattern) const;
+
lookup (): value (nullptr), vars (nullptr) {}
template <typename T>