From 118ef7b0b43f6a79540890a447b7b6d7bac2d548 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Apr 2012 16:48:02 +0200 Subject: Polymorphic inheritance support --- odb/qt/smart-ptr/pointer-traits.hxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'odb') diff --git a/odb/qt/smart-ptr/pointer-traits.hxx b/odb/qt/smart-ptr/pointer-traits.hxx index f8a424a..add6068 100644 --- a/odb/qt/smart-ptr/pointer-traits.hxx +++ b/odb/qt/smart-ptr/pointer-traits.hxx @@ -52,11 +52,25 @@ namespace odb } static unrestricted_pointer_type - cast (const pointer_type& p) + const_pointer_cast (const pointer_type& p) { return qSharedPointerConstCast (p); } + template + static QSharedPointer + static_pointer_cast (const pointer_type& p) + { + return qSharedPointerCast (p); + } + + template + static QSharedPointer + dynamic_pointer_cast (const pointer_type& p) + { + return qSharedPointerDynamicCast (p); + } + public: static void* allocate (std::size_t n) -- cgit v1.1