H
Henrik Goldman
I have a map structure containing the following information:
->first contains a time_t and is used for lookups
->second holds my associated data to this time
When calculating averages over time I use lower_bound and upper_bound to
find the actual data within the map.
However in some cases no data exist in the range. What happens in this case
is a valid result from lower_bound and upper_bound functions but
iterator_begin will always be the same as iterator_end.
Is there a library function which can give me the count of elements between
two iterators? This way I can actually see if there are any results within
the time range and thus won't get wrong results.
Thanks in advance.
-- Henrik
->first contains a time_t and is used for lookups
->second holds my associated data to this time
When calculating averages over time I use lower_bound and upper_bound to
find the actual data within the map.
However in some cases no data exist in the range. What happens in this case
is a valid result from lower_bound and upper_bound functions but
iterator_begin will always be the same as iterator_end.
Is there a library function which can give me the count of elements between
two iterators? This way I can actually see if there are any results within
the time range and thus won't get wrong results.
Thanks in advance.
-- Henrik