Undefined Struct error when element of TSet is struct itself

Hello.

I’m trying to implement a function arguments to linked-list when given a function.

errors occur in the next case. but not occur TArray.

struct FNode
{
   TSet<FNode> NextNodes;
};
Engine\Source\Runtime\Core\Public\Templates/UnrealTypeTraits.h(304): error C2027: use of undefined type 'FNode'

In case, can’t i use it?

You can’t have recursive structs in unreal :frowning:

You would need a new struct like FNodeKey and then use that as the key in FNode

1 Like