libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
#include <dynamic_cast.hpp>
Classes | |
struct | exception_type |
Public Types | |
typedef To | result_type |
Public Member Functions | |
template<typename From > | |
result_type & | operator() (From &obj, const unsigned long l, const char *fun_name, const char *file) noexcept(false) |
The purpose of this class is to give an opportunity to programmers to replace the useless "std::bad_cast" thrown when performing a "dynamic_cast<To &>(obj)". This class will catch the exception, wrap it up with lots more info, then re-throw an exception_type derived from Excpt and std::bad_cast. For example it will give:
Definition at line 37 of file dynamic_cast.hpp.
typedef To jmmcg::LIBJMMCG_VER_NAMESPACE::checked_dynamic_cast< To, Excpt >::result_type |
Definition at line 38 of file dynamic_cast.hpp.
|
inlinenoexcept |
Definition at line 50 of file dynamic_cast.hpp.
References jmmcg::LIBJMMCG_VER_NAMESPACE::info::function::add_arg(), jmmcg::LIBJMMCG_VER_NAMESPACE::info::function::function(), and jmmcg::LIBJMMCG_VER_NAMESPACE::info::revision::revision().