virtual destructor for SDDSWriter
OPAL does not compile on macOS since !121 (merged).
Error message:
[ 12%] Building CXX object src/CMakeFiles/libOPAL.dir/AbstractObjects/OpalData.cpp.o
cd /Users/gsell/src/OPAL/build-master/src && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DIPPL_DONT_POOL -DIPPL_LINUX -DIPPL_MPI -DIPPL_RESTRICT_BUG -DIPPL_STRINGSTREAM -DIPPL_USE_PARTIAL_SPECIALIZATION -DIPPL_USE_XDIV_RNG -DMPICH_SKIP_MPICXX -DNOCTAssert -DPETE_BITWISE_COPY -Drestrict=__restrict__ -I/Users/gsell/src/OPAL/src/optimizer -I/Users/gsell/src/OPAL/src/ippl/src -I/Users/gsell/src/OPAL/src/src/Classic -I/Users/gsell/src/OPAL/src/src -O3 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -DPARALLEL_IO -Wall -funroll-loops -fstrict-aliasing -Werror -Wsign-compare -Wunused-variable -Warray-bounds -ftemplate-depth=1024 -Wno-overloaded-virtual -fvisibility-inlines-hidden -std=c++11 -o CMakeFiles/libOPAL.dir/AbstractObjects/OpalData.cpp.o -c /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.cpp
In file included from /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.cpp:20:
In file included from /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:644:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2335:5: error: delete called on
non-final 'StatWriter' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2648:7: note: in instantiation of
member function 'std::__1::default_delete<StatWriter>::operator()' requested here
__ptr_.second()(__tmp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2602:19: note: in instantiation of
member function 'std::__1::unique_ptr<StatWriter, std::__1::default_delete<StatWriter> >::reset' requested here
~unique_ptr() { reset(); }
^
/Users/gsell/src/OPAL/src/src/Structure/DataSink.h:122:5: note: in instantiation of member function 'std::__1::unique_ptr<StatWriter,
std::__1::default_delete<StatWriter> >::~unique_ptr' requested here
DataSink(const DataSink &) { }
^
In file included from /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.cpp:20:
In file included from /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:644:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2335:5: error: delete called on
non-final 'SDDSWriter' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2648:7: note: in instantiation of
member function 'std::__1::default_delete<SDDSWriter>::operator()' requested here
__ptr_.second()(__tmp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2602:19: note: in instantiation of
member function 'std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> >::reset' requested here
~unique_ptr() { reset(); }
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:1880:64: note: in instantiation of
member function 'std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> >::~unique_ptr' requested here
_LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:1742:18: note: in instantiation of
member function 'std::__1::allocator<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> > >::destroy' requested
here
{__a.destroy(__p);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:1595:14: note: in instantiation of
function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<SDDSWriter,
std::__1::default_delete<SDDSWriter> > > >::__destroy<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> > >'
requested here
{__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:421:25: note: in instantiation of
function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<SDDSWriter,
std::__1::default_delete<SDDSWriter> > > >::destroy<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> > >'
requested here
__alloc_traits::destroy(__alloc(), _VSTD::__to_raw_pointer(--__soon_to_be_end));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:364:29: note: in instantiation of
member function 'std::__1::__vector_base<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> >,
std::__1::allocator<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> > > >::__destruct_at_end' requested here
void clear() _NOEXCEPT {__destruct_at_end(__begin_);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:458:9: note: in instantiation of
member function 'std::__1::__vector_base<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> >,
std::__1::allocator<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> > > >::clear' requested here
clear();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:1427:74: note: in instantiation
of member function 'std::__1::__vector_base<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> >,
std::__1::allocator<std::__1::unique_ptr<SDDSWriter, std::__1::default_delete<SDDSWriter> > > >::~__vector_base' requested here
template <class _Tp, class _Alloc> friend class _LIBCPP_TEMPLATE_VIS vector;
^
In file included from /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.cpp:20:
In file included from /Users/gsell/src/OPAL/src/src/AbstractObjects/OpalData.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:644:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2335:5: error: delete called on
non-final 'MultiBunchDump' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
delete __ptr;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2648:7: note: in instantiation of
member function 'std::__1::default_delete<MultiBunchDump>::operator()' requested here
__ptr_.second()(__tmp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2602:19: note: in instantiation of
member function 'std::__1::unique_ptr<MultiBunchDump, std::__1::default_delete<MultiBunchDump> >::reset' requested here
~unique_ptr() { reset(); }
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:1747:23: note: in instantiation of
member function 'std::__1::unique_ptr<MultiBunchDump, std::__1::default_delete<MultiBunchDump> >::~unique_ptr' requested here
__p->~_Tp();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:1595:14: note: in instantiation of
function template specialization
'std::__1::allocator_traits<std::__1::allocator<std::__1::__list_node<std::__1::unique_ptr<MultiBunchDump,
std::__1::default_delete<MultiBunchDump> >, void *> > >::__destroy<std::__1::unique_ptr<MultiBunchDump,
std::__1::default_delete<MultiBunchDump> > >' requested here
{__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/list:756:34: note: in instantiation of
function template specialization
'std::__1::allocator_traits<std::__1::allocator<std::__1::__list_node<std::__1::unique_ptr<MultiBunchDump,
std::__1::default_delete<MultiBunchDump> >, void *> > >::destroy<std::__1::unique_ptr<MultiBunchDump,
std::__1::default_delete<MultiBunchDump> > >' requested here
__node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/list:735:3: note: in instantiation of
member function 'std::__1::__list_imp<std::__1::unique_ptr<MultiBunchDump, std::__1::default_delete<MultiBunchDump> >,
std::__1::allocator<std::__1::unique_ptr<MultiBunchDump, std::__1::default_delete<MultiBunchDump> > > >::clear' requested here
clear();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/list:302:41: note: in instantiation of
member function 'std::__1::__list_imp<std::__1::unique_ptr<MultiBunchDump, std::__1::default_delete<MultiBunchDump> >,
std::__1::allocator<std::__1::unique_ptr<MultiBunchDump, std::__1::default_delete<MultiBunchDump> > > >::~__list_imp' requested here
template<class, class> friend class list;
^
3 errors generated.
make[2]: *** [src/CMakeFiles/libOPAL.dir/AbstractObjects/OpalData.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/libOPAL.dir/all] Error 2
make: *** [all] Error 2
Nimloth:~/src/OPAL/build-master$