Boost logo

Boost Users :

Subject: [Boost-users] ptr_vector sort usage - partially solved
From: archie14 (admin_at_[hidden])
Date: 2010-08-05 09:54:10


archie14 <admin <at> tradeplatform.us> writes:

>
> I can't figure out how to use "sort" method in ptr_vector with the function
> object. Operator < should be defined, but for various reasons I cant define
it
> in the class A, and I have to do the comparison between the A values using
> some other values.
>
...
I "solved" the problem by declaring static comparison method and static member
variable to use inside comparison method. Result works, but it is ugly.
Question remains - how to define a function object without falling to the
static member usage?


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