Files
mpl/doc/ref/Reference/joint_view.html
Aleksey Gurtovoy a69baa5eae update the docs
[SVN r17836]
2003-03-12 13:29:12 +00:00

61 lines
2.9 KiB
HTML

<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::joint_view</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>joint_view</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename Sequence1
, typename Sequence2
&gt;
struct joint_view
{
<span class="cxx-comment">// unspecified</span>
};
</pre>
<p>
<h3>Description</h3>
<p>
<code>joint_view</code> is a two-sequence view that allows one to operate on a sequence of concatenated elements of sequences <code>Sequence1</code> and <code>Sequence2</code> without actually creating one.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/joint_view.hpp">boost/mpl/joint_view.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Requirement&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>Sequence1</code>, <code>Sequence2</code></td><td>A model of <a href="../Sequence.html">Sequence</a></td><td>Sequences to concatenate. </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef joint_view&lt;Sequence1,Sequence2&gt; s;</code></td><td>A model of <a href="../Sequence.html">Sequence</a></td><td></td><td><code>s</code> prodives iterators to all the elements in the ranges <code>[<a href="../Reference/begin.html">begin</a>&lt;Sequence1&gt;::type,<a href="../Reference/end.html">end</a>&lt;Sequence1&gt;::type)</code>, <code>[<a href="../Reference/begin.html">begin</a>&lt;Sequence2&gt;::type,<a href="../Reference/end.html">end</a>&lt;Sequence2&gt;::type)</code>.</td><td><code><a href="../Reference/size.html">size</a>&lt;s&gt;::type::value == <a href="../Reference/size.html">size</a>&lt; Sequence1 &gt;::type::value + <a href="../Reference/size.html">size</a>&lt; Sequence2 &gt;::type::value</code>. </td></tr>
</table>
<p>
<h3>Complexity</h3>
<p>
Amortized constant time.
<p>
<h3>Example</h3>
<p>
<pre>
typedef joint_view&lt;
<a href="../Reference/range_c.html">range_c</a>&lt;int,0,10&gt;
, <a href="../Reference/range_c.html">range_c</a>&lt;int,10,15&gt;
&gt; numbers;
<p>
typedef <a href="../Reference/range_c.html">range_c</a>&lt;int,0,15&gt; answer;
BOOST_STATIC_ASSERT((<a href="../Reference/equal.html">equal</a>&lt;numbers,answer&gt;::type::value));
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Sequences.html">Sequences</a>, <code><a href="../Reference/transform_view.html">transform_view</a></code>, <code><a href="../Reference/filter_view.html">filter_view</a></code>, <code><a href="../Reference/zip_view.html">zip_view</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:42 am</body></html>