// test.cpp : Defines the entry point for the console application. // #include #include #include #include #include #include #include namespace x { namespace mi = boost::multi_index; struct iless { bool operator()(std::string const&lhs, std::string const& rhs) const { namespace n = boost::algorithm; return n::to_upper_copy(lhs) < n::to_upper_copy(rhs); } }; typedef std::pair pair; typedef mi::multi_index_container , mi::ordered_non_unique < BOOST_MULTI_INDEX_MEMBER(pair, std::string, first) , iless > > > headers_multi_index_t; struct test { typedef headers_multi_index_t::nth_index<1>::type::iterator my_iterator; typedef std::pair iterator_pair; test(iterator_pair pair) {} }; } int main() { x::headers_multi_index_t c; x::headers_multi_index_t::nth_index<1>::type& index = c.get<1>(); x::test t(c.equal_range("lala")); return 0; }