Working with ranges of scalar values

B

Bob Hairgrove

Hello,

Is there an STL class for working with contiguous ranges of things? I
can write one myself, but it would be nice if there were something
standard I could use -- don't like to re-invent the wheel. Boost
doesn't seem to have this, or have I overlooked something?

For example, I could implement a time range by storing either the
start and end times or the start time and number of seconds. Then I
would have member functions to calculate whether time A was contained
within the range, whether another range intersects it, etc.

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top