
On 2/7/06, Giovanni P. Deretta <gpderetta@gmail.com> wrote: [snip]
You could argue that as this is a useful behavior stream_socket should have pointer semantics by default and be reference counted. But you would force the space and time overhead of a shared_ptr to everybody (btw, shared_ptr still require dynamic allocation of the reference counter).
Yes and No. I'm arguing that it is a very useful behavior that should be supported by the library. The default I'm not quite sure, maybe yes (it is the safest choice, you wont be able to use the dangling socket without knowing it), maybe no (unnecessary overhead for the reference count). Or you believe that it shouldnt be supported by asio? Be in another library? A move_resource<>/shared_resource<> "smart pointer"? [snip]
-- Giovanni P. Deretta
best regards, -- Felipe Magno de Almeida