From 49d467097e3cd16b5d01eee75a0bcfae43e8715b Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Fri, 20 Nov 2015 19:12:07 +0100 Subject: [PATCH] fix rs274ngc_pre with new boost+gcc 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&&) BOOST_REF_DELETE; Signed-off-by: Bernhard M. Wiedemann --- src/emc/rs274ngc/rs274ngc_pre.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emc/rs274ngc/rs274ngc_pre.cc b/src/emc/rs274ngc/rs274ngc_pre.cc index 42ad92d..74f0fd1 100644 --- a/src/emc/rs274ngc/rs274ngc_pre.cc +++ b/src/emc/rs274ngc/rs274ngc_pre.cc @@ -130,7 +130,8 @@ Interp::Interp() // since interp.init() may be called repeatedly this would create a new // wrapper instance on every init(), abandoning the old one and all user attributes // tacked onto it, so make sure this is done exactly once - _setup.pythis = boost::python::object(boost::cref(this)); + Interp *t=this; + _setup.pythis = boost::python::object(boost::cref(t)); // alias to 'interpreter.this' for the sake of ';py, .... ' comments // besides 'this', eventually use proper instance names to handle -- 2.6.2