40 if constexpr (std::is_polymorphic<T>::value)
42 return dynamic_cast<U
>(iPtr);
75template<
typename From,
typename To>
93template<
typename From,
typename To>
124 s <<
typeid(T).name();
125 if(std::is_const_v<
typename std::remove_reference<T>::type>)
127 if(std::is_reference_v<T>)
dynamic_cast<U *>(x) does not compile if x is not polymorphic.
Definition Metaprogramming.h:35
static U dynamic(T *iPtr)
Definition Metaprogramming.h:38
constexpr bool is_detected_v
Definition Cpp17.h:63
Definition CircularBuffer.h:26
decltype(std::declval< std::ostream & >()<< std::declval< T const & >()) operator_write_to_ostream_t
Defines the type for operator<<.
Definition Metaprogramming.h:100
constexpr auto is_operator_not_eq_defined
Allows to detect whether a type defines operator!= at compile time.
Definition Metaprogramming.h:70
std::string typeString()
typeid(T).name() does not account for const or reference.
Definition Metaprogramming.h:121
decltype(static_cast< To >(std::declval< From >())) static_cast_t
Defines the type for static_cast<To>(From).
Definition Metaprogramming.h:76
constexpr auto is_static_cast_defined
Allows to detect (at compilation time) whether the call static_cast<To>(from) (where from is of type ...
Definition Metaprogramming.h:94
decltype(std::declval< T const & >() !=std::declval< T const & >()) operator_not_eq_t
Defines the type for operator!=.
Definition Metaprogramming.h:55
constexpr auto is_operator_write_to_ostream_defined
Allows to detect whether a type defines ostream << x at compile time.
Definition Metaprogramming.h:115