Home | Libraries | People | FAQ | More |
The intention of the join
function is to join two ranges into one longer range.
The resultant range will have the lowest common traversal of the two ranges supplied as parameters.
Note that the joined range incurs a performance cost due to the need to check if the end of a range has been reached internally during traversal.
template<typename SinglePassRange1, typename SinglePassRange2> joined_range<const SinglePassRange1, const SinglePassRange2> join(const SinglePassRange1& rng1, const SinglePassRange2& rng2) template<typename SinglePassRange1, typename SinglePassRange2> joined_range<SinglePassRange1, SinglePassRange2> join(SinglePassRange1& rng1, SinglePassRange2& rng2);
For the const version:
range_value<SinglePassRange2>::type
must be convertible to range_value<SinglePassRange1>::type
.
The range_reference<const
SinglePassRange2>::type
must be convertible to range_reference<const SinglePassRange1>::type
.
rng1
and rng2
must be a model of Single
Pass Range or better.
joined_range<const
SinglePassRange1,
const SinglePassRange2>
which is a model of the lesser
of the two range concepts passed.
rng1
and rng2
.
For the mutable version:
range_value<SinglePassRange2>::type
must be convertible to range_value<SinglePassRange1>::type
.
The range_reference<SinglePassRange2>::type
must be convertible to range_reference<SinglePassRange1>::type
.
rng1
and rng2
must be a model of Single
Pass Range or better.
joined_range<SinglePassRange1, SinglePassRange2>
which is a model of the lesser
of the two range concepts passed.
rng1
and rng2
.
The expression join(irange(0,5), irange(5,10))
would
evaluate to a range representing an integer range [0,10)