
20 May
2008
20 May
'08
8:53 p.m.
Frank Mori Hess <frank.hess@nist.gov> 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