2011年3月23日 星期三

warning C4996: _Is_checked? No I don't.

如果我們在VS2010用非STL的container來使用某些STL algorithm時很容易得到傳說中的warning C4996。

warning C4996: 'std::_Merge1': Function call 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'

除了關掉4996的warning訊息外。可對cl編譯器指定/D_SCL_SECURE_NO_WARNINGS,煩人的警告訊息OUT

沒有留言:

張貼留言