diff options
-rw-r--r-- | odb/qt/smart-ptr/pointer-traits.hxx | 16 |
1 files changed, 15 insertions, 1 deletions
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<unrestricted_element_type> (p); } + template <typename T1> + static QSharedPointer<T1> + static_pointer_cast (const pointer_type& p) + { + return qSharedPointerCast<T1> (p); + } + + template <typename T1> + static QSharedPointer<T1> + dynamic_pointer_cast (const pointer_type& p) + { + return qSharedPointerDynamicCast<T1> (p); + } + public: static void* allocate (std::size_t n) |