Boost logo

Boost Users :

Subject: Re: [Boost-users] Covariant return type, method hiding, and shared_ptr advice
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-15 13:25:10


AMDG

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);

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net