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

The MPL Reference Manual: joint_view
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.

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
joint_view::type
A lazy Forward Sequence of all the elements in the ranges [begin::type, end::type), [begin::type, end::type).
size::type The size of v; size::value == size::value + size::value; linear complexity; see Forward Sequence.

Example

typedef joint_view<
      range_c
    , range_c
    > numbers;

BOOST_MPL_ASSERT(( equal< numbers, range_c > ));