Potentially yes, but there are limitations.
Only if the class in question is a standard layout class is this possible. In that case, you can reinterpret a pointer to the first member as a pointer to the class itself. You can then indirect through the pointer to get a reference:
static_assert(std::is_standard_layout_v<example>);
example* objPointer = reinterpret_cast<example*>(point);
assert(objPointer == &exampleObject); // guaranteed to pass
Getting pointer to a standard layout class based on a member other than the first may be possible using the offsetof
macro, although all attempts to implement that idea that I've seen rely on something that is either technically undefined behaviour, or at least implementation defined.
Here is the implementation from the Linux kernel (not written in C++, but C, which may be more relaxed in what is allowed):
#define container_of(ptr, type, member) ({ \
const typeof(((type *)0)->member) * __mptr = (ptr); \
(type *)((char *)__mptr - offsetof(type, member)); })
typeof
is not in standard C++, nor even in standard C, but is a GNU language extension. This also uses a statement expression (not to be confused with expression statements), which is another GNU extension.