# joint_view

### Synopsis

    template<
          typename Sequence1
        , typename Sequence2
        >
    struct joint_view
    {
        // unspecified
    };

### Description

`joint_view` is a two-sequence view that allows one to operate on a sequence of concatenated elements of sequences `Sequence1` and `Sequence2` without actually creating one.

### Definition

    #include "boost/mpl/joint_view.hpp"

### Parameters

Parameter | Requirement | Description
--- | --- | ---
`Sequence1`, `Sequence2` | A model of Sequence | Sequences to concatenate.

### Expression semantics

Expression | Expression type | Precondition | Semantics | Postcondition
--- | --- | --- | --- | ---
`typedef joint_view<Sequence1,Sequence2> s;` | A model of Sequence |  | `s` prodives iterators to all the elements in the ranges `[begin<Sequence1>::type,end<Sequence1>::type)`, `[begin<Sequence2>::type,end<Sequence2>::type)`. | `size<s>::type::value == size< Sequence1 >::type::value + size< Sequence2 >::type::value`.

### Complexity

Amortized constant time.

### Example

    typedef joint_view<
          range_c<int,0,10>
        , range_c<int,10,15>
        > numbers;

    typedef range_c<int,0,15> answer;
    BOOST_STATIC_ASSERT((equal<numbers,answer>::type::value));

### See also

Sequences, `transform_view`, `filter_view`, `zip_view`

Table of Contents
Last edited March 10, 2003 5:42 am