View Issue Details

IDProjectCategoryView StatusLast Update
0002607NoesisGUIUnrealpublic2023-05-23 12:24
ReporterBrynn Assigned Tohcpizzi  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.2.1 
Target Version3.2.2Fixed in Version3.2.2 
Summary0002607: Noesis::Ptr types not supported as a Key value for TMap in Unreal 5.2
DescriptionDeclaring a TMap in Unreal using a Noesis::Ptr as the key:
TMap<Ptr<UIElement>, FNoesisUIChild> Children;

No longer works in Unreal 5.2.

This is because Unreal have removed the following code from TypeHash.h in 5.2:
inline uint32 GetTypeHash( const void* A )
{
    return PointerHash(A);
}

inline uint32 GetTypeHash( void* A )
{
    return PointerHash(A);
}

So now when you compile you get the error:
C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Core\Public\Containers\Map.h(117): error C2665: 'GetTypeHash': none of the 5 overloads could convert all the argument types

A temporary workaround for this is to include the old code from 5.1 as a free function.
Steps To ReproduceIn Unreal 5.2, declare a TMap property like below and try to compile the solution:
TMap<Ptr<UIElement>, FNoesisUIChild> Children;
TagsNo tags attached.
PlatformAny

Activities

hcpizzi

hcpizzi

2023-05-23 12:24

developer   ~0008502

We've added the following function in NoesisSupport.h:

template<typename T>
inline uint32 GetTypeHash(const Noesis::Ptr<T>& Pointer)
{
    return PointerHash(Pointer.GetPtr());
}

Issue History

Date Modified Username Field Change
2023-05-22 21:36 Brynn New Issue
2023-05-23 11:06 sfernandez Assigned To => hcpizzi
2023-05-23 11:06 sfernandez Status new => assigned
2023-05-23 11:06 sfernandez Target Version => 3.2.2
2023-05-23 12:24 hcpizzi Status assigned => resolved
2023-05-23 12:24 hcpizzi Resolution open => fixed
2023-05-23 12:24 hcpizzi Fixed in Version => 3.2.2
2023-05-23 12:24 hcpizzi Note Added: 0008502