CatDogEngine icon indicating copy to clipboard operation
CatDogEngine copied to clipboard

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

Open roeas opened this issue 2 years ago • 1 comments

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. https://github.com/fmtlib/fmt/issues/3540

But spdlog has not yet updated the format used. https://github.com/gabime/spdlog/issues/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 avatar Dec 04 '23 12:12 roeas

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.

roeas avatar Mar 01 '24 06:03 roeas