coveo::linq
Implementation of .NET-like LINQ operators in C++
Functions

Concatenate two sequences. More...

Functions

template<typename Seq2 >
auto coveo::linq::concat (Seq2 &&seq2) -> detail::concat_impl< Seq2 >
 Concatenates two sequences. More...
 

Detailed Description

The concat operator concatenates two sequences, producing a new sequence containing all elements from both source sequences.

.NET equivalent: Concat

Function Documentation

◆ concat()

template<typename Seq2 >
auto coveo::linq::concat ( Seq2 &&  seq2) -> detail::concat_impl<Seq2>

Concatenates two sequences, producing a sequence that contains all elements from both source sequences.

For this to work, both source sequences must contain compatible elements.

The resulting sequence's elements will be const if at least one source sequence's elements are const.

Use like this:

const int ONE[] = { 42, 23, 66 };
const int TWO[] = { 67, 11, 7 };
using namespace coveo::linq;
auto seq = from(ONE)
| concat(TWO);
// seq == { 42, 23, 66, 67, 11, 7 }
Parameters
seq2Second sequence to concatenate.
Returns
(Once applied) Concatenation of both sequences.