10 #ifndef TEUCHOS_DYN_CAST_HPP
11 #define TEUCHOS_DYN_CAST_HPP
33 virtual const char*
what()
const throw() {
return msg.data(); }
39 const std::string &T_from,
40 const std::string &T_from_concr,
41 const std::string &T_to
139 template <
class T_To,
class T_From>
143 T_To *to_ =
dynamic_cast<T_To*
>(&from);
157 #endif // TEUCHOS_DYN_CAST_HPP
virtual const char * what() const
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
#define TEUCHOSCORE_LIB_DLL_EXPORT
T_To & dyn_cast(T_From &from)
Dynamic casting utility function meant to replace dynamic_cast<T&> by throwing a better documented er...
m_bad_cast(const std::string &what_arg)
Exception class for bad cast.
Default traits class that just returns typeid(T).name().
Defines basic traits returning the name of a type in a portable and readable way. ...
TEUCHOSCORE_LIB_DLL_EXPORT void dyn_cast_throw_exception(const std::string &T_from, const std::string &T_from_concr, const std::string &T_to)