On Xenial, while building code using boost thread like in https://github.com/shadow-robot/sr_core/blob/indigo-devel/sr_utilities/include/sr_utilities/thread_safe_map.hpp
I encountered this bug
https://svn.boost.org/trac/boost/ticket/12371
{{{
In file included from /usr/include/boost/thread.hpp:24:0,
from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot/sr_core/sr_utilities/include/sr_utilities/thread_safe_map.hpp:32,
from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot_ethercat/sr_robot_lib/include/sr_robot_lib/sr_joint_motor.hpp:34,
from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot_ethercat/sr_tactile_sensor_controller/include/sr_tactile_sensor_controller/sr_tactile_calibration.hpp:13,
from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot_ethercat/sr_tactile_sensor_controller/src/sr_tactile_calibration.cpp:10:
/usr/include/boost/thread/future.hpp: In member function ‘void boost::detail::future_async_shared_state<Rp, Fp>::init(const Fp&)’:
/usr/include/boost/thread/future.hpp:788:32: error: expected primary-expression before ‘(’ token
this->thr_ = thread(&future_async_shared_state::run, that, boost::forward<Fp>(f));
^
/usr/include/boost/thread/future.hpp: In member function ‘void boost::detail::future_async_shared_state<void, Fp>::init(const Fp&)’:
/usr/include/boost/thread/future.hpp:810:32: error: expected primary-expression before ‘(’ token
this->thr_ = thread(&future_async_shared_state::run, this->shared_from_this(), boost::move(f));
^
/usr/include/boost/thread/future.hpp: In member function ‘void boost::detail::future_async_shared_state<Rp&, Fp>::init(const Fp&)’:
/usr/include/boost/thread/future.hpp:833:32: error: expected primary-expression before ‘(’ token
this->thr_ = thread(&future_async_shared_state::run, this->shared_from_this(), boost::move(f));
^
}}}
applying a similar patch to Ticket#12371 on 1.58 fixes the issue.
Might be a very specific use-case, but would be nice to backport this fix on LTS.
thanks
The attachment "add namespace to thread() calls" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]