Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2008-05-08 10:19:31


Frank Mori Hess <frank.hess_at_[hidden]> writes:

> On Thursday 08 May 2008 04:51 am, Anthony Williams wrote:
>> To this end, unique_lock is default-constructible and movable, and supports
>> lock and unlock operations.
>
> Since when is unique_lock default-constructible? You just mean it has a
> defer_lock_t constructor, right?

Yes, that's what I meant: you can construct it without locking a mutex. I got
confused by Johan's statement.

Actually, thinking about it, there's no reason not to give it a default
constructor: you'd just not be able to do anything with it until you
move-assigned a unique_lock with a mutex into it.

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk