MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ptr_cast_helper< const T1 *, T2 > Struct Template Reference

Static Public Member Functions

static const T1 * cast (T2 &arg)
 

Detailed Description

template<class T1, class T2>
struct ptr_cast_helper< const T1 *, T2 >

Definition at line 99 of file ScalarFunctionsImpl.cc.

Member Function Documentation

template<class T1 , class T2 >
static const T1* ptr_cast_helper< const T1 *, T2 >::cast ( T2 &  arg)
inlinestatic

Definition at line 100 of file ScalarFunctionsImpl.cc.

100  {
101  const T1* out = dynamic_cast<const T1*>(arg);
102  if (out == 0) {
103 #ifdef MYDEBUG
104  std::cerr << "ptr_cast error" << std::endl;
105 #endif
106  throw std::bad_cast();
107  }
108  return out;
109  };

The documentation for this struct was generated from the following file: