Skip to content

Include Misc/UEOps.h in SetUtilities.h (fixes clang build of TedsVersePathRegistry on Linux)

Section titled “Include Misc/UEOps.h in SetUtilities.h (fixes clang build of TedsVersePathRegistry on Linux)”

PR OPENED 25 Nov 2026: https://github.com/EpicGames/UnrealEngine/pull/15457 (visible only to GitHub accounts linked to an Epic Games account). Target: EpicGames/UnrealEngine, base ue6-main (0c2cc988, 25 Nov 2026)

Branch: fix/setutilities-include-ueops on our fork of EpicGames/UnrealEngine, commit fee033450 (local ref pr/setutilities-ueops)

DefaultKeyFuncs::Matches in SetUtilities.h compares keys with ==, but the header does not include Misc/UEOps.h. For a key type that gets its equality operator from the UEOps templates (via UEOpEquals) and lives in a namespace, the operator is only found if UEOps.h happens to be included before SetUtilities.h. With clang, two-phase lookup does not see a global operator declared after the template definition, and argument-dependent lookup does not search the global namespace for a namespaced type.

This breaks the Linux editor build (Build.sh UnrealEditor Linux Development) in one translation unit:

Engine/Source/Runtime/Core/Public/Containers/SetUtilities.h:69:12: error: call to function 'operator==' that is neither visible in the template definition nor found by argument-dependent lookup
note: 'operator==' should be declared prior to the call site or in namespace 'UE::VersePathRegistry'

The call comes from TedsVersePathSyncImpl.cpp:418 (FunctionHandles.Add(Handle) on a TSet<UE::VersePathRegistry::FPathHandle>). In that TU’s shared PCH chain (CoreSharedPCH → AsyncWork → Compression → Map → Set → ScriptSparseSet → SetUtilities), SetUtilities.h is reached before UEOps.h. We only tested Linux; MSVC is more permissive with this lookup, which may be why it has gone unnoticed. Any namespaced UEOps type used as a TSet/TMap key can hit it depending on include order.

The fix includes Misc/UEOps.h in SetUtilities.h, as Array.h, ArrayView.h, IndirectArray.h, StringView.h and SharedString.h already do.

  • Linux x86_64, toolchain from Setup.sh (v27_clang-23.1.5-rockylinux8), commit 61e2877e: without the change, UnrealEditor Linux Development fails with the error above (9162 of 9170 actions succeed). With it, the build completes with 0 errors, and ShaderCompileWorker builds too.
  • At ue6-main 0c2cc988 (this PR’s base), SetUtilities.h and the TedsVersePathSyncImpl.cpp call site are unchanged from 61e2877e. The full build was not repeated at 0c2cc988.