我知道该怎么做:
for(auto it = mmap.begin(), end = mmap.end(); it != end; it = mmap.upper_bound(it->first))
但这不起作用:
for(auto it = mmap.rbegin(), end = mmap.rend(); it != end; it = mmap.lower_bound(it->first))
给予:
error: no match for 'operator=' in 'it = mmap.std::multimap<_Key, _Tp, _Compare, _Alloc>::lower_bound<unsigned int, long int, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, long int> > >((* & it.std::reverse_iterator<_Iterator>::operator-><std::_Rb_tree_iterator<std::pair<const unsigned int, long int> > >()->std::pair<const unsigned int, long int>::first))'