I was looking for a way to get the offset of a class field and found this answer.
I still can't figure out how these expressions work:
offsetOf(&X::c)
and
template<typename T, typename U> constexpr size_t offsetOf(U T::*member)
What do &X::c
and U T::*member
mean in this context?