[multi_index] Working with a composite key of keys with different sorting criterias

Hi, First of all, I've read the documentation but I couldnt find the information I'm looking for. In fact the example composite_keys.cpp confused me even more. What I want to do is: I have a record that has two keys: domain and path. The domain is sorted by its end, so: .google.com abc.google.com .google.com is less than abc.google.com And path is sorted as usual: / is less than /abc But I'm not being able to figure out how to create a composite key with both keys. One question came up with the composite_keys.cpp: struct name_key:composite_key< file_entry, BOOST_MULTI_INDEX_MEMBER(file_entry,const file_entry*,dir), BOOST_MULTI_INDEX_MEMBER(file_entry,std::string,name)
{};
The dir member will be ordered by its pointer value right? I cant see much sense in this ordering since its completely platform independent. Shouldnt be by its directory name and path? Thanks in advance, -- Felipe Magno de Almeida
participants (1)
-
Felipe Magno de Almeida