aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-07 17:31:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-07 17:31:02 +0200
commit957d1708d7fd10ebaf4c26a6711f9579fcb6003d (patch)
treed2b146d669c6a2dedcd7b47753e3243b3994e990
parent098b528e2deddd128a05d91ea6b7a555a74b22b2 (diff)
Make anal clang happy
-rw-r--r--common/bulk/driver.cxx7
1 files changed, 6 insertions, 1 deletions
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 <typename I, typename T>
struct element_traits
{
typedef T type;
+ typedef T* pointer;
typedef std::auto_ptr<T> auto_ptr;
static T& ref (T& x) {return x;}
@@ -51,6 +52,7 @@ template <typename I, typename T>
struct element_traits<I, T*>
{
typedef T type;
+ typedef T* pointer;
typedef std::auto_ptr<T> auto_ptr;
static T& ref (T* p) {return *p;}
@@ -61,6 +63,7 @@ template <typename I, typename T>
struct element_traits<I, std::auto_ptr<T> >
{
typedef T type;
+ typedef std::auto_ptr<T> pointer;
typedef std::auto_ptr<T> auto_ptr;
static T& ref (const auto_ptr& p) {return *p;}
@@ -72,6 +75,7 @@ template <typename I, typename T>
struct element_traits<I, std::unique_ptr<T>>
{
typedef T type;
+ typedef std::unique_ptr<T> pointer;
typedef std::unique_ptr<T> auto_ptr;
static T& ref (const unique_ptr<T>& p) {return *p;}
@@ -201,7 +205,8 @@ erase (const auto_ptr<database>& db, I b, I e)
for (I i (b); i != e; ++i)
{
type& x (traits::ref (*i));
- assert (traits::ptr (db->find<type> (x.id)) == 0);
+ typename traits::pointer p (db->find<type> (x.id));
+ assert (traits::ptr (p) == 0);
}
t.commit ();