117template<
typename Target_ptr,
118 typename Const_target_ptr>
141 template<
typename From_ptr>
154 template<
typename From_ptr>
166 template<
typename From_ptr>
178 template<
typename From_ptr>
184template<
typename Target_ptr,
typename Const_target_ptr>
185template<
typename From_ptr>
190 auto const raw_ptr_post_cast =
static_cast<typename Target_ptr::element_type*
>(ptr_to_cast.get());
191 return Target_ptr(ptr_to_cast, raw_ptr_post_cast);
194template<
typename Target_ptr,
typename Const_target_ptr>
195template<
typename From_ptr>
200 auto const raw_ptr_post_cast =
static_cast<typename Target_ptr::element_type
const *
>(ptr_to_cast.get());
201 return Const_target_ptr(ptr_to_cast, raw_ptr_post_cast);
204template<
typename Target_ptr,
typename Const_target_ptr>
205template<
typename From_ptr>
210 auto const raw_ptr_post_cast =
dynamic_cast<typename Target_ptr::element_type*
>(ptr_to_cast.get());
211 return raw_ptr_post_cast ? Target_ptr(ptr_to_cast, raw_ptr_post_cast)
215template<
typename Target_ptr,
typename Const_target_ptr>
216template<
typename From_ptr>
221 auto const raw_ptr_post_cast =
dynamic_cast<typename Target_ptr::element_type
const *
>(ptr_to_cast.get());
222 return raw_ptr_post_cast ? Const_target_ptr(ptr_to_cast, raw_ptr_post_cast)
223 : 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...