|
Boost : |
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-05-20 16:00:20
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIMy3V5vihyNWuA4URAgznAJ9ofZV/KfI0bit9QS6ek5DigfzvjgCgwoyE
Y7GuiYLbTDRr+/AdM5JQMQk=
=BaOW
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk