Boost logo

Threads-Devel :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-11 15:29:54


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm updating the mutex types in libpoet to conform to the new boost.threads
api and I've got a question about the move emulation in boost.thread. Since
the lock types are convertible to thread_move_t<>, and the assignment
operators only accept thread_move_t<> types (no "normal" assignment), it
seems like I could get the same behavior without using thread_move_t<> or its
equivalent at all. That is, I could just define an assignment operator like

lock_type& operator=(lock_type&);

And define the assignment operator to pilfer the internal state of the right
hand side. Am I missing something? I don't have much (any) experience with
move emulation or right hand references.

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH/7wz5vihyNWuA4URAv5OAJwKsZLHTOTTFzNX8Z/vDSbhvuZgaACfXNO3
5+z1kZEzFRbFx/sn/33OyBM=
=hFQr
-----END PGP SIGNATURE-----


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk