10template<
typename TO,
typename FROM>
12#if defined(KUZU_RUNTIME_CHECKS) || !defined(NDEBUG)
13 static_assert(std::is_pointer<TO>());
14 TO newVal =
dynamic_cast<TO
>(old);
18 return reinterpret_cast<TO
>(old);
22template<
typename TO,
typename FROM>
24#if defined(KUZU_RUNTIME_CHECKS) || !defined(NDEBUG)
25 static_assert(std::is_reference<TO>());
27 TO newVal =
dynamic_cast<TO
>(old);
29 }
catch (std::bad_cast& e) {
33 return reinterpret_cast<TO
>(old);
#define KU_ASSERT(condition)
Definition assert.h:19
TO ku_dynamic_cast(FROM *old)
Definition cast.h:11
Definition array_utils.h:7