| Home | Libraries | People | FAQ | More

##### join

###### Description

Takes 2 sequences and returns a sequence containing the elements of the first followed by the elements of the second.

###### Synopsis

    template<
        typename LhSequence,
        typename RhSequence>
    typename result_of::join<LhSequence const, RhSequence const>::type join(LhSequence const& lhs, RhSequence const& rhs);

Table 1.80. Parameters

Parameter | Requirement | Description
--- | --- | ---
`lhs` | A model of Forward Sequence | Operation's argument
`rhs` | A model of Forward Sequence | Operation's argument

###### Expression Semantics

    join(lhs, rhs);

Return type:

- A model of Forward Sequence.
- A model of Associative Sequence if `lhs` and `rhs` implement the Associative Sequence model.

Semantics: Returns a sequence containing all the elements of `lhs` followed by all the elements of `rhs`. The order of the elements is preserved.

###### Complexity

Constant. Returns a view which is lazily evaluated.

###### Header

    #include <boost/fusion/algorithm/transformation/join.hpp>
    #include <boost/fusion/include/join.hpp>

###### Example

    vector<int,char> v1(1, 'a');
    vector<int,char> v2(2, 'b');
    assert(join(v1, v2) == make_vector(1,'a',2,'b'));