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

[spdlog] Waiting for spdlog to update format to avoid warning C4996 #434

Open
roeas opened this issue Dec 4, 2023 · 1 comment
Open

Comments

@roeas
Copy link
Contributor

roeas commented Dec 4, 2023

VS2022 started marking stdext::checked_array_iterator as "deprecated" sometime between 17.7.6 and 17.8.2 witch makes our compilation fail.

warning C4996: 'stdext::checked_array_iterator<T *>::_Seek_to': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.

Format has fixed this bug.
fmtlib/fmt#3540

But spdlog has not yet updated the format used.
gabime/spdlog#2912

As a temporary solution, we defined _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING to suppress warning C4996.
https://github.com/CatDogEngine/CatDogEngine/pull/433

Should update spdlog and remove _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING in the future.

@roeas
Copy link
Contributor Author

roeas commented Mar 1, 2024

Given that the related issue of spdlog is now closed. It looks like spdlog 1.x is hard to upgrade the bundled fmt, but we can use macro to specify an external fmt.

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

No branches or pull requests

1 participant