2 template <class STRUCT, class MEMBER> inline STRUCT *
3 setback(MEMBER *bp, MEMBER STRUCT::*offset)
5 // The implementation of this function may be platform dependend
6 if(!bp) return 0; // NULL pointers remain NULL
7 union { int i; MEMBER STRUCT::*of; } u; // Switch types. Casting won't work.
9 return (STRUCT *) ((int) bp - u.i);