15 Apr
2009
15 Apr
'09
8:08 p.m.
On Wed, Apr 15, 2009 at 12:25 PM, Steven Watanabe
Dominique Devienne wrote:
So I used covariant return type, which AFAIK works only for raw pointers. If I were to remove the raw pointer accessors, I'd have to do either:
I would probably use a non-member template that encapsulates the necessary logic:
template<class T> shared_ptr<typename T::IdentType> getIdent(T& t);
I have: template <class T> shared_ptr<typename T::ident_type> ident_of(T* t) { BOOST_STATIC_ASSERT((is_base_of