boostorg / exception

Boost.org exception module
http://boost.org/libs/exception
Boost Software License 1.0
15 stars 46 forks source link

boost/exception/info.hpp: Clang warns over `delete this` on non-final non-virtual #31

Closed Kojoley closed 4 years ago

Kojoley commented 4 years ago
In file included from libs\spirit\classic\test\bug_000008.cpp:51:
In file included from .\boost/thread.hpp:24:
In file included from .\boost/thread/future.hpp:34:
In file included from .\boost/thread/exceptional_ptr.hpp:10:
In file included from .\boost/exception_ptr.hpp:9:
In file included from .\boost/exception/detail/exception_ptr.hpp:15:
.\boost/exception/info.hpp(134,21): error: delete called on non-final 'boost::exception_detail::error_info_container_impl' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-abstract-non-virtual-dtor]
                    delete this;
                    ^
1 warning and 1 error generated.
     "clang-cl.exe" -m64 @"bin.v2\libs\spirit\classic\test\bug_000008.test\clang-win-9.0.1\release\address-model-64\threadapi-win32\threading-multi\bug_000008.obj.rsp" 

Reproducible with b2 toolset=clang-win warnings=on warnings-as-errors=on libs/exception/test

zajo commented 4 years ago

Should be fixed now. Thanks!