Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::array and lower_bound
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-03-26 06:09:17

I just didn't the see the std::lower_bound version with the comparator.
That does what I want,


> -----Original Message-----
> From: Hicham Mouline [mailto:hicham_at_[hidden]]
> Sent: 26 March 2009 9:30
> To: 'boost-users_at_[hidden]'
> Subject: boost::array and lower_bound
> Hello,
> I maintain a boost::array< pair< time, value > > B,
> sorted by time, where I defined operator< for pair<time, value>
> I wish to get a given entry from the array for a given time y.
> If y matches any entry, value is returned, if y is between 2 entries, an
> interpolated value is returned.
> std::lower_bound( &B[0], &B[supSize], ... ) //this doesn't work
> I suppose for this I need to define some other related iterator to pass to
> lower_bound,
> not boost::array< pair< time, value > >::const_iterator.
> I suppose this is what "Iterator adaptors" are about ?
> I have seen the term "views" as well, is this related?
> Regards,

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at