build issue on gcc-13
Hi! I am fixing some FTBFS about Debian's gcc-13 issue. The yade package has the issue:
In file included from /<<PKGBUILDDIR>>/postprocessing/vtk/VTKRecorder.cpp:27:
/<<PKGBUILDDIR>>/core/Subdomain.hpp: In member function ‘yade::Vector3r yade::Subdomain::centerOfMass() const’:
/<<PKGBUILDDIR>>/core/Subdomain.hpp:322:49: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
322 | const shared_ptr<Body>& b = Body::byId(ids[k], scene);
| ^
/<<PKGBUILDDIR>>/core/Subdomain.hpp:322:63: note: the temporary was destroyed at the end of the full expression ‘yade::Body::byId(((__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)((const yade::Subdomain*)this)->yade::Subdomain::ids.std::vector<int, std::allocator<int> >::operator[](((std::vector<int, std::allocator<int> >::size_type)k))), boost::shared_ptr<yade::Scene>((* & scene)))’
322 | const shared_ptr<Body>& b = Body::byId(ids[k], scene);
| ~~~~~~~~~~^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[4]: *** [CMakeFiles/post_vtk.dir/build.make:79: CMakeFiles/post_vtk.dir/postprocessing/vtk/VTKRecorder.cpp.o] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/debian/build-double'
make[3]: *** [CMakeFiles/Makefile2:557: CMakeFiles/post_vtk.dir/all] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build-double'
The buildd log is here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037905
I do not think to disable the dangling-reference options is a wise choose, but I do not know how to fix it, could you have a look?