diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-06 08:31:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-06 08:31:41 +0200 |
commit | 4bcac2677119f800a9692bd65366417fe409735e (patch) | |
tree | 9dfa8d9f54b0d5516ff22023d17246ccf344a5e1 /build2/variable | |
parent | a9663e16d5765a42175ce6131b8cae5ecc622b17 (diff) |
Add support for printing overrides in dump()
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build2/variable b/build2/variable index 10a0f59..8f0969a 100644 --- a/build2/variable +++ b/build2/variable @@ -271,6 +271,20 @@ namespace build2 lookup (const value_type& v, const T& x): lookup (&v, &x.vars) {} }; + // Two lookups are equal if they point to the same variable. + // + inline bool + operator== (const lookup& x, const lookup& y) + { + bool r (x.value == y.value); + assert (!r || x.vars == y.vars); + return r; + } + + inline bool + operator!= (const lookup& x, const lookup& y) {return !(x == y);} + + // Representation types. // // Potential optimizations: |