-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
stdext::checked_array_iterator compilation error with VS 2022 17.8 Preview 2 #1768
Comments
I'd like to copy the definition of |
This is now a problem in VS2022 17.8.0 which was released today. |
Is there a path forward to getting this fix merged? If not, would a patch to silence the warning be welcomed in the vcpkg portfile for cpprestsdk? A number of projects I've worked on consume cpprestsdk from vcpkg. They treat warnings as errors and have had to silence the deprecation warning with the new compiler update. |
For what it's worth, this is still an issue for us, and our current work around (for the poor souls unfortunate enough to have upgraded VS 2022 early), is to replace this (line 404 in containerstream.h):
To this:
Remember to add |
Hey @OliverGlandberger , i have issue : Build failed with message C:\Users\ssing\Documents\Mobile_faciligo\facilgo-sales-app\node_modules.fmt\fmt-8.0.0\include\fmt\format.h(341,51): error C4996: '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. [C:\Users\ssing\Documents\Mobile_faciligo\facilgo-sales-app\node_modules\react-native-windows\fmt\fmt.vcxproj]. Check your build configuration. is there any solution for this? |
same happen with vs2022 17.8.3 |
Hey @OliverGlandberger , where is containerstream.h located? In my project, this file does not exist in Android. |
We are facing the same issue. A solution other than having to ignore the warning would be required. |
ChatGPT response for how to apply Using Property Sheets in Visual Studio is a good way to apply settings like preprocessor definitions across multiple projects. Here's a step-by-step guide on how to create and apply a Property Sheet for the Creating a Property Sheet
Applying the Property Sheet to Other Projects
Notes
This approach centralizes certain settings, making them easier to manage across multiple projects. It's especially useful in larger solutions with many projects. |
Thanks @joshuayoes but this does not work..... when you open property manager, it says that there are no c/c++ projects and does not list my project in the property manager window so I can't click on it and add a property sheet. I believe this is because my project is react-native/javascript. Any ideas? |
17.8.6 |
Reproduced in 17.9.1 |
Same stuff in 17.9.6 |
It is not an isolated problem. It is a breaking change to many libs that have used the now "non-standard" code construct. In my case, it is in header files that I don't own. I can fix the header but it is unreliable because other services use the same header in its previous. Further when I apply the workaround to silence the error, that error does in fact disappear to only lead to downstream errors related to the implementations of the template function that implements the non-standard code. See format.h. |
Still an issue. Just another one on top of 2+ year old workarounds to get SignalR C++ to work properly 😐 |
With the latest Visual Studio 2022 Preview,
stdext::checked_array_iterator
has been deprecated. This results in compile errors like the following when including cpprestsdk's containerstream.h header:The text was updated successfully, but these errors were encountered: