Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
Front Page / Sequences / Views / joint_view

joint_view

Synopsis

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

Description

A view into the sequence of elements formed by concatenating Sequence1 and Sequence2 elements.

Header

#include <boost/mpl/joint_view.hpp>

Model of

Parameters

Parameter Requirement Description
Sequence1, Sequence2 Forward Sequence Sequences to create a view on.

Expression semantics

The semantics of an expression are defined only where they differ from, or are not defined in Forward Sequence.

In the following table, v is an instance of joint_view, s1 and s2 are arbitrary Forward Sequences.

Expression Semantics
joint_view<s1,s2>
joint_view<s1,s2>::type
A lazy Forward Sequence of all the elements in the ranges [begin<s1>::type, end<s1>::type), [begin<s2>::type, end<s2>::type).
size<v>::type The size of v; size<v>::value == size<s1>::value + size<s2>::value; linear complexity; see Forward Sequence.

Example

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

BOOST_MPL_ASSERT(( equal< numbers, range_c<int,0,15> > ));

See also

Sequences, Views, filter_view, transform_view, zip_view, iterator_range