If a class is_standard_layout, is that sufficient to guarantee that a given non-static data member will always have the same offset from the object's address (i.e. same across different instances of that class, process-wide)?
That effectively has to hold for objects of any type (within a program). Accessing a subobject happens via offsets which are known at compile-time and constant in machine code. For SL types, you can verify this via offsetof
- which is guaranteed to work for standard-layout types and basically implies a uniform offset.