相关疑难解决方法(0)

Visual Studio警告C4996

我收到了以下警告

warning C4996: 'std::_Uninitialized_copy0': 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' c:\program files\microsoft visual studio 10.0\vc\include\memory 348

我似乎无法找到任何有助于打击此警告的信息.通过查看输出,这个警告似乎与Boost.Signals2和auto_buffer有关.

这样可以安全忽略,还是可以以某种方式将其删除?

c++ warnings

34
推荐指数
1
解决办法
3万
查看次数

Visual Studio 2012 C++使用Boost Signal2编译错误

我正在使用带有以下Boost Signals2代码的Visual Studio 2012 Ultimate:https://github.com/cfobel/boost_signals2/blob/master/hello_world_0.cpp 它会生成以下错误:

c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory(348): error C4996: 'std::_Uninitialized_copy0': 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'
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory(333) : see declaration of 'std::_Uninitialized_copy0'
1>          c:\libraries\boost_1_52_0\boost\signals2\detail\auto_buffer.hpp(192) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<I,boost::variant<T0_,T1>*>(_InIt,_InIt,_FwdIt)' …
Run Code Online (Sandbox Code Playgroud)

c++ boost visual-studio boost-signals2

10
推荐指数
1
解决办法
4056
查看次数

标签 统计

c++ ×2

boost ×1

boost-signals2 ×1

visual-studio ×1

warnings ×1