#pragma clang system_header template void callMethod(CreateFunction createFunction) { createFunction()->method(); } template inline void localVar(CreateFunction createFunction) { T* obj = createFunction(); obj->method(); } template struct MemberVariable { T* obj { nullptr }; };