|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-02-16 11:41:47
"Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> "David Abrahams" <dave_at_[hidden]> wrote in message
>
> |I've heard the term "pointainer" somewhere. Not that I like it or
> |anything.
>
> I agree, its not that good.
>
> | I believe "indirect" is superior -- I am assuming containers of
> | dereferenceable types other than pointers (like iterators) are also
> | supported.
>
> Curently they are not, unless the iterator happens to be a pointer.
>
> The trouble in that case would be that my implementation used void*
> underneith and hence has special iterators that does a
> reinterpret_cast.
Aside: Why reinterpret_cast? Surely static_cast would be a more
restrictive and less alarming choice.
> A reinterpret_cast appears here and there in the container's implmentation
> too.
You just need specializations for pointers that do that casting trick,
and a generalized template that doesn't.
> So given that iterators in general are not supported, would you then prefer
> the ptr_ prefix?
No; I'd prefer if you planned to phase in support for dereferenceable
types in general.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk