I might just be sleepy-eyed but is the doc correct here? i.e. Aren't both start and end inclusive?
/** Returns true if the given range lies entirely inside this range.
When making this comparison, the start value is considered to be inclusive,
and the end of the range exclusive.
*/
bool contains (Range other) const noexcept
{
return start <= other.start && end >= other.end;
}
Also the other version appears to have an exclusive end, but is not documented as such..
/** Returns true if the given position lies inside this range. */
bool contains (const ValueType position) const noexcept
{
return start <= position && position < end;
}
jules
3
I don't think it's wrong, just maybe not relevent info for that method. Will have a look at these..