Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/152.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ “促进”;析构函数不是虚拟的;MSVC11中的错误_C++_Windows_Visual C++_Boost_64 Bit - Fatal编程技术网

C++ “促进”;析构函数不是虚拟的;MSVC11中的错误

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 我

我试图使用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
我能做些什么吗

这些帖子似乎没有提供解决方案


    • 我以前应该考虑过这一点。该错误是通过
      /W4
      升级为错误的警告。我通过在include周围包装一个警告禁用来修复它

      #pragma warning(push)
      #pragma warning(disable : 4265)
      #include <boost/...>
      #pragma warning(pop)
      
      #pragma警告(推送)
      #杂注警告(禁用:4265)
      #包括
      #布拉格警告(pop)