I'm trying to find this in C++ standard (ISO/IEC 14882) but unfortunately I can't.
Is this standard conforming? Will it result in undefined behaviour? I am SURE that Get() will return pointer to UserClass not to something else.
// external functions (in DLL if this matters at all)
extern "C" int Set(void* Ptr);
extern "C" int Get(void** Ptr);
I have my doubts because there is a hidden conversion from UserClass* to void* (I know I can solve this using a temporary variable).