From 1896d36996ab48ed7271e855d7e32b4e61f64896 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Apr 2012 16:48:00 +0200 Subject: Polymorphic inheritance support --- odb/tr1/pointer-traits.hxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'odb/tr1') diff --git a/odb/tr1/pointer-traits.hxx b/odb/tr1/pointer-traits.hxx index 12e1164..310c448 100644 --- a/odb/tr1/pointer-traits.hxx +++ b/odb/tr1/pointer-traits.hxx @@ -61,11 +61,25 @@ namespace odb } static unrestricted_pointer_type - cast (const pointer_type& p) + const_pointer_cast (const pointer_type& p) { return std::tr1::const_pointer_cast (p); } + template + static std::tr1::shared_ptr + static_pointer_cast (const pointer_type& p) + { + return std::tr1::static_pointer_cast (p); + } + + template + static std::tr1::shared_ptr + dynamic_pointer_cast (const pointer_type& p) + { + return std::tr1::dynamic_pointer_cast (p); + } + public: static void* allocate (std::size_t n) -- cgit v1.1