|
Boost Users : |
Subject: Re: [Boost-users] Weird problem with boost::noncopyable and boost::mutex
From: Daniel V (dann.vd_at_[hidden])
Date: 2010-03-18 09:37:10
You were right.
Actually ObjectA has a member that is ListObject that has a member
boost::mutex.
I really need to use this objects this way and the LisObject object needs
that mutex, is any other way I can use them and not recesive this problem?
Thanks!!
Dann
On Wed, Mar 17, 2010 at 7:00 PM, Igor R <boost.lists_at_[hidden]> wrote:
> > The thing is that I instanciated an ArrayList object and called the
> "insert"
> > method and I received an error from boost::mutex AND boost::noncopyable!!
> > and I am not using them at all!!
> > This is the code that generates the error:
> > ArrayList<ObjectA> myArrayListA;
> > ObjectA myObjectA;
> > myArrayListA.insert(myObjectA);
>
> Maybe ObjectA has a member of type boost::mutex?
> insert() invokes compiler-generated copy-constructor of ObjectA, which
> in turn tries to copy the mutex.
> In short, you ObjectA is non-copyable.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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