|
Boost Users : |
Subject: [Boost-users] Boost.multi_index: how to use a member function instead ofoperator<()?
From: Joost Kraaijeveld (J.Kraaijeveld_at_[hidden])
Date: 2009-02-23 14:03:30
Hi,
I want to use in index based on a member function that returns a bool if
an element is smaller than an other element like operator<. But I cannot
find how to do that.
e.g.
using namespace ::boost;
using namespace ::boost::multi_index;
class Object{
bool operator<(const Object& rhs) const;
bool fn(const Object& rhs) const;
}
struct FnIndex{};
typedef multi_index_container<
Object,
indexed_by <
ordered_unique< identity< Square > >, // this uses operator<(const Object&) I believe?
ordered_unique< tag< FnIndex >, ?????????????? >
>
> ObjectContainer;
If this possible, what should I use in the place of ?????????
TIA
-- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl
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