7 Oct
2003
7 Oct
'03
7:05 p.m.
Hello, people, I've been using enable_shared_from_this a LOT, mostly for implementing the Observer pattern (an object holds a list of weak pointers to it's observers). I wanted to know why are shared_from_this member functions public instead of being protected? Also, I've used the following expression a few times: shared_polymorphic_cast<This>(shared_from_this()) Any thoughts on putting it inside the enable_shared_from_this... shared_from_base<This>() or polymorphic_shared_from_this<This>() or such? Also, any comments on the designs I used? Better observers? Best regards, Dragan Milenkovic