Boost logo

Threads-Devel :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-17 14:41:21


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

It seems to me all the free move function overloads in thread/locks.hpp that
take a thread_move_t as an argument, like:

template<typename Mutex>
inline detail::thread_move_t<unique_lock<Mutex> >
move(detail::thread_move_t<unique_lock<Mutex> > x)
{
    return x;
}

could be condensed into a single overload living in the detail namespace:

namespace detail
{
    template<typename T>
    thread_move_t<T> move(thread_move_t<T> x)
    {
        return x;
    }
}

Or, maybe 2 overloads that pass through a const or non-const reference if you
want to try and optimize.

Also, are the free move functions an official part of the interface? I don't
see them mentioned in the docs.

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

iD8DBQFIB5nR5vihyNWuA4URAjvAAJ4rBDpNQj1tKAwYWclvUe9VIPUfygCgoIXU
qRKcPNUTdf1u51dvEeZAhDo=
=diM8
-----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