with boost-1.58 the error message was
emc/rs274ngc/rs274ngc_pre.cc:133:57: error: use of deleted function ‘void boost::cref(const T&&) [with T = Interp*]’
_setup.pythis = boost::python::object(boost::cref(this));
/usr/include/boost/core/ref.hpp:179:24: error: declared here
template<class T> void cref(T const&&) BOOSTREFDELETE;
Signed-off-by: Bernhard M. Wiedemann bwiedemann@suse.de
评论 (2)
#2 – jepler 于 2015-11-23
Thank you for your patch. I actually committed the patch to linuxcnc 2.6 and merged up to 2.7 and master, so github does not understand that your pull request has been accepted. I also revised the commit message slightly to emphasize that the original code, cref(this), was not appropriate even if boost accepted it.
#1 – bmwiedemann 于 2015-11-23
as I understood C++, “this” is already a pointer or ref to an object and we just make an explicit copy of the pointer here to make boost happy… though I’m not knowledgeable in boost / ref and such.