From ae301626ddd8288bd58d67dfb7b2a660740001b0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Feb 2016 19:10:38 +0200 Subject: Implement ==, != operators for dependency class --- tests/load/driver.cxx | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'tests') diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx index 006f14c..539c50d 100644 --- a/tests/load/driver.cxx +++ b/tests/load/driver.cxx @@ -25,42 +25,6 @@ using namespace odb::core; using namespace butl; using namespace brep; -// @@ Rather add this to optional in libbutl! See: -// -// http://en.cppreference.com/w/cpp/experimental/optional/operator_cmp - -namespace butl -{ - template - static inline auto - operator== (const optional& a, const optional& b) -> - decltype (*a == *b) - { - return !a == !b && (!a || *a == *b); - } -} - -// @@ Add it to libbpkg/libbrep rather! -// -namespace bpkg -{ - static inline bool - operator== (const dependency_constraint& a, const dependency_constraint& b) - { - return a.min_version == b.min_version && a.max_version == b.max_version && - a.min_open == b.min_open && a.max_open == b.max_open; - } -} - -namespace brep -{ - static inline bool - operator== (const dependency& a, const dependency& b) - { - return a.name () == b.name () && a.constraint == b.constraint; - } -} - static bool check_location (shared_ptr& p) { -- cgit v1.1