Boost logo

Boost Users :

Subject: Re: [Boost-users] how to lisk unique keys in boost multi_index_container
From: Bill Tian (billtian945_at_[hidden])
Date: 2014-12-02 22:18:28


thanks for Joaquín M López Muñoz 's reply.

i have tried your code, it works as i need exactly.

for(auto it=data.get<1>().begin(),it_end=data.get<1>().end();
      it!=it_end;
      it=data.get<1>().upper_bound(it->m2)){
     std::cout<<it->m2<<"\n"; // or whatever you need to do with the key
  }

i'll use this method in reality, thanks!

Bill



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