The problem is that here:
PointPorcessor processor = PointProcessor(x, y, z);
You are creating processor
by copy-initialization, where a temporary of type PointProcessor
is default-constructed first, and then processor
is copy-constructed or move-constructed from that temporary.
However, boost::mutex
is non-copyable and non-moveable (provided move semantics is supported at all in the version of Boost you are using), which explains why copy-initialization of processor
is illegal.
You should rather construct your object through direct-initialization, this way:
PointProcessor processor(x, y, z);