|
coveo::linq
Implementation of .NET-like LINQ operators in C++
|
Looks for an element in a sequence. More...
Functions | |
| template<typename T > | |
| auto | coveo::linq::contains (const T &obj) -> detail::contains_impl_1< T > |
| Look for element in a sequence. More... | |
| template<typename T , typename Pred > | |
| auto | coveo::linq::contains (const T &obj, const Pred &pred) -> detail::contains_impl_2< T, Pred > |
| Look for element in a sequence using a predicate. More... | |
The contains operator determines if a sequence contains a specific element.
This is a terminal operator.
.NET equivalent: Contains
| auto coveo::linq::contains | ( | const T & | obj | ) | -> detail::contains_impl_1<T> |
Scans a sequence, looking for the provided element. Elements are compared using operator==().
Use like this:
| obj | Element to look for. |
true if obj was found in sequence. | auto coveo::linq::contains | ( | const T & | obj, |
| const Pred & | pred | ||
| ) | -> detail::contains_impl_2<T, Pred> |
Scans a sequence, looking for the provided element. Elements are compared using the provided predicate.
Use like this:
| obj | Element to look for. |
| pred | Predicate used to compare the elements. Always receives obj as its second argument. |
true if obj was found in sequence.
1.8.15