From 08d8eb942dcd3ead1f654fa3acfb3968e3399614 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 1 Aug 2018 13:10:43 +1000 Subject: [PATCH] view: add iterator intersection test --- view.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/view.hpp b/view.hpp index c64e484a..7da432a7 100644 --- a/view.hpp +++ b/view.hpp @@ -640,6 +640,15 @@ namespace util { } + /////////////////////////////////////////////////////////////////////////// + template + constexpr bool + intersects (util::view a, IteratorT b) + { + return b >= a.begin () && b < a.end (); + } + + /////////////////////////////////////////////////////////////////////////// template < typename BeginA, typename EndA,