From: "David Abrahams" <[EMAIL PROTECTED]> > > Wow, such service!! > > Well, it needs some help for MSVC. I'll be happy to make those patches > if neccessary.
Does it? What kind of help? Can you post a test case that fails on MSVC? 'D' in counted_base_impl<P, D> is never cv-qualified and never a reference type, so I figured that things will work reasonably well. get_deleter<D const> might not work but you don't need to use that... I think? > And what about the need for 2-phase check because the > deleter may have been optimized away? That was your concern. No, there is no need for a 2-phase check. This if(has_deleter<D>(p)) { D * p = get_deleter<D>(p); // ... } is equivalent to if(D * p = get_deleter<D>(p)) { // ... } The deleter can only be optimized away completely if shared_ptr hasn't been constructed with a deleter (in which case get_deleter<X> should return 0 for any X). Otherwise, the deleter will be there, although it may be an empty base, if compressed_pair is used. But it still will have an address. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost