Boost logo

Boost :

From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-05-20 16:53:03


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

> I'm curious if lock factory functions have been considered? Combined with the
> C++0x "auto" keyword (or some other kind of type erasure if you wanted to
> emulate), it seems like they could allow you to avoid having to specify the
> template type of locks explicitly. Like:
>
> template<typename M>
> boost::unique_lock<M> make_unique_lock(M &mutex);
>
> boost::mutex m;
> auto lock = make_unique_lock(m);

I'm not aware that they have, but it does look useful.

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