Boost logo

Boost Users :

Subject: Re: [Boost-users] Covariant return type, method hiding, and shared_ptr advice
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2009-04-15 15:03:01


On Wed, Apr 15, 2009 at 12:25 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> 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);

That's great, this didn't occur to me. Thanks again, --DD


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