Download

cryptic compile error when moving game code from 4.8 to 4.10 on Linux

This compiled fine under 4.8.3. However, it’s having all kinds of problems when trying to compile under 4.10 (master):


void UMyLocalPlayer::ClearPlayerLoginStatusChangedDelegate(FPlayerOnlineStatusChangedDelegate Delegate)
{
	PlayerLoginStatusChangedListeners.Remove(Delegate); <<-------------- compile bombs here
}


The error message is:

/work/unreal/Master/UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/Array.h:1989:67: error: invalid operands to binary expression (‘ElementType’ (aka ‘TBaseDelegate<void, UMyLocalPlayer *, ELoginStatus::Type, const FUniqueNetId &>’) and ‘const ElementType’ (aka ‘const TBaseDelegate<void, UMyLocalPlayer *, ELoginStatus::Type, const FUniqueNetId &>’))
return RemoveAll(&Item](ElementType& Element) { return Element == Item; });
~~~~~~~ ^ ~~~~
/Documents/Unreal Projects/MyGame4.10/Source/MyGameClient/Private/MyLocalPlayer.cpp:1059:36: note: in instantiation of member function ‘TArray<TBaseDelegate<void, UMyLocalPlayer *, ELoginStatus::Type, const FUniqueNetId &>, FDefaultAllocator>::Remove’ requested here
PlayerLoginStatusChangedListeners.Remove(Delegate);

The delegate is declared as follows:

DECLARE_DELEGATE_ThreeParams(FPlayerOnlineStatusChangedDelegate, class UMyLocalPlayer*, ELoginStatus::Type, const FUniqueNetId&);

Any ideas on this?