aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-31 17:43:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-31 17:43:06 +0200
commit4e1d5e3313cff60d503b0cde68730bb7e95e0621 (patch)
treefd4864b5ea35d75130f423975104f1d44bd095cc /tests
parent27fbb4c8e79035952b617e13c86576670bd71769 (diff)
Fix ADL issues0.2.0
Diffstat (limited to 'tests')
-rw-r--r--tests/load/driver.cxx36
1 files changed, 23 insertions, 13 deletions
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index 992ce2d..006f14c 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -25,30 +25,40 @@ using namespace odb::core;
using namespace butl;
using namespace brep;
-// @@ Rather add this to optional in libbutl. See:
+// @@ Rather add this to optional in libbutl! See:
//
// http://en.cppreference.com/w/cpp/experimental/optional/operator_cmp
-template <typename T>
-static inline auto
-operator== (const optional<T>& a, const optional<T>& b) -> decltype (*a == *b)
+namespace butl
{
- return !a == !b && (!a || *a == *b);
+ template <typename T>
+ static inline auto
+ operator== (const optional<T>& a, const optional<T>& b) ->
+ decltype (*a == *b)
+ {
+ return !a == !b && (!a || *a == *b);
+ }
}
-// @@ Add it to libbrep rather?
+// @@ Add it to libbpkg/libbrep rather!
//
-static inline bool
-operator== (const dependency_constraint& a, const dependency_constraint& b)
+namespace bpkg
{
- 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;
+ 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;
+ }
}
-static inline bool
-operator== (const dependency& a, const dependency& b)
+namespace brep
{
- return a.name () == b.name () && a.constraint == b.constraint;
+ static inline bool
+ operator== (const dependency& a, const dependency& b)
+ {
+ return a.name () == b.name () && a.constraint == b.constraint;
+ }
}
static bool