coveo::linq
Implementation of .NET-like LINQ operators in C++
|
Performs a set difference between two sequences. More...
Functions | |
template<typename Seq2 > | |
auto | coveo::linq::except (Seq2 &&seq2) -> detail::except_impl< Seq2, detail::less<>> |
Performs set difference between two sequences. More... | |
template<typename Seq2 , typename Pred > | |
auto | coveo::linq::except (Seq2 &&seq2, Pred &&pred) -> detail::except_impl< Seq2, Pred > |
Performs set difference between two sequences using predicate. More... | |
The except
operator returns all elements in the first sequence that are not also found in the second sequence (essentially a set difference). The elements are returned in the order that they appear in the first sequence.
.NET equivalent: Except
auto coveo::linq::except | ( | Seq2 && | seq2 | ) | -> detail::except_impl<Seq2, detail::less<>> |
Returns a sequence containing all elements from the first source sequence that are not also in the second source sequence (essentially a set difference). Elements are returned in the order that they appear in the first sequence.
To filter out elements, elements are sorted using operator<()
.
Use like this:
seq2 | Second source sequence, containing the elements to filter out. |
seq2
. auto coveo::linq::except | ( | Seq2 && | seq2, |
Pred && | pred | ||
) | -> detail::except_impl<Seq2, Pred> |
Returns a sequence containing all elements from the first source sequence that are not also in the second source sequence (essentially a set difference). Elements are returned in the order that they appear in the first sequence.
To filter out elements, the provided predicate is used to sort the elements. The predicate must provide a strict ordering of the elements, like std::less
.
Use like this:
seq2 | Second source sequence, containing the elements to filter out. |
pred | Predicate used to order elements to filter out. |
seq2
.