00001 #ifndef toast_traits_pointer_traits_hpp_INCLUDED 00002 #define toast_traits_pointer_traits_hpp_INCLUDED 00003 00004 #include <boost/shared_ptr.hpp> 00005 00012 namespace toast { 00013 00020 template <typename T> struct pointer_traits; 00021 00026 template <typename T> 00027 struct pointer_traits<T*> 00028 { 00029 typedef T value_type; 00030 typedef typename boost::detail::shared_ptr_traits<T>::reference reference_type; 00031 typedef T * pointer_type; 00032 }; 00033 00038 template<typename T> 00039 struct pointer_traits<boost::shared_ptr<T> > 00040 { 00041 typedef typename boost::shared_ptr<T>::value_type value_type; 00042 typedef typename boost::detail::shared_ptr_traits<T>::reference reference_type; 00043 typedef boost::shared_ptr<T> pointer_type; 00044 00045 }; 00046 00049 } 00050 00051 #endif // toast_traits_pointer_traits_hpp_INCLUDED