From b33321c4d05c0ac759bf3fcf647a568af8bfca0c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jun 2016 18:48:14 +0200 Subject: Fix bug in std::unique_ptr deleter mapping --- odb/pointer-traits.hxx | 16 ++++++++-------- 1 file 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 - class pointer_traits> + template class D> + class pointer_traits>> { public: static const pointer_kind kind = pk_unique; static const bool lazy = false; typedef T element_type; - typedef std::unique_ptr pointer_type; - typedef std::unique_ptr const_pointer_type; + typedef std::unique_ptr> pointer_type; + typedef std::unique_ptr> const_pointer_type; typedef smart_ptr_guard guard; static element_type* @@ -271,16 +271,16 @@ namespace odb // Note: transfers ownership. // template - static std::unique_ptr + static std::unique_ptr> static_pointer_cast (pointer_type& p) { - return std::unique_ptr (static_cast (p.release ())); + return std::unique_ptr> (static_cast (p.release ())); } // Note: transfers ownership if successful. // template - static std::unique_ptr + static std::unique_ptr> dynamic_pointer_cast (pointer_type& p) { T1* p1 (dynamic_cast (p.get ())); @@ -288,7 +288,7 @@ namespace odb if (p1 != 0) p.release (); - return std::unique_ptr (p1); + return std::unique_ptr> (p1); } public: -- cgit v1.1