Philippe A. Bouchard wrote:
"Larry Evans" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
[...]
Only if you want to collect cycles or provide some other means for
accessing the arcs in the pointer graph. As a matter of fact, it may
be better to do somewhat like shared_ptr does, i.e. instead of storing
a ip_descriptor*, just store something like counted_base, where the
actual instance is a derived class, counted_impl<T>, which knows the
"real" type, T, of the object pointed to.
What about typeid(* m_ptr).name() which is also virtual and returns a real
compile-time id?
But that means m_ptr must point to something with a virtual function, but
what I was proposing would allow m_ptr to be non-virtual. Instead, the
ip_descriptor would "takeover" to purpose of the virtual dtor with no extra
overhead than that required for accessing the internal pointers. Only instead
of having a virtual function table pointer, there'd be the ip_descriptor* in
the gc_header.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost