D
Dale Marchand
I'm trying to use an object in two different multiset containers, each
with it's own sort method. For the most frequently used, I overrode
the operator< method in the class, and for the second I wrote a method
LocationSort(). I can't seem to arrive upon the correct syntax for
defining a multiset that will use LocationSort.
multiset<DotObject,DotObject::LocationSort> mySet;
fails.
Is there a correct way to do this while keeping LocationSort inside of
my class? I know I could wrap it in a separate structure and pass in
the structure name, but would prefer to keep it inside the class code
for ease-of-maintenance reasons.
Thanks.
Dale
with it's own sort method. For the most frequently used, I overrode
the operator< method in the class, and for the second I wrote a method
LocationSort(). I can't seem to arrive upon the correct syntax for
defining a multiset that will use LocationSort.
multiset<DotObject,DotObject::LocationSort> mySet;
fails.
Is there a correct way to do this while keeping LocationSort inside of
my class? I know I could wrap it in a separate structure and pass in
the structure name, but would prefer to keep it inside the class code
for ease-of-maintenance reasons.
Thanks.
Dale