
"David B. Held" <dheld@codelogicconsulting.com> writes:
"Jeremy Maitin-Shepard" <jbms@attbi.com> wrote in message news:87u128yr3g.fsf@jbms.ath.cx...
I believe that a library named ``indexed_set,'' which has been proposed and is pending formal review, provides this functionality in addition to supporting multiple indices.
Are you sure it does the same thing? I was under the impression that Joaquin's library lets you define *additional* indexes, but what if you just want to use an existing index, but it is comparable to something other than the key_type?
I am pretty certain that the library supports that. More commonly, however, the comparison process can be separated into key extraction, which obtains some key_type from the value_type, and then comparison on the key_type; this separation is supported by the library. I believe that in most cases the desire for a comparison predicate which operates on multiple types is actually (more conveniently) satisfied by being able to specify the key_type alone, rather than a value_type. -- Jeremy Maitin-Shepard