Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-07-23 13:15:23


On Jul 23, 2004, at 2:10 PM, Howard Hinnant wrote:

> On the constructor side, this could look like:
>
> upgradable_lock ul(mut);
> scoped_lock sl(ul); // block, we have this in the current spec
> scoped_lock sl(ul, try_lock); // proposed to replace sl(try_move(ul))

Oops, forgot the cast-to-rvalue on ul:

upgradable_lock ul(mut);
scoped_lock sl(move(ul)); // block, we have this in the current spec
scoped_lock sl(move(ul), try_lock); // proposed to replace
sl(try_move(ul))

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk