Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-12-11 03:13:19


Michael Marcin skrev:
> How do I partition a ptr_vector?
> Most of the other standard algorithms seems to be members but I cannot
> find partition.

Some common algorithms where added because otherwise one has to fiddle
with void pointers. I plan to move away from the void* implementation,
but for now you have to do something like
                 std::next_permutation(compiledModel.steps().begin().base(),
                       compiledModel.steps().end().base(),
 
boost::void_ptr_indirect_fun<std::less<Step>,Step>() );

So you need to call .base() on the iterators, and then use
void_ptr_indirect_fun<> (or something equivalent).

-Thorsten


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