Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix windows clang-cl build error #399 #400

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

tetsuh
Copy link
Contributor

@tetsuh tetsuh commented Feb 25, 2024

This PR fixes Windows clang-cl build error: "constexpr variable 'strnlen' must be initialized by a constant expression. "

Unfortunately the strnlen() seems incompatible with constexpr in clang-cl compile.
But in the case of this case, MSVC/clang-cl can use the strnlen_s() function anyway.

This changes should only affects the Windows MSVC/clang-cl build.

descrived in #399

This workaround the build error: constexpr variable 'strnlen' must be initialized by a constant expression.
The reason for the error is that strnlen() seems to be incompatible with constexpr in clang-cl compilation.
@odygrd odygrd linked an issue Mar 14, 2024 that may be closed by this pull request
@odygrd
Copy link
Owner

odygrd commented Mar 14, 2024

Thanks for the PR : )

@odygrd odygrd merged commit 21bd16a into odygrd:master Mar 14, 2024
25 checks passed
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.

build FAIL on Windows VS2022 clang-cl
2 participants