Visual Studio 2012 c++编译Boost Signal2错误
Visual Studio 2012 C++ compile error with Boost Signal2
我使用Visual Studio 2012 Ultimate与以下Boost Signals2代码:在https://github.com/cfobel/boostrongignals2/blob/master/hello_world_0.cpp它会生成以下错误:
c:program files (x86)microsoft visual studio 11.0vcincludexmemory(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.0vcincludexmemory(333) : see declaration of 'std::_Uninitialized_copy0'
1> c:librariesboost_1_52_0boostsignals2detailauto_buffer.hpp(192) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<I,boost::variant<T0_,T1>*>(_InIt,_InIt,_FwdIt)' being compiled
这个代码不兼容Visual Studio 2012 c++吗?它仍然可以安全使用吗?最后,我如何按照建议进行更改?由于
C4996是关于使用已标记为已弃用的函数的警告。既然您将其视为错误,也许您启用了Treat Warning as Error (/WX)
选项?
禁用此选项的方法在错误消息本身中有描述。将_SCL_SECURE_NO_WARNINGS
符号添加到项目的预处理器定义中
相关文章:
- 理解boost::asio-async_read在无需读取内容时的行为
- boost::进程间消息队列引发错误
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- cmake如何在fedora工作站中找到boost静态库包
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- Boost Graph Library,修复节点大小
- 什么是"#include <boost/functional/hash.hpp> "?
- 基于boost的程序的静态链接——zlib问题
- C++:如何在CLion IDE中安装Boost
- C++Boost Asio Pool线程,带有lambda函数和传递引用变量
- 如何在boost beast http请求中设置http头
- Boost Spirit,获取迭代器内部语义动作
- boost::asio::steady_timer()与sleep()我应该使用哪一个
- boost::asio如何生成多个协同程序,然后加入它们
- 当我尝试使用 sstream 和分面将 Boost Time_duration转换为字符串时,我没有得到所需的格式
- Visual Studio(或任何其他工具)能否将地址解释为调用堆栈(boost上下文)的开头
- 如何在boost :: signal2中比较slot_type
- 如何将 boost::signal2::signal 连接到纯虚函数
- 继承层次结构中的特定类作为boost::signal2回调中的类型
- Visual Studio 2012 c++编译Boost Signal2错误