
24 Jul
2004
24 Jul
'04
2:50 p.m.
Rob Stewart <stewart@sig.com> writes:
scoped_lock = move(scoped_lock); scoped_lock |= move(upgradable_lock); // 1
I like the pipe's suggestion of a wall and, hence, blocking. The x= operators are good, in general, as they still suggest assignment (<<= is better than << for that reason).
Problem is that the syntax is illegal. scoped_lock is a type. You can do: scoped_lock x(move(my_upgradable_lock),blocking); x |= move(my_upgradable_lock); but that's it. No constructing new scoped_locks with |= -- Dave Abrahams Boost Consulting http://www.boost-consulting.com