'TSubobjectPtr::operator =' : cannot access private member declared in class 'TSubobjectPtr'

I always use the following trick. Let’s suppose that we have troubling Header.h file with method in private/protected field. I use:

#define class struct
#define private public
#define protected public
#include "Header.h"
#undef class
#undef private
#undef protected