Boost logo

Boost Users :

Subject: Re: [Boost-users] compiler error on using threads with boost
From: Iskandar Prins (iprins_at_[hidden])
Date: 2010-03-29 10:03:32


I get this error when I do the following. I haven't used any of the lock so far

#include "boost/thread.hpp"

int main(){
                return 0;
}

From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Ovanes Markarian
Sent: Monday, March 29, 2010 15:55
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] compiler error on using threads with boost

Additionally, you can move the unique_lock to transfer the ownership.

Regards,
Ovanes

On Mon, Mar 29, 2010 at 3:46 PM, Ovanes Markarian <om_boost_at_[hidden]<mailto:om_boost_at_[hidden]>> wrote:

On Mon, Mar 29, 2010 at 3:38 PM, Iskandar Prins <iprins_at_[hidden]<mailto:iprins_at_[hidden]>> 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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net