Author
anonymous
almost 8 years ago
Language
Compiler
Options
Author
anonymous
almost 8 years ago
$ In file included from prog.cc:1:
/opt/wandbox/clang-head/include/c++/v1/memory:2321:5: warning: delete called on non-final 'WidgetImpl' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
delete __ptr;
^
/opt/wandbox/clang-head/include/c++/v1/memory:2634:7: note: in instantiation of member function 'std::__1::default_delete<WidgetImpl>::operator()' requested here
__ptr_.second()(__tmp);
^
/opt/wandbox/clang-head/include/c++/v1/memory:2588:19: note: in instantiation of member function 'std::__1::unique_ptr<WidgetImpl, std::__1::default_delete<WidgetImpl> >::reset' requested here
~unique_ptr() { reset(); }
^
prog.cc:18:12: note: in instantiation of member function 'std::__1::unique_ptr<WidgetImpl, std::__1::default_delete<WidgetImpl> >::~unique_ptr' requested here
return std::make_unique<WidgetImpl>();
^
In file included from prog.cc:1:
/opt/wandbox/clang-head/include/c++/v1/memory:2321:5: warning: delete called on non-final 'Widget' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
delete __ptr;
^
/opt/wandbox/clang-head/include/c++/v1/memory:2634:7: note: in instantiation of member function 'std::__1::default_delete<Widget>::operator()' requested here
__ptr_.second()(__tmp);
^
/opt/wandbox/clang-head/include/c++/v1/memory:2588:19: note: in instantiation of member function 'std::__1::unique_ptr<Widget, std::__1::default_delete<Widget> >::reset' requested here
~unique_ptr() { reset(); }
^
prog.cc:23:14: note: in instantiation of member function 'std::__1::unique_ptr<Widget, std::__1::default_delete<Widget> >::~unique_ptr' requested here
auto p = make_widget();
^
2 warnings generated.
Widget
WidgetImpl
~Widget
Exit Code:
0