Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] Compile error w/ 1.36
From: Chris Newbold (Chris.Newbold_at_[hidden])
Date: 2008-09-04 11:12:34


> From: threads-devel-bounces_at_[hidden] [mailto:threads-devel-
> bounces_at_[hidden]] On Behalf Of Anthony Williams
> Sent: Thursday, September 04, 2008 10:12 AM

> However, I'd really like to be able to fix the problem. What platform
> are you on? From the error messages, I'm guessing some variety of
> linux/unix.

GCC 4.2.3 on Linux.

> The error happens in the following code:
>
> boost::mutex::scoped_lock lock(state_change);
>
> while(state.exclusive || state.exclusive_waiting_blocked)
> {
> shared_cond.wait(lock); // error on this line
> }
>
> and it looks like the compiler things lock is a function type rather
> than an object type. This may be a name lookup issue: Boost 1.36 has
> new lock functions in the <boost/thread/locks.hpp> header for locking
> more than one mutex.

Arggh! Sorry, this one is entirely my fault.

I was trying to fix all of the shadow warnings GCC emits in this file (due to the member function and local variable named "lock") and I completely botched the job.

1.36 compiles okay out-of-the-box.

It would be great if you could fix the shadow warnings by renaming the local scoped_lock instances to something that does not conflict with the member function.

Sorry again for the false alarm and for wasting your time on my error.

-Chris


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk