
Peter Dimov wrote:
Michael Glassford wrote:
I agree that movable locks should wait. However, what about something like this, which doesn't require movable locks (concept only--there are probably errors):
[...]
Looks like Comeau in strict mode would still not accept it; noncopyable objects cannot be copy-initialized. But let's get back to my original question:
This is certainly possible, but I don't see what the additional complexity buys us.
Well, in regards to simply choosing the right set of constructors, we appear to disagree on what's beneficial, so I guess I can't answer that. In regards to the alternative design Eric presented, or my responses to it, it would buy this syntax: if (try_lock l = ...) { } Not major, perhaps, but nice. Mike