38 #ifndef AFF_CHECKEDCAST_H_VERSION 40 #define AFF_CHECKEDCAST_H_VERSION \ 41 "AFF_CHECKEDCAST_H V1.0" 83 template<
class T,
class TT>
89 return(reinterpret_cast<TT*>(
90 SizeCheck<
sizeof(T),
sizeof(TT)>::have_same_size(
123 template<
class Tfrom,
class Tto>
137 template<
class Tfrom,
class Tto>
151 template<
class Tfrom,
class Tto>
190 #endif // AFF_CHECKEDCAST_H_VERSION (includeguard) Root namespace of library.
utility for compile-time checked cast
static T * have_same_size(T *v)
static T * respects_constness(T *v)
checks for matching type-size
static TT * cast(T *p)
return a type-casted (and type-checked) pointer
static T * respects_constness(T *v)
checks for const-correctness of the cast
static T * respects_constness(T *v)