1

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?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Smok1e
  • 51
  • 1
  • 3

0 Answers0