How do I put TQueue in a TArray container?

TArray <TQueue > test;
TQueue tempQueue;
tempQueue.Enqueue(1);
test.Add(tempQueue);

Severity Code Description Project File Line Suppression State
Error C2280 ‘TQueue<int,EQueueMode::Spsc>::TQueue(const TQueue<int,EQueueMode::Spsc> &)’: attempting to reference a deleted function ITMSProject C:\Program Files\UE_4.27\Engine\Source\Runtime\Core\Public\Containers\Array.h 1959
Error C2248 ‘TQueue<int,EQueueMode::Spsc>::TQueue’: cannot access private member declared in class ‘TQueue<int,EQueueMode::Spsc>’ ITMSProject C:\Program Files\UE_4.27\Engine\Source\Runtime\Core\Public\Containers\Array.h 1959

TQueue is non-copyable, so you can’t I don’t think:

 TQueue::TQueue(const TQueue&) = delete;

You could use std::vector<std::unique_ptr<TQueue>> instead. I’m not sure if TArray<std::unique_ptr> works, or what the std::unique_ptr equivalent is in unreal.

TSharedPtr<TQueue > * I can put it in the smart pointer

    TArray<TSharedPtr<TQueue<int>>> test;
    TSharedPtr<TQueue<int>> tempQueue(new TQueue<int>());
  
    if (tempQueue.IsValid())
    {
        tempQueue.Get()->Enqueue(1);
    }

    test.Add(tempQueue);

Try that.