Not sure about "reliable", and it's the sort of hack that shouldn't be encouraged, but the following should give you a good starting point:
#include <cassert>
#include <cstddef>
#include <type_traits>
template<typename Struct>
struct Member
{
Struct const* s = (Struct*)&((char*)this)[-(int)offsetof(Struct, m)];
};
struct Container
{
int abc;
int def;
Member<Container> m;
};
int main(int argc, char* argv[])
{
assert(std::is_standard_layout<Container>::value);
Container c;
Container const *p1 = &c;
Container const *p2 = c.m.s;
bool test = p1 == p2;
return 0;
}
I added some members so that m has an actual non zero offset for testing, but it also works for zero offset.