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>> 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
> 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, kalb at, bjorn.karlsson at, gregod at, wekempf at