15 #ifndef CORE_UTIL_TYPE_H_
16 #define CORE_UTIL_TYPE_H_
18 #include <type_traits>
29 template <
bool Condition,
typename T,
typename U>
32 template <
typename T,
typename U>
37 template <
typename T,
typename U>
44 using raw_type = std::remove_pointer_t<std::decay_t<T>>;
51 template <
typename T,
size_t N>
54 template <
typename T, std::
size_t N>
59 template <
typename TTo,
typename TFrom>
61 assert(
dynamic_cast<TTo
>(from) &&
62 Concat(
"Could not cast object ", from,
" to type ",
typeid(TTo).name())
64 return static_cast<TTo
>(from);
std::string Concat(const Args &... parts)
Concatenates all arguments into a string. Equivalent to streaming all arguments into a stringstream a...
std::remove_pointer_t< std::decay_t< T > > raw_type
Type trait that converts T*, T&, T&&, T*& to T
TTo bdm_static_cast(TFrom from)
Checks whether T is std::array or bdm::MathArray.