view: add iterator intersection test
This commit is contained in:
parent
47c912e5e2
commit
08d8eb942d
9
view.hpp
9
view.hpp
@ -640,6 +640,15 @@ namespace util {
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename IteratorT>
|
||||
constexpr bool
|
||||
intersects (util::view<IteratorT> a, IteratorT b)
|
||||
{
|
||||
return b >= a.begin () && b < a.end ();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <
|
||||
typename BeginA, typename EndA,
|
||||
|
Loading…
Reference in New Issue
Block a user