C++ “促进”;析构函数不是虚拟的;MSVC11中的错误
我试图使用MSVC 11.0编译一个boost 1.57.0程序,但出现以下错误:C++ “促进”;析构函数不是虚拟的;MSVC11中的错误,c++,windows,visual-c++,boost,64-bit,C++,Windows,Visual C++,Boost,64 Bit,我试图使用MSVC 11.0编译一个boost 1.57.0程序,但出现以下错误: z:\d\dev\boost_1_57_0\boost\exception\exception.hpp(171) : error C4265: 'boost::exception_detail::error_info_container' but destructor is not virtual instances of this class may not be destructed correctly 我
z:\d\dev\boost_1_57_0\boost\exception\exception.hpp(171) : error C4265: 'boost::exception_detail::error_info_container' but destructor is not virtual instances of this class may not be destructed correctly
我能做些什么吗
这些帖子似乎没有提供解决方案
- 我以前应该考虑过这一点。该错误是通过
/W4
升级为错误的警告。我通过在include周围包装一个警告禁用来修复它
#pragma warning(push)
#pragma warning(disable : 4265)
#include <boost/...>
#pragma warning(pop)
#pragma警告(推送)
#杂注警告(禁用:4265)
#包括
#布拉格警告(pop)