Using boost multi-index, I happen to have the following type for the iterator:

multi_index_set::nth_index<2>::type::iterator

I'd like go get rid of the nth_index<2> part of the type and refer to it via its index tag:

multi_index_set::tag_index<price_index>::type::iterator //tag_index is the functionality i'd like to have

Does this exist?

有帮助吗?

解决方案

If price_index is the tag, you can refer to the relevant index iterator like this:

multi_index_set::index<price_index>::type::iterator
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top