From 3e06cb9f5a8685ea5e3d4201ca622ae46a235d0e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Feb 2016 19:09:11 +0200 Subject: Implement ==, != operators for dependency_constraint class --- bpkg/manifest | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- cgit v1.1