aboutsummaryrefslogtreecommitdiff
path: root/bpkg/types.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/types.hxx')
-rw-r--r--bpkg/types.hxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/bpkg/types.hxx b/bpkg/types.hxx
index 7d8740f..1c6e89b 100644
--- a/bpkg/types.hxx
+++ b/bpkg/types.hxx
@@ -165,9 +165,24 @@ namespace bpkg
}
};
+ struct compare_lazy_ptr
+ {
+ template <typename P>
+ bool
+ operator() (const P& x, const P& y) const
+ {
+ // See operator==(database, database).
+ //
+ return x.object_id () != y.object_id ()
+ ? (x.object_id () < y.object_id ())
+ : (&static_cast<typename P::base_type> (x).database () <
+ &static_cast<typename P::base_type> (y).database ());
+ }
+ };
+
// Compare two lazy pointers via the pointed-to object ids.
//
- struct compare_lazy_ptr
+ struct compare_lazy_ptr_id
{
template <typename P>
bool