coveo::linq
Implementation of .NET-like LINQ operators in C++
|
Performs a set union of two sequences. More...
Functions | |
template<typename Seq2 > | |
auto | coveo::linq::union_with (Seq2 &&seq2) -> detail::union_impl< Seq2, detail::less<>> |
Performs set union of two sequences. More... | |
template<typename Seq2 , typename Pred > | |
auto | coveo::linq::union_with (Seq2 &&seq2, Pred &&pred) -> detail::union_impl< Seq2, Pred > |
Performs set union of two sequences using predicate. More... | |
The union_with
operator returns the union of all elements in the first and second sequence (essentially a set union). Similar to a concatenation, except duplicate elements are filtered out. The elements are returned in the order that they appear in the sequences.
.NET equivalent: Union
auto coveo::linq::union_with | ( | Seq2 && | seq2 | ) | -> detail::union_impl<Seq2, detail::less<>> |
Returns a sequence containing all elements from the two source sequences (essentially a set union). Duplicate elements are filtered out. Elements are returned in the order that they appear in the sequences.
Elements are compared using operator<()
.
Use like this:
seq2 | Second source sequence. |
seq2
. auto coveo::linq::union_with | ( | Seq2 && | seq2, |
Pred && | pred | ||
) | -> detail::union_impl<Seq2, Pred> |
Returns a sequence containing all elements from the two source sequences (essentially a set union). Duplicate elements are filtered out. Elements are returned in the order that they appear in the sequences.
Elements are compared using the provided predicate. The predicate must provide a strict ordering of the elements, like std::less
.
Use like this:
seq2 | Second source sequence. |
pred | Predicate used to compare sequence elements. |
seq2
.