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

Static Public Member Functions

static const T1 *const cast (T2 &arg)
 

Detailed Description

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

Definition at line 112 of file ScalarFunctionsImpl.cc.

Member Function Documentation

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

Definition at line 113 of file ScalarFunctionsImpl.cc.

113  {
114  const T1*const out = dynamic_cast<const T1*const>(arg);
115  if (out == 0) {
116 #ifdef MYDEBUG
117  std::cerr << "ptr_cast error" << std::endl;
118 #endif
119  throw std::bad_cast();
120  }
121  return out;
122  };

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