From 957d1708d7fd10ebaf4c26a6711f9579fcb6003d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 7 Feb 2015 17:31:02 +0200 Subject: Make anal clang happy --- common/bulk/driver.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'common/bulk') diff --git a/common/bulk/driver.cxx b/common/bulk/driver.cxx index f9f75cc..f1b624e 100644 --- a/common/bulk/driver.cxx +++ b/common/bulk/driver.cxx @@ -41,6 +41,7 @@ template struct element_traits { typedef T type; + typedef T* pointer; typedef std::auto_ptr auto_ptr; static T& ref (T& x) {return x;} @@ -51,6 +52,7 @@ template struct element_traits { typedef T type; + typedef T* pointer; typedef std::auto_ptr auto_ptr; static T& ref (T* p) {return *p;} @@ -61,6 +63,7 @@ template struct element_traits > { typedef T type; + typedef std::auto_ptr pointer; typedef std::auto_ptr auto_ptr; static T& ref (const auto_ptr& p) {return *p;} @@ -72,6 +75,7 @@ template struct element_traits> { typedef T type; + typedef std::unique_ptr pointer; typedef std::unique_ptr auto_ptr; static T& ref (const unique_ptr& p) {return *p;} @@ -201,7 +205,8 @@ erase (const auto_ptr& db, I b, I e) for (I i (b); i != e; ++i) { type& x (traits::ref (*i)); - assert (traits::ptr (db->find (x.id)) == 0); + typename traits::pointer p (db->find (x.id)); + assert (traits::ptr (p) == 0); } t.commit (); -- cgit v1.1