Unreal class name prefix is giving me trouble

Unreal class name prefix law is really giving me hell.

template<typename UnrealClass, typename SyncClass>
class GLogicNode : public IGEventListener<UnrealClass>
{

I want this class GLogicNode to utilize the TWeakObjectPtr functionality of unreal.
So GLogicNode has to be a subclass of UObject, but I want something more.
I want this GLogicNode can inherit any subclass of UObject, like this:

class FGameSystemNode : public GLogicNode<UObject, MainThreadSyncCore> { };

class FGameActorNode : public GLogicNode<AActor, MainThreadSyncCore> { };

those two lines actually compiles. but it’s just a delusion:

UnrealClass changes from AActor to UObject and Widget, the the prefix of GLogicNode is not gonna fit.
When I make another class, it finally failed in compilation.

UCLASS()
class FGAME_API ULogicCore : public GLogicNode<UObject, MainThreadSyncCore>
{
	GENERATED_BODY()

the compiler complained about the prefix…

So my question is where should I been looking to get over the prefix problem?
You know Unreal AActor is directly inherited from UObject.

UCLASS(BlueprintType, Blueprintable, config=Engine, meta=(ShortTooltip="An Actor is an object that can be placed or spawned in the world."))
class ENGINE_API AActor : public UObject
{