1 #ifndef _VIRTUAL_SHARED_FROM_THIS_HPP_
2 #define _VIRTUAL_SHARED_FROM_THIS_HPP_
4 #include <boost/shared_ptr.hpp>
5 #include <boost/enable_shared_from_this.hpp>
10 boost::enable_shared_from_this<virtual_enable_shared_from_this_base> {
17 boost::shared_ptr<T> shared_from_this() {
18 return boost::dynamic_pointer_cast<T>(
19 virtual_enable_shared_from_this_base::shared_from_this());
22 boost::shared_ptr<const T> shared_from_this()
const {
23 return boost::dynamic_pointer_cast<
const T>(
24 virtual_enable_shared_from_this_base::shared_from_this());
Definition: virtual_enable_shared_from_this.hpp:9
Definition: virtual_enable_shared_from_this.hpp:15