"Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote in message b02f0c$o1d$[EMAIL PROTECTED]">news:b02f0c$o1d$[EMAIL PROTECTED]... > > It seems placement operator new (size_t, ...) would extend a lot > garbage collection possibilities. Why don't we define a set of rules for > each tag this overloaded placed operator would use:
More logically, why don't you implement these yourself, and use your implementation to justify the interface you design? > shared_ptr<int>(new int()); > > GC type defined at run-time: > shared_ptr<int>(new (gc) int()); // Add pointer to a list > shared_ptr<int>(new (rc) int()); // Add counter + pointer to a list > shared_ptr<int>(new (os) int()); // Add owner to a list > > GC type defined at compile-time: > placed_ptr<int>(new (po) int()); // Reserve an extra integer to the > allocated block > > shared_ptr<> would be more portable while placed_ptr<> would > require a placed object with operator new (size_t, po). Probably, "gc_ptr<>" might be a better name. Dave _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost