Boost logo

Boost Users :

From: Dragan Milenkovic (tyrant_at_[hidden])
Date: 2003-10-07 14:05:15

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

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:


Any thoughts on putting it inside the enable_shared_from_this...
shared_from_base<This>() or polymorphic_shared_from_this<This>() or

Also, any comments on the designs I used? Better observers?

Best regards,
Dragan Milenkovic

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at