compiler error on using threads with boost
Hi, I get this compiler error : boost/thread/future.hpp", line 414: Error: Formal argument other of type boost::unique_lockboost::mutex in call to boost::unique_lockboost::mutex::operator=(boost::unique_lockboost::mutex) has an inaccessible copy constructor. Any idea why this is? I'm using the sun compiler to compile it with Regards, iskandar
On Mon, Mar 29, 2010 at 3:38 PM, Iskandar Prins
Hi,
I get this compiler error :
boost/thread/future.hpp", line 414: Error: Formal argument other of type boost::unique_lockboost::mutex in call to boost::unique_lockboost::mutex::operator=(boost::unique_lockboost::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
I get the error when I only do:
#include
Additionally, you can move the unique_lock to transfer the ownership.
Regards,
Ovanes
On Mon, Mar 29, 2010 at 3:46 PM, Ovanes Markarian
On Mon, Mar 29, 2010 at 3:38 PM, Iskandar Prins
wrote: Hi,
I get this compiler error :
boost/thread/future.hpp", line 414: Error: Formal argument other of type boost::unique_lockboost::mutex in call to boost::unique_lockboost::mutex::operator=(boost::unique_lockboost::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
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@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian
Sent: Monday, March 29, 2010 15:55
To: boost-users@lists.boost.org
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
$CC -V
CC: Sun C++ 5.10 SunOS_i386 2009/06/03
patched with 128229-06compiling on Solaris x64
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian
Sent: Monday, March 29, 2010 16:36
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] compiler error on using threads with boost
On Mon, Mar 29, 2010 at 4:03 PM, Iskandar Prins
On Mar 29, 2010, at 8:02 AM, Ovanes Markarian wrote:
Unfortunately, I don't have access to Sun C++ compiler. Maybe someone else from the group???
On Mon, Mar 29, 2010 at 4:45 PM, Iskandar Prins
wrote: $CC -V CC: Sun C++ 5.10 SunOS_i386 2009/06/03
patched with 128229-06compiling on Solaris x64
The wiki has a "platform champions" page https://svn.boost.org/trac/boost/wiki/PlatformChampions However, no one has volunteered to help support Sun^H^H^H OracleOS. -- Marshall
On 03/29/2010 09:18 AM, Marshall Clow wrote:
The wiki has a "platform champions" page https://svn.boost.org/trac/boost/wiki/PlatformChampions However, no one has volunteered to help support Sun^H^H^H OracleOS.
I'll volunteer for... what's the opposite of "Champion"? :-) Sun Studio is a rather poor C++ compiler. GCC is the better choice for C++ on Solaris.
participants (4)
-
Iskandar Prins
-
Marshall Clow
-
Ovanes Markarian
-
Rob Riggs