29 #ifndef AURORA_DOWNCAST_HPP
30 #define AURORA_DOWNCAST_HPP
33 #include <type_traits>
46 template <
typename To,
typename From>
49 assert(
dynamic_cast<typename std::remove_reference<To>::type*
>(&base));
50 return static_cast<To
>(base);
57 template <
typename To,
typename From>
60 assert(dynamic_cast<To>(base));
61 return static_cast<To
>(base);
68 #endif // AURORA_DOWNCAST_HPP
Definition: DispatchTraits.hpp:39