Proper way to define a TCircularQueue?

Hi guys. So I’m trying to create a TCircularQueue in order to store the last 64 player inputs for my game’s netcode. I posted a question a while back where I was told that the proper way to create that type of TCircularQueue is:

TCircularQueue<TArray<FVector2D>> InputBufferAxis = TCircularQueue<TArray<FVector2D>>(64);

However, when I try to compile this code I get the following error:

I also tried these following syntax

	TCircularQueue<FVector> TestQueue;
	class TCircularQueue<FVector> TestQueue2;

and got these errors:

287572-capture2-copy.png

I’m not sure what I’m doing wrong. I’ve tried finding solutions on google, but looking at the UE4 documentation it looks like my syntax is correct. I haven’t found anyone else posting about the same problem either.

Also, I have included the #include “Containers/CircularQueue.h” at the top of my header in case anyone is wondering.

Any help would be much appreciated!

Best Regards

-Sven

However, when I try to compile this code I get the following error:

Because it’s trying to use a copy constructor:

I’m not sure what I’m doing wrong

Try using the available constructor like this:

TCircularQueue<TArray<FVector2D>> InputBufferAxis{64};

This is direct initialization method and will use the correct available constructor.