
I believe the zip_iterator problem is that *a returns a const. swap(*a, *b) won't work for that situation; it needs a specialized iter_swap. From my understanding of Boost::swap, using an equivalent Boost::iter_swap would resolve the problem. Additionally, iter_swap can be be faster, and it's what SGI's std::sort uses. On Thu, May 28, 2009 at 8:15 AM, Christopher Jefferson < chris@bubblescope.net> wrote:
On 28 May 2009, at 15:26, Steven Ross wrote:
Is there a boost::iter_swap? It would be useful to enable use of a more
specialized iter_swap for sorting. This would apply both to my hybrid algorithms and spreadsort.
One thing to watch out for (you might know this) is that standard libraries are not required to use iter_swap for iterators, and in general don't (they often use swap(*a,*b)).
Chris
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost