I get the error when I only do:

 

#include <boost/thread.hpp>

 

 

From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian
Sent: Monday, March 29, 2010 15:47
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] compiler error on using threads with boost

 

 

On Mon, Mar 29, 2010 at 3:38 PM, Iskandar Prins <iprins@alphabay.nl> wrote:

Hi,

 

I get this compiler error :

boost/thread/future.hpp", line 414: Error: Formal argument other of type boost::unique_lock<boost::mutex> in call to boost::unique_lock<boost::mutex>::operator=(boost::unique_lock<boost::mutex>) has an inaccessible copy constructor.

 

Any idea why this is? I'm using the sun compiler to compile it with

Because unique_lock cannot be copied. Either pass it as reference or use shared_lock.

 

 

Regards,

Ovanes