5 Aug
2010
5 Aug
'10
1:54 p.m.
archie14
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?