-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 06 February 2007 15:43 pm, Timmo Stange wrote:
Frank Mori Hess wrote:
I've made some minor changes to shared_ptr.hpp and enable_shared_from_this.hpp as a proof of concept (diffs against boost 1.32 attached). It appears to work beautifully. The "real thing" would also take steps to make sure the postconstructor only gets called once (maybe in a "postconstructible" class derived from enable_shared_from_this. And the virtual function that is called in enable_shared_from_this might want a less specific name than postconstruct.
Peter, is there any chance a change like this could get put in shared_ptr?
I don't think adding polymorphism to something as widely used as enable_shared_from_this is an option.
Maybe the equivalent can be done using only with templates without polymorphism, I'll see if I can make that work. - -- Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFyO7Y5vihyNWuA4URAqbWAJ96KRrK1SDYussP8fcY9/zjrI/AqQCgoPE4 H3LPRJ4UK828w+T4SgeNg5M= =OUz9 -----END PGP SIGNATURE-----