Ok, this is what I'm trying to do: I want to define some base class A
which has a container with elements it needs to sort. I want to be
flexible with the comparison function, so the base class A will define
an abstract comparison function which will be implemented by derived
Since std::sort () expects function objects, after a lot of asking
around I found out I needed to use boost::bind. However, trying almost
all different types of combinations and looking up all kind of manuals,
I'm pretty much clueless...
Re: boost::bind and std::copy for member functions
Peter Dimov wrote:
> Leon Mergen wrote:
>> std::sort ( _elements.begin(), _elements.end(), boost::bind ( A::sort,
>> this, _1, _2 ) );
> Make that &A::sort. Pointers to members require the &.
D'oh, that was stupid... it even works now, thanks a lot!! :)