mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
clang -Wnon-virtual-dtor compatibility (#2626)
* Adding missing virtual destructors, to silence clang -Wnon-virtual-dtor warnings. Tested with clang version 9.0.1-12 under an Ubuntu-like OS. Originally discovered in the Google-internal environment. * adding -Wnon-virtual-dtor for GNU|Intel|Clang
This commit is contained in:
committed by
GitHub
parent
f2e799863b
commit
8290a5a0da
@@ -117,7 +117,11 @@ TEST_SUBMODULE(callbacks, m) {
|
||||
}
|
||||
});
|
||||
|
||||
class AbstractBase { public: virtual unsigned int func() = 0; };
|
||||
class AbstractBase {
|
||||
public:
|
||||
virtual ~AbstractBase() = default;
|
||||
virtual unsigned int func() = 0;
|
||||
};
|
||||
m.def("func_accepting_func_accepting_base", [](std::function<double(AbstractBase&)>) { });
|
||||
|
||||
struct MovableObject {
|
||||
|
||||
Reference in New Issue
Block a user