From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-05-04 17:57:56
>even swappable. A paradigmatic case of use is
>Boost.PtrContainer: the types held in this kind
>of containers are in general not swappable, but
>an iter_swap() overload than simply exchanges the
>internal pointers makes a lot of sense: the
>overall result is that rotate, reverse, etc.
>will work as expected, save the minor detail that
>this "extended swap" concept does not work as
>usual with raw pointers to the ext-swapped elements
>--only iterators to the elements get their
>pointed-to elements interchanged.
>What do you think of this? IMHO this can solve
>the problem of making std swapping algorithms
>work with ptr_containers, a problem for which
>(if I'm not wrong) no satisfying solution has been
you're right that no satisfiable solution has been reached.
explains a different way to fix standard algorithms by mandating moving is
used if available.
my understanding of this, based on discussion with Howard, is that we can
make an iterator with a proxy-reference for pointer containers that works.
hence I don't feel a great need to do anything about it right now.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk