C++ doesn’t have reflection, and if something isn’t public in a class, you can’t get to it [within “non-tricks” C++ – and with tricks, it means using things like “knowing it’s 18 bytes into the structure, which will break as soon as you use a slightly different architecture, or someone alters the singleton, or some other changes].
solved C++: test if private field exists and get access on it (reflection)