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

MSVC new version, warning MSVC(C4996). #2987

Closed
rokgm opened this issue Jan 22, 2024 · 4 comments
Closed

MSVC new version, warning MSVC(C4996). #2987

rokgm opened this issue Jan 22, 2024 · 4 comments

Comments

@rokgm
Copy link

rokgm commented Jan 22, 2024

I am statically linking spdlog to my project. After updating MSVC (14.38.33130) , I get a warning when I include:

#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>

Warning only occurs when building in debug.

Warning:
'stdext::checked_array_iterator<T*>': 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. MSVC(C4996)

Warning is in format.h:
image

@tt4g
Copy link
Contributor

tt4g commented Jan 22, 2024

include/spdlog/fmt/bundled/format.h is copied from fmt library,
Please reopen this issue in fmt repository.

@Sonnexo
Copy link

Sonnexo commented Jan 23, 2024

fmt has solved the issue six month ago:
fmtlib/fmt#3540

@gabime
Copy link
Owner

gabime commented Jan 23, 2024

Use newest fmt version to fix this.

@NouberNou
Copy link

Is there a plan to update the bundled fmtlib to fix this issue?

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

5 participants