Skip to content

Fix CI: disable MSVC warning C5285 for the vendored doctest - #5577

Merged
nlohmann merged 1 commit into
developfrom
fix/msvc-c5285-doctest
Sep 25, 2026
Merged

nlohmann merged 1 commit into
developfrom
fix/msvc-c5285-doctest

Conversation

@nlohmann

Copy link
Copy Markdown
Owner

The windows-11-arm runner now ships MSVC 19.51 (VS 2026). That compiler reports doctest's forward declaration of std::tuple as a new warning:

tests\thirdparty\doctest\doctest.h(539,7): warning C5285: cannot declare a specialization for 'std::tuple':
Specializing this standard library template is forbidden by N5014 [tuple.tuple.general]/1

/WX turns this into an error, so msvc-arm64 fails on develop (run 36104393129) and on every open pull request. #5575 fixed the generator name but not this warning.

This PR disables C5285 for the test targets in tests/CMakeLists.txt, next to the other MSVC warnings disabled there. The vendored doctest.h is unchanged.

Breaking changes

None. The change only affects warning flags for the unit tests; the library and its public API are untouched.

🤖 Generated with Claude Code

The windows-11-arm runner now ships MSVC 19.51, which reports doctest's
forward declaration of std::tuple as C5285 ("cannot declare a
specialization for 'std::tuple'"). With /WX this breaks the msvc-arm64
job on develop and on every open pull request. Disable the warning for
the test targets, like the other MSVC warnings already disabled there.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
@nlohmann nlohmann added this to the Release 3.13.0 milestone Sep 25, 2026
@nlohmann
nlohmann merged commit 98278dc into develop Sep 25, 2026
2 of 160 checks passed
@nlohmann
nlohmann deleted the fix/msvc-c5285-doctest branch September 25, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant