diff --git a/view.hpp b/view.hpp index 6ce7de96..04b9a817 100644 --- a/view.hpp +++ b/view.hpp @@ -1032,6 +1032,28 @@ namespace cruft { } + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, + typename IteratorB, + typename ValueT + > + requires ( + std::equality_comparable_with< + typename std::iterator_traits::value_type, + ValueT + > + ) + bool + contains (view container, ValueT &&value) + { + for (auto const &inner: container) + if (inner == value) + return true; + return false; + } + + /////////////////////////////////////////////////////////////////////////// template < typename BeginA, typename EndA,