[LinuxCNC/linuxcnc PR#20] fix rs274ngc_pre compilation with new boost+gcc

未分类 bolang 4个月前 (10-15) 26次浏览

Issue #20 | 状态: 已关闭 | 作者: bmwiedemann | 创建时间: 2015-11-23


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)

#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.


#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.


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/20

喜欢 (0)