From 712d06616182b5b59a0d0406388154d6e4bf4500 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 9 Feb 2014 18:59:33 +0100 Subject: [PATCH] Potentially fix compile with clang. The fix may be dangerous. I changed how Reference<> types compare - they previously compared by value (which is not even supported in clang), now compare by reference. If this breaks anything, I'll rather undo this and instead make the types used as Reference<> support operator< to compare by value. But I think comparison by reference is actually wanted here. --- libs/generic/reference.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/generic/reference.h b/libs/generic/reference.h index df5a05a8..141f14f4 100644 --- a/libs/generic/reference.h +++ b/libs/generic/reference.h @@ -49,11 +49,11 @@ Type* get_pointer() const { template bool operator<( const Reference& self, const Reference& other ){ - return self.get() < other.get(); + return self.get_pointer() < other.get_pointer(); } template bool operator==( const Reference& self, const Reference& other ){ - return self.get() == other.get(); + return self.get_pointer() == other.get_pointer(); } /// \brief construct a reference to a mutable object. -- 2.39.2