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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…