Boost logo

Boost Users :

Subject: Re: [Boost-users] [thread] lock(Iterator,Iterator) bug?
From: Stefan Strasser (strasser_at_[hidden])
Date: 2009-08-19 14:13:25


Am Wednesday 19 August 2009 17:34:21 schrieb Ovanes Markarian:
> Another question. Mutex supposed to be noncopyble. How are going to create
> vector<mutex> and fill it with mutex instances?

I don't. this was a test case only.
use a container that accepts noncopyables or a copyable Lockable type and
you'll get the same results.

I didn't even stumble accross this by trying to use lock(), I was looking for
a way to check if a type has a certain member. So I was surprised to find
code that is supposed to be non-standard c++ in a release version of boost,
enabled for almost all compilers.
so, is this a bug or am I missing something?

>
> On Wed, Aug 19, 2009 at 4:17 PM, <strasser_at_[hidden]> wrote:
> > this example:
> >
> > vector<mutex> vec;
> > lock(vec.begin(),vec.end());
> >
> > fails on gcc 4.3.2, complaining that the vector iterator doesn`t have
> > members named, lock(), unlock(), ...


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