N
Noah Roberts
I needed this functionality and couldn't find it. Does anyone know if
it already exists somewhere? If so I would rather use the existing
method instead of my own...
template < typename T >
struct dereference_type { typedef T type; };
template < typename T >
struct dereference_type< T* > { typedef T type; };
template < typename T >
struct dereference_type< boost::scoped_ptr< T > > { typedef T type;
};
template < typename T >
struct dereference_type< boost::shared_ptr< T > > { typedef T type;
};
template < typename T >
struct dereference_type< boost::weak_ptr< T > > { typedef T type; };
it already exists somewhere? If so I would rather use the existing
method instead of my own...
template < typename T >
struct dereference_type { typedef T type; };
template < typename T >
struct dereference_type< T* > { typedef T type; };
template < typename T >
struct dereference_type< boost::scoped_ptr< T > > { typedef T type;
};
template < typename T >
struct dereference_type< boost::shared_ptr< T > > { typedef T type;
};
template < typename T >
struct dereference_type< boost::weak_ptr< T > > { typedef T type; };