-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
C4996 warning due to std::reverse_copy on Microsoft platforms #123
Comments
@noloader I don't think
So {1,2,3,4} would still be {1,2,3,4}.
Luckily Microsoft already proposed a fix on MSDN. If you look at the second code sample, in the last line. However, it appears to be the case that GCC (and other compilers) may not support |
Yeah, we should probably split things here (as much as I dislike doing it):
The reason it should be split is because its a Certification and Accreditation (C&A) issue on Windows platforms. That is, compliance requires some users to follow Microsoft's best practices on Windows platforms. There is no wiggle room. Do you feel like making a pull request? Don't worry if we are off-by-one or so on the MSVC compiler version. Most users won't experience it; and we'll be able to tune it later when I test on Windows platforms. Though I cannot test VS2015, I can test back to VC++ 6.0 and Visual Studio .Net. |
How about a plain old
The downside to the code above is each element is touched twice. The first copies it into the |
It looks like checked iterators were introduced in VS2008. I think the test should be:
In the absence of a patch, I'm going to use the MSC guard so that folks enduring an audit won't encounter trouble. |
Also see Commit f45813bd129c1d58. |
I wanted to link this pretty old issue with a new one that arises out of the changes beeing made |
We recently cut-in little-endian Integers. On Microsoft platforms, use of _
std:reverse_copy
_ is causing a C4996 warning:The offending code is:
I think we need to find a Microsoft overload that allows us to specify the destination buffer size. Or we need to use the library's ByteReverse from misc.h:
The text was updated successfully, but these errors were encountered: