i have switched boost version , trying recompile code following error:
/boost/core/ref.hpp:179: error: deleted function ‘void boost::cref(const t&&) [with t = const char*]’
it specific line here:
// find file prefix matching system type in systemtype attribute pugi::xml_named_node_iterator xmnifileprefix = std::find_if(xmnrfileprefixes.begin(),xmnrfileprefixes.end(), boost::bind(std::equal_to<std::string>(), boost::bind(pumlinux::functions::obtainattributevalue, _1, boost::cref(pumlinux::configuration::systemtype.c_str())), c_strsystemtype));
anyone know can resolve issue new boost i'm using?
you can not this, boost correct in doing so. taking cref() temporary, cref nothing more fancy wrapping around pointer.
so trying address temporary object returned c_str(), , no-no-no.
however, since seems static, unchanged string systemtype, can away eliminating boost::cref
- pass return value of c_str()
directly. might need change signature of obtainattributevalue
receive pointer.
Comments
Post a Comment