110template<
typename Target_ptr,
111 typename Const_target_ptr>
134 template<
typename From_ptr>
147 template<
typename From_ptr>
159 template<
typename From_ptr>
171 template<
typename From_ptr>
177template<
typename Target_ptr,
typename Const_target_ptr>
178template<
typename From_ptr>
183 auto const raw_ptr_post_cast =
static_cast<typename Target_ptr::element_type*
>(ptr_to_cast.get());
184 return Target_ptr(ptr_to_cast, raw_ptr_post_cast);
187template<
typename Target_ptr,
typename Const_target_ptr>
188template<
typename From_ptr>
193 auto const raw_ptr_post_cast =
static_cast<typename Target_ptr::element_type
const *
>(ptr_to_cast.get());
194 return Const_target_ptr(ptr_to_cast, raw_ptr_post_cast);
197template<
typename Target_ptr,
typename Const_target_ptr>
198template<
typename From_ptr>
203 auto const raw_ptr_post_cast =
dynamic_cast<typename Target_ptr::element_type*
>(ptr_to_cast.get());
204 return raw_ptr_post_cast ? Target_ptr(ptr_to_cast, raw_ptr_post_cast)
208template<
typename Target_ptr,
typename Const_target_ptr>
209template<
typename From_ptr>
214 auto const raw_ptr_post_cast =
dynamic_cast<typename Target_ptr::element_type
const *
>(ptr_to_cast.get());
215 return raw_ptr_post_cast ? Const_target_ptr(ptr_to_cast, raw_ptr_post_cast)
216 : Const_target_ptr();
Convenience class template that endows the given subclass T with nested aliases Ptr and Const_ptr ali...
static Const_ptr dynamic_const_ptr_cast(const From_ptr &ptr_to_cast)
Identical to const_ptr_cast() but a dynamic_pointer_cast instead of static.
static Const_ptr const_ptr_cast(const From_ptr &ptr_to_cast)
Identical to ptr_cast() but adds const-ness (immutability) to the pointed-to type.
static Ptr ptr_cast(const From_ptr &ptr_to_cast)
Provides syntactic-sugary way to perform a static_pointer_cast<> from a compatible smart pointer type...
Target_ptr Ptr
Short-hand for ref-counted pointer to mutable values of type Target_type::element_type (a-la T*).
static Ptr dynamic_ptr_cast(const From_ptr &ptr_to_cast)
Equivalent to ptr_cast() but a dynamic_pointer_cast instead of static.
Const_target_ptr Const_ptr
Short-hand for ref-counted pointer to immutable values of type Target_type::element_type (a-la T cons...
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...