aboutsummaryrefslogtreecommitdiff
path: root/libbutl/utility.mxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/utility.mxx')
-rw-r--r--libbutl/utility.mxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/libbutl/utility.mxx b/libbutl/utility.mxx
index 988ca22..4c83827 100644
--- a/libbutl/utility.mxx
+++ b/libbutl/utility.mxx
@@ -162,7 +162,10 @@ LIBBUTL_MODEXPORT namespace butl
struct compare_pointer_target
{
template <typename P>
- bool operator() (const P& x, const P& y) const {return *x < *y;}
+ bool operator() (const P& x, const P& y) const
+ {
+ return *x < *y;
+ }
};
//struct hash_pointer_target
@@ -171,6 +174,17 @@ LIBBUTL_MODEXPORT namespace butl
// std::size_t operator() (const P& x) const {return std::hash (*x);}
//};
+ // Compare two std::reference_wrapper's.
+ //
+ struct compare_reference_target
+ {
+ template <typename R>
+ bool operator() (const R& x, const R& y) const
+ {
+ return x.get () < y.get ();
+ }
+ };
+
// Combine one or more hash values.
//
inline std::size_t