こういうことがしたいんじゃねとエスパー

#include <stddef.h>
class Hoge
{
private:
 int x, y;
 bool flag;

 class Statics
 {
 public:
  Statics()
  {
   this->members.push_back(offsetof(Hoge,x));
   this->members.push_back(offsetof(Hoge,y));
   this->members.push_back(offsetof(Hoge,flag));
  }
  void* MenberToPointer(Hoge* p, size_t idx) {
   return void*(char*(p) + menbers[idx]);
  }

  std::vector<size_t> members;
 } static statics;
};