> [Visual Studio 2026 May
> Update](https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes#may-update-1860)
> (see C++ > MSVC Build Tools 14.51 > Standard Library (STL) > Other notable
> changes) removed support for some old, deprecated and non-standard STL
> extensions, including `hash_map` and `hash_set`. Both of these were used in
> `GlassClipboard`'s Windows part. Because of this change, JavaFX does not
> build under Visual Studio 2026 18.6 and later.
>
> This commit replaces deprecated `hash_map` and `hash_set` with STL-equvalent
> `unordered_map` and `unordered_set`. `GlassClipboard` also used (also
> deprecated) `hash_value` template function to calculate hashes for
> non-standard WinAPI object `_bstr_t` and `FORMATETC` ~~(the latter was
> implicitly generated by the extension)~~. Those were also replaced with
> STL-endorsed `std::hash` specializations. No other changes were necessary.
>
> All tests on Windows 11 pass successfully after this change and manual
> testing showed no regressions.
>
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK
> Interim AI Policy](https://openjdk.org/legal/ai).
Lukasz Kostyra has updated the pull request incrementally with one additional
commit since the last revision:
Restore old FORMATETC hash implementation
It was somewhere else in the file and I missed it when rewriting the
file to std::unordered_{map,set}.
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/2198/files
- new: https://git.openjdk.org/jfx/pull/2198/files/a6239ae1..9d7d1183
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=2198&range=01
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=2198&range=00-01
Stats: 29 lines in 1 file changed: 4 ins; 14 del; 11 mod
Patch: https://git.openjdk.org/jfx/pull/2198.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/2198/head:pull/2198
PR: https://git.openjdk.org/jfx/pull/2198