diff options
-rw-r--r-- | odb/boost/smart-ptr/pointer-traits.hxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/odb/boost/smart-ptr/pointer-traits.hxx b/odb/boost/smart-ptr/pointer-traits.hxx index 6a454f2..3a4a956 100644 --- a/odb/boost/smart-ptr/pointer-traits.hxx +++ b/odb/boost/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 ::boost::const_pointer_cast<unrestricted_element_type> (p); } + template <typename T1> + static ::boost::shared_ptr<T1> + static_pointer_cast (const pointer_type& p) + { + return ::boost::static_pointer_cast<T1> (p); + } + + template <typename T1> + static ::boost::shared_ptr<T1> + dynamic_pointer_cast (const pointer_type& p) + { + return ::boost::dynamic_pointer_cast<T1> (p); + } + public: static void* allocate (std::size_t n) |