Boost logo

Boost Users :

Subject: Re: [Boost-users] accessing last element in boost multi-index
From: Stanislav Ivochkin (isn_at_[hidden])
Date: 2013-03-19 10:19:53


> 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_index_container.html#multi_index_container.
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.


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