The reference count being one is the non-problematic case.
So basically, detaching when the reference count is not 1 does what? Give you the raw pointer? Perhaps also reset the smart pointer? What use is that?If the reference count is not 1, then I must never call delete on the pointer. I can use the pointer as I wish, and modifying its memory, but I cannot delete the object, since that would make the smart pointer attempt to free already freed memory at some point.
I would be very interested in seeing a good use case for your detach() semantics. I claim that there is none - that any use case you may have results from not distinguishing between various types of smart pointers (scoped_ptr, shared_ptr, move_ptr).
Do you have specific scenarios in mind, or is that a gut reaction?What I see as dangerous are these weak_ptrs. They can be abused and cause all sorts of havoc, more so than Detach, or equally much.