aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/pointer-traits.hxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/odb/pointer-traits.hxx b/odb/pointer-traits.hxx
index dc10205..a20aa93 100644
--- a/odb/pointer-traits.hxx
+++ b/odb/pointer-traits.hxx
@@ -235,16 +235,16 @@ namespace odb
// Specialization for C++11 std::unique_ptr.
//
- template <typename T, typename D>
- class pointer_traits<std::unique_ptr<T, D>>
+ template <typename T, template <typename> class D>
+ class pointer_traits<std::unique_ptr<T, D<T>>>
{
public:
static const pointer_kind kind = pk_unique;
static const bool lazy = false;
typedef T element_type;
- typedef std::unique_ptr<element_type, D> pointer_type;
- typedef std::unique_ptr<const element_type, D> const_pointer_type;
+ typedef std::unique_ptr<T, D<T>> pointer_type;
+ typedef std::unique_ptr<const T, D<const T>> const_pointer_type;
typedef smart_ptr_guard<pointer_type> guard;
static element_type*
@@ -271,16 +271,16 @@ namespace odb
// Note: transfers ownership.
//
template <typename T1>
- static std::unique_ptr<T1>
+ static std::unique_ptr<T1, D<T1>>
static_pointer_cast (pointer_type& p)
{
- return std::unique_ptr<T1> (static_cast<T1*> (p.release ()));
+ return std::unique_ptr<T1, D<T1>> (static_cast<T1*> (p.release ()));
}
// Note: transfers ownership if successful.
//
template <typename T1>
- static std::unique_ptr<T1>
+ static std::unique_ptr<T1, D<T1>>
dynamic_pointer_cast (pointer_type& p)
{
T1* p1 (dynamic_cast<T1*> (p.get ()));
@@ -288,7 +288,7 @@ namespace odb
if (p1 != 0)
p.release ();
- return std::unique_ptr<T1> (p1);
+ return std::unique_ptr<T1, D<T1>> (p1);
}
public: