coveo::linq
Implementation of .NET-like LINQ operators in C++
|
Compares two sequences. More...
Functions | |
template<typename Seq2 > | |
auto | coveo::linq::sequence_equal (const Seq2 &seq2) -> detail::sequence_equal_impl_1< Seq2 > |
Compares elements in two sequences. More... | |
template<typename Seq2 , typename Pred > | |
auto | coveo::linq::sequence_equal (const Seq2 &seq2, const Pred &pred) -> detail::sequence_equal_impl_2< Seq2, Pred > |
Compares elements in two sequences using predicate. More... | |
The sequence_equal
operator compares two sequences and validates that they contain the same elements.
This is a terminal operator.
.NET equivalent: SequenceEqual
auto coveo::linq::sequence_equal | ( | const Seq2 & | seq2 | ) | -> detail::sequence_equal_impl_1<Seq2> |
Scans two sequences and compares each corresponding element using operator==()
. Returns true
if the two sequences contain the same elements in the same order.
Use like this:
seq2 | Second sequence to compare. The first sequence is the one on which the operator will be applied (e.g., the sequence passed to coveo::linq::from() ). |
true
both sequences contain the same elements in the same order. auto coveo::linq::sequence_equal | ( | const Seq2 & | seq2, |
const Pred & | pred | ||
) | -> detail::sequence_equal_impl_2<Seq2, Pred> |
Scans two sequences and compares each corresponding element using the provided predicate. Returns true
if the two sequences contain the same elements in the same order.
Use like this:
seq2 | Second sequence to compare. The first sequence is the one on which the operator will be applied (e.g., the sequence passed to coveo::linq::from() ). |
pred | Predicate used to compare the elements. |
true
both sequences contain the same elements in the same order.