5 #ifndef ODB_TR1_POINTER_TRAITS_HXX
6 #define ODB_TR1_POINTER_TRAITS_HXX
10 #include <odb/details/config.hxx>
15 #if !(defined(ODB_CXX11) && defined(_MSC_VER))
23 #include <odb/details/meta/remove-const.hxx>
34 static const bool lazy =
false;
39 typedef typename odb::details::meta::remove_const<element_type>::result
41 typedef std::tr1::shared_ptr<unrestricted_element_type>
63 static unrestricted_pointer_type
69 template <
typename T1>
70 static std::tr1::shared_ptr<T1>
73 return std::tr1::static_pointer_cast<T1> (p);
76 template <
typename T1>
77 static std::tr1::shared_ptr<T1>
80 return std::tr1::dynamic_pointer_cast<T1> (p);
87 return operator new (n);
104 static const bool lazy =
false;
118 #endif // !(ODB_CXX11 && _MSC_VER)
122 #endif // ODB_TR1_POINTER_TRAITS_HXX
static std::tr1::shared_ptr< T1 > static_pointer_cast(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:71
static element_type & get_ref(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:52
Definition: pointer-traits.hxx:24
smart_ptr_guard< pointer_type > guard
Definition: tr1/pointer-traits.hxx:43
Definition: pointer-traits.hxx:23
T element_type
Definition: tr1/pointer-traits.hxx:36
static bool null_ptr(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:58
std::tr1::shared_ptr< element_type > strong_pointer_type
Definition: tr1/pointer-traits.hxx:108
static void * allocate(std::size_t n)
Definition: tr1/pointer-traits.hxx:85
std::tr1::shared_ptr< unrestricted_element_type > unrestricted_pointer_type
Definition: tr1/pointer-traits.hxx:42
Definition: pointer-traits.hxx:28
static std::tr1::shared_ptr< T1 > dynamic_pointer_cast(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:78
std::tr1::shared_ptr< element_type > pointer_type
Definition: tr1/pointer-traits.hxx:37
static strong_pointer_type lock(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:111
odb::details::meta::remove_const< element_type >::result unrestricted_element_type
Definition: tr1/pointer-traits.hxx:40
Definition: pointer-traits.hxx:59
std::tr1::shared_ptr< const element_type > const_pointer_type
Definition: tr1/pointer-traits.hxx:38
static unrestricted_pointer_type const_pointer_cast(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:64
T element_type
Definition: tr1/pointer-traits.hxx:106
static void free(void *p)
Definition: tr1/pointer-traits.hxx:91
static element_type * get_ptr(const pointer_type &p)
Definition: tr1/pointer-traits.hxx:46
std::tr1::weak_ptr< element_type > pointer_type
Definition: tr1/pointer-traits.hxx:107
pointer_kind
Definition: pointer-traits.hxx:19