aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-09 19:09:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-09 19:09:11 +0200
commit3e06cb9f5a8685ea5e3d4201ca622ae46a235d0e (patch)
tree5b28917238ea66c58b25e5eec74be1c536e4abd3
parentf6789b04aaad8c9d46728a80bb74f555f6058ada (diff)
Implement ==, != operators for dependency_constraint class
-rw-r--r--bpkg/manifest13
1 files changed, 13 insertions, 0 deletions
diff --git a/bpkg/manifest b/bpkg/manifest
index 5d19ea5..6e42085 100644
--- a/bpkg/manifest
+++ b/bpkg/manifest
@@ -270,6 +270,19 @@ namespace bpkg
std::ostream&
operator<< (std::ostream&, const dependency_constraint&);
+ inline bool
+ operator== (const dependency_constraint& x, const dependency_constraint& y)
+ {
+ return x.min_version == y.min_version && x.max_version == y.max_version &&
+ x.min_open == y.min_open && x.max_open == y.max_open;
+ }
+
+ inline bool
+ operator!= (const dependency_constraint& x, const dependency_constraint& y)
+ {
+ return !(x == y);
+ }
+
struct dependency
{
std::string name;