Visual Studio 2015 Community Edition gives the following error when compiling in debug, but not when compiling in release:
std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
I was able to trace back the source of this error to lines 214 and 242 of this third party library I'm using to write bitmap images. I don't fully understand what is going on in these parts, so I'd rather not mess with it.
I'm trying to disable this error, but Visual Studio won't let me. I've tried the following solutions that were suggested in the documentation, on StackOverflow, or elsewhere:
4996
to the "Disable Specific Warnings" field in Project Settings > Configuration Properties > C/C++ > Advanced./wd4996
to the "Command Arguments" field in Project Settings > Configuration Properties > Debugging.#pragma warning (disable : 4996)
at the top of the offending file, and/or above the offending function._SCL_SECURE_NO_WARNINGS
, _SCL_NONSTDC_NO_WARNINGS
, _SCL_OBSOLETE_NO_WARNINGS
, _SCL_SECURE_NO_WARNINGS_GLOBAL
, and combinations thereof to the "Preprocessor Definitions" field in Project Settings > Configuration Properties > C/C++ > Preprocessor.#define
directive to the top of the offending file./D
or with -D
to the "Command Arguments" field.But none of this fixes the issue for me.
What could possibly be the reason for Visual Studio to keep insisting on displaying this error?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With