aboutsummaryrefslogtreecommitdiff
path: root/odb/tr1/pointer-traits.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/tr1/pointer-traits.hxx')
-rw-r--r--odb/tr1/pointer-traits.hxx16
1 files changed, 15 insertions, 1 deletions
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<unrestricted_element_type> (p);
}
+ template <typename T1>
+ static std::tr1::shared_ptr<T1>
+ static_pointer_cast (const pointer_type& p)
+ {
+ return std::tr1::static_pointer_cast<T1> (p);
+ }
+
+ template <typename T1>
+ static std::tr1::shared_ptr<T1>
+ dynamic_pointer_cast (const pointer_type& p)
+ {
+ return std::tr1::dynamic_pointer_cast<T1> (p);
+ }
+
public:
static void*
allocate (std::size_t n)