Boost C++ Libraries: Ticket #13227: exception.hpp : disable false warning C4265 given by Visual Studio https://svn.boost.org/trac10/ticket/13227 <p> Hi, </p> <p> MSVC falsely report a missing virtual destructor inside exception.hpp Would it be possible to add a "pragma warning (disable:4265)" in this file ? This will *not* happen with the default settings of Visual Studio : it happens when trying to raise the warning level (/we4265 : treat "misssing virtual destructor" as an error) </p> <p> Steps to reproduce the problem : </p> <ul><li>Compile the following program: <pre class="wiki"> #include &lt;string&gt; #include &lt;iostream&gt; #include &lt;boost/optional/optional.hpp&gt; int main(int argc, char **argv) { boost::optional&lt;std::string&gt; name; if (argc &gt; 1) name.reset(argv[1]); if (name.is_initialized()) std::cout &lt;&lt; "Hello, " &lt;&lt; name.get() &lt;&lt; "\n"; else std::cout &lt;&lt; "Hello, world \n"; return 0; } </pre></li></ul><ul><li>With the following command line : <pre class="wiki"> cl hello.cpp /Iboost_1_64_0 /EHa /W3 /we4265 </pre></li></ul><p> outputs </p> <pre class="wiki"> c:\tmp&gt;cl hello.cpp /Iboost_1_64_0 /EHa /W3 /we4265 Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved. hello.cpp boost_1_64_0\boost/exception/exception.hpp(176): error C4265: 'boost::exception_detail::error_info_container': class has virtual functions, but destructor is not virtual instances of this class may not be destructed correctly </pre><p> For more details, please also refer to <a class="ext-link" href="https://github.com/ivsgroup/boost_warnings_minimal_demo"><span class="icon">​</span>https://github.com/ivsgroup/boost_warnings_minimal_demo</a> </p> <p> The problem occurs with boost 1.64 and 1.62. </p> <p> Thanks &amp; regards ! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13227 Trac 1.4.3