
From: David Abrahams <dave@boost-consulting.com>
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 |=
Actually, that's what Howard's pseudo-code syntax meant. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;