
On 11/10/2004 07:52 PM, David Abrahams wrote:
"George van den Driessche" <grebe@bigfoot.com> writes:
[snip]
(a) Reflect C++ types into C++ objects. Each type for which you provide a reflection map will correspond to exactly one property_set object, which would contain a set of property_type_info objects. [snip] (e) Serialise the types, using results of (a). [snip] order to do serialization in that way, you'd likely have to expose an object's guts: its implementation details.
If you could "reflect" all the reference counted smart_ptrs, like shared_ptr, for a class, T, into some class specific structure, say gc_desc<T>, then you could use this for precise garbage collection, AFAICT. Although it does expose the guts (after all, shared_ptr<X>, might be private in T), this is what you'd need to detect cycles. Does this seem a reasonable additional use for (a)?