No value will be returned by reference

While binding event to delegate broadcast call happening in code, I get the following error:

I think it has to do with the fact I’m returning an array, (saw fixed bugs talking about a NOTE message - not an error)
FoundSessions struct:

// Session result struct
USTRUCT(BlueprintType)
struct FRedIronSessionResult
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ServerName;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		int32 Ping;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		int32 MaxNumberOfPlayers;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		int32 CurrentNumberOfPlayers;

	FRedIronSessionResult() {}
};

The delegate declaration

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FFindSessionSuccessDelegateCall, bool, bIsSuccess, TArray<FRedIronSessionResult>, FoundSessions);

The binding inside my class (under public:)

	UPROPERTY(BlueprintAssignable, Category = "Sessions|Delegates")
		FFindSessionSuccessDelegateCall OnFindSessionDone;

The broadcast: (from inside one of the .cpp function)

TArray<FRedIronSessionResult> SessionResults;
OnFindSessionDone.Broadcast(false, SessionResults);

What have i done wrong?
Thanks

—edit—
Done some more checking - this is happening with every TArray I try to broadcast, not just my struct.
Is that a bug or am I using it wrong?

Are you dragging off the “Event” pin from your “OnFindSessionDone” event and typing “Custom event” to create your custom event with matching signature?

Yes I am dragging from the “Event” pin

I’ve solved this by using a wrapper to wrap the array, it looks like a bug.

Marking it as solved, yet, no real reason has been given.

I’ve been getting this in 4.21.2, it was resolved quite some time ago but has reared its head again.

Declare the delegate like this:

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FFindSessionSuccessDelegateCall, bool, bIsSuccess, const TArray<FRedIronSessionResult>&, FoundSessions);

This is the right answer