49 struct is_shared_ptr<const std::shared_ptr<T> &> :
public std::true_type
56 template <
typename Out,
typename In>
57 std::enable_if_t<is_shared_ptr_v<Out>, Out>
62 if (
auto p =
dynamic_cast<typename Out::element_type *
>(in.get()))
68 ASSERT_LOG(0,
"Pointer is null after assert_cast");
73 template <
typename Out,
typename In>
74 std::enable_if_t<!is_shared_ptr_v<Out> && !std::is_pointer<Out>::value, Out &&>
79 Out &&tmp =
dynamic_cast<Out &&
>(in);
80 return std::forward<Out>(tmp);
82 catch (
const std::bad_cast &)
89 template <
typename Out,
typename In>
90 std::enable_if_t<std::is_pointer<Out>::value && std::is_pointer<In>::value, Out>
95 if (
auto p =
dynamic_cast<Out
>(in))
101 ASSERT_LOG(0,
"Pointer is null after assert_cast");