accessing last element in boost multi-index
Hi Using boost::multiindex, I am looking for a method to retrieve the the last element. Something like rbegin(). As I looked in to the manual page, http://www.boost.org/doc/libs/1_53_0/libs/multi_index/doc/tutorial/basics.ht..., I could not find such function. Problem with end() is that it points to the last_element+1 which is null. Regards, Mahmood
Using boost::multiindex, I am looking for a method to retrieve the the last element. Something like rbegin().
Check http://www.boost.org/doc/libs/1_53_0/libs/multi_index/doc/reference/multi_in.... If the first index type you introduced by indexed_by instantuation is hashed_index, you will not have rbegin() function since hashed_index does not provide one. Otherwise, tc.rbegin() call will do the same as tc.get<0>().rbegin(). I may be wrong (please correct me if it is), but I hope this will help. -- Regards, Stas.
participants (2)
-
Mahmood Naderan
-
Stanislav Ivochkin