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

workaround for the MSVC / Visual Studio bug of its latest version #42

Merged

Conversation

Necktschnagge
Copy link
Owner

The latest Visual Studio version brings compiler warning caused by std library extensions.

Here they say it is a bug released about 4 days ago: microsoft/cpprestsdk#1768 (comment)

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xutility(1277,12): 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. [C:\.....\build\src\Tobor.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xutility(1277,12): warning C4996:         with [C:\....\build\src\Tobor.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xutility(1277,12): warning C4996:         [ [C:\....\build\src\Tobor.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xutility(1277,12): warning C4996:             T=char [C:\....\build\src\Tobor.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xutility(1277,12): warning C4996:         ] [C:\....\build\src\Tobor.vcxproj]

@Necktschnagge Necktschnagge self-assigned this Nov 18, 2023
@Necktschnagge Necktschnagge added bug Something isn't working important Resolve this with priority labels Nov 18, 2023
@Necktschnagge
Copy link
Owner Author

Necktschnagge commented Nov 18, 2023

@r0ost3r please review 😀

@Necktschnagge Necktschnagge merged commit 2715f55 into main Nov 19, 2023
12 checks passed
@Necktschnagge Necktschnagge deleted the fix-workaround-msvc-compiler-warnings-external-bug branch November 19, 2023 15:46
@robert-andrzejuk
Copy link

This is not a bug it's a depracation.
Why silence the warning?
It's better to replace with std:span.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important Resolve this with priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants