# MSVC removes hash\_map in 14.51 

**URL:** <https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134>\
**Category:** Pipeline & Plugins\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [June 30, 2026, 10:30pm UTC](https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134 "2026-06-30T22:30:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [June 30, 2026, 10:30pm UTC](https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134/1 "2026-06-30T22:30:17Z")

</div>

MSVC 14.51 removes the long (10 years, apparently) deprecated non-standard extension `hash_map` (see [here](https://developercommunity.microsoft.com/t/11105641), “by design”).

Suggestions:

- Change the USE\_HASHMAP and NO\_STL defines to not be hardcoded.
- Replace hash\_map with unordered\_map.
- Don’t guard the vector include, it’s used several times in the header in unguarded contexts.
- Also it seems like someone just pasted the hold cpp file into the header to avoid a compilation unit. The only reason this isn’t getting multiple definition errors is because the header is only included in one file in the engine. Maybe this is by design.
  - The header also includes itself.

```auto
// Culprit lines: Engine\Source\ThirdParty\nvtesslib\inc\nvtess.h:146

#define USE_HASHMAP 1
#define NO_STL 1

#if USE_HASHMAP
#if PLATFORM_MAC || PLATFORM_LINUX
#include <unordered_map>
#include <vector>
#else
#include <hash_map>
#endif
#else
#include <map>
#endif

```

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [June 30, 2026, 10:30pm UTC](https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134/2 "2026-06-30T22:30:21Z")

</div>

**Steps to Reproduce**

1. Install MSVC with toolset \>=14.51
2. Compile Editor target.
3. Compile failure in `Engine\Source\ThirdParty\nvtesslib\inc\nvtess.h`

Full error:

\> C:\tide\ue5.8\Engine\Source\ThirdParty\nvtesslib\inc\nvtess.h(154,1): fatal error C1083: Cannot open include file: ‘hash\_map’: No such file or directory

Culprit

```auto
// Engine\Source\ThirdParty\nvtesslib\inc\nvtess.h:146

#define USE_HASHMAP 1
#define NO_STL 1

#if USE_HASHMAP
#if PLATFORM_MAC || PLATFORM_LINUX
#include <unordered_map>
#include <vector>
#else
#include <hash_map>
#endif
#else
#include <map>
#endif

```

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [June 30, 2026, 10:59pm UTC](https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134/3 "2026-06-30T22:59:56Z")

</div>

Reasonable work arounds:

- Downgrade to 14.50
- Small source changes here: [UE 5.8 fails to compile with Visual Studio 2026 (hash\_map missing) — Source fix - #2 by Drakgoku](https://forums.unrealengine.com/t/ue%5C-5%5C-8%5C-fails%5C-to%5C-compile%5C-with%5C-visual%5C-studio%5C-2026%5C-hash%5C-map%5C-missing%5C-source%5C-fix/2732357/2)  
[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Svegn2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/svegn2/32/1225280_2.png) [@Svegn2](https://forums.unrealengine.com/u/Svegn2)\
**Post date:** [July 13, 2026, 8:18pm UTC](https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134/4 "2026-07-13T20:18:02Z")

</div>

Hello!

We recommend using the 14.44 (VS2022) or 14.50 (VS2026) toolsets with version 5.8. The information can be sourced from Engine\Config\Windows\Windows\_SDK.json.

UnrealBuildTool will try to use one of the PreferredVisualCppVersions or default to the latest version of the toolchain installed if none are available.

As far as the removal of hash\_map, we have addressed the problem in the main stream (CL54453441) but our hotfix rules are preventing us from updating version 5.8. Going back to 14.50 is the best workaround as this is the toolset that we used during the mastering phase of version 5.8 and will stick to it unless major security issues are uncovered. We do test our code with the newest and beta toolchain but we also have to settle on a widely available version when we enter our release cycles so we often ship a couple of version behind VS’s latest.

I’ll add this note on the forum to clarify the situation with the general public.

Regards,

Martin

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [July 13, 2026, 8:41pm UTC](https://forums.unrealengine.com/t/msvc-removes-hash-map-in-14-51/2743134/5 "2026-07-13T20:41:24Z")

</div>

I’ll check out that CL then, thank you.

[Attachment Removed]
