template<class T, typename U> ptrdiff_t foo(T U::* m)
{
// return offset
}
How I can get the offset of the field 'm' in this context? I would prefer to use am compile-time expression.
Thanks in advance for any help. Best regards
See Question&Answers more detail:os