"David Abrahams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [snip]
One problem I see is that the constructor uses a different syntax than any other function. Imho syntax uniformity is good, and lack thereof is not good. Other languages get away from this problem by considering the first assignment to an base or member, the constructor call for that base or member. If no first assignment is statically decided, there is a compile-time error. If that were the case, Loki::SmartPtr's constructor could be written like this: SmartPtr::SmartPtr(T* p) { *this = storage(p); ScopeGuard g = MakeGuard(storage::destroy, p); *this = ownership(p); g.Dismiss(); *this = conversion(); *this = checking(); } Well, dream mode off. If that's not to work, using Dave Abrahams' idea of passing a default argument might apply, however the problem is that you can't pass previous arguments to the default argument :o/. I suggest we just make an explicit function acquire() for the ownership policy and have all of its other member functions assume acquire() was called. Imho this is an issue of language peculiarity, and not a matter of principle. Andrei _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost