|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-12-10 13:21:40
From: "Fernando Cacciola" <fernando_cacciola_at_[hidden]>
> I don't know of 'standard' examples, but in my code I do that a lot:
>
> class curve
> {
> shared_ptr<polygon> acquire_approx() const { return m_approx ; }
> shared_ptr<polygon> m_approx ;
> } ;
But this is not a get(). It is an acquire_approx(). :-)
I think that most programmers are familiar with get() and would expect the
returned pointer to be invalidated by the first mutating operation. I don't
see what are you trying to achieve with peek().
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk