30 #ifndef _GLIBCXX_CAST_H 31 #define _GLIBCXX_CAST_H 1 33 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
35 _GLIBCXX_BEGIN_NAMESPACE_VERSION
51 template<
typename _ToType>
53 {
typedef typename _ToType::element_type* type; };
55 template<
typename _ToType>
57 {
typedef _ToType* type; };
66 template<
typename _ToType,
typename _FromType>
70 type
>(__arg.get())); }
72 template<
typename _ToType,
typename _FromType>
74 __dynamic_pointer_cast(
const _FromType& __arg)
75 {
return _ToType(
dynamic_cast<typename _Caster<_ToType>::
76 type
>(__arg.get())); }
78 template<
typename _ToType,
typename _FromType>
80 __const_pointer_cast(
const _FromType& __arg)
81 {
return _ToType(
const_cast<typename _Caster<_ToType>::
82 type
>(__arg.get())); }
84 template<
typename _ToType,
typename _FromType>
86 __reinterpret_pointer_cast(
const _FromType& __arg)
87 {
return _ToType(
reinterpret_cast<typename _Caster<_ToType>::
88 type
>(__arg.get())); }
94 template<
typename _ToType,
typename _FromType>
100 template<
typename _ToType,
typename _FromType>
102 __dynamic_pointer_cast(_FromType* __arg)
103 {
return _ToType(
dynamic_cast<typename _Caster<_ToType>::
106 template<
typename _ToType,
typename _FromType>
108 __const_pointer_cast(_FromType* __arg)
109 {
return _ToType(
const_cast<typename _Caster<_ToType>::
112 template<
typename _ToType,
typename _FromType>
114 __reinterpret_pointer_cast(_FromType* __arg)
115 {
return _ToType(
reinterpret_cast<typename _Caster<_ToType>::
118 _GLIBCXX_END_NAMESPACE_VERSION
121 #endif // _GLIBCXX_CAST_H _ToType __static_pointer_cast(const _FromType &__arg)
GNU extensions for public use.