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

Static Public Member Functions

static T1 *const cast (T2 &arg)
 

Detailed Description

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

Definition at line 86 of file ScalarFunctionsImpl.cc.

Member Function Documentation

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

Definition at line 87 of file ScalarFunctionsImpl.cc.

87  {
88  T1*const out = dynamic_cast<T1*const>(arg);
89  if (out == 0) {
90 #ifdef MYDEBUG
91  std::cerr << "ptr_cast error" << std::endl;
92 #endif
93  throw std::bad_cast();
94  }
95  return out;
96  };

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