Boost logo

Boost :

Subject: Re: [boost] [BOOST_FOREACH] Problem to iterate on a non-copyable container...
From: pfultz2 (pfultz2_at_[hidden])
Date: 2015-05-21 13:03:25

> I finally made almost like you: change the lock to an unqiue lock, and
> a copy constructor

Actually, I think it would be better to default construct the lock on copy:

    MyContainer(const MyContainer& other)
        : m_vector(other.m_vector),

Because on copy you want to severe the relationship, so there is one lock
associated with each copy of the document(or data).


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at