Files
boost_fusion/doc/html/fusion/sequences.html

190 lines
13 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sequences</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="prev" href="iterators/metafunctions/advance_c.html" title="advance_c">
<link rel="next" href="sequences/concepts.html" title="Concepts">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="iterators/metafunctions/advance_c.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="sequences/concepts.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="fusion.sequences"></a><a href="sequences.html" title="Sequences">Sequences</a></h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="sequences/concepts.html">Concepts</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/concepts/forward_sequence.html">Forward
Sequence</a></span></dt>
<dt><span class="section"><a href="sequences/concepts/bidirectional_sequence.html">Bidirectional
Sequence</a></span></dt>
<dt><span class="section"><a href="sequences/concepts/random_access_sequence.html">Random
Access Sequence</a></span></dt>
<dt><span class="section"><a href="sequences/concepts/associative_sequence.html">Associative
Sequence</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/containers.html">Containers</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/containers/vector.html">vector</a></span></dt>
<dt><span class="section"><a href="sequences/containers/cons.html">cons</a></span></dt>
<dt><span class="section"><a href="sequences/containers/list.html">list</a></span></dt>
<dt><span class="section"><a href="sequences/containers/set.html">set</a></span></dt>
<dt><span class="section"><a href="sequences/containers/map.html">map</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/views.html">Views</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/views/single_view.html">single_view</a></span></dt>
<dt><span class="section"><a href="sequences/views/filter_view.html">filter_view</a></span></dt>
<dt><span class="section"><a href="sequences/views/iterator_range.html">iterator_range</a></span></dt>
<dt><span class="section"><a href="sequences/views/joint_view.html">joint_view</a></span></dt>
<dt><span class="section"><a href="sequences/views/zip_view.html">zip_view</a></span></dt>
<dt><span class="section"><a href="sequences/views/transform_view.html">transform_view</a></span></dt>
<dt><span class="section"><a href="sequences/views/reverse_view.html">reverse_view</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/adapted.html">Adapted</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/adapted/std__pair.html">std::pair</a></span></dt>
<dt><span class="section"><a href="sequences/adapted/mpl_sequence.html">mpl sequence</a></span></dt>
<dt><span class="section"><a href="sequences/adapted/boost__array.html">boost::array</a></span></dt>
<dt><span class="section"><a href="sequences/adapted/boost__tuple.html">boost::tuple</a></span></dt>
<dt><span class="section"><a href="sequences/adapted/boost__variant.html">boost::variant</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/intrinsics.html">Intrinsics</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/intrinsics/functions.html">Functions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/intrinsics/functions/begin.html">begin</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/end.html">end</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/empty.html">empty</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/front.html">front</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/back.html">back</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/size.html">size</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/at.html">at</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/at_c.html">at_c</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/has_key.html">has_key</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/functions/at_key.html">at_key</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions.html">Metafunctions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/begin.html">begin</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/end.html">end</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/empty.html">empty</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/front.html">front</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/back.html">back</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/size.html">size</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/at.html">at</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/at_c.html">at_c</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/value_at.html">value_at</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/value_at_c.html">value_at_c</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/has_key.html">has_key</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/at_key.html">at_key</a></span></dt>
<dt><span class="section"><a href="sequences/intrinsics/metafunctions/value_at_key.html">value_at_key</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="sequences/generation.html">Generation</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/generation/functions.html">Functions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/generation/functions/make_list.html">make_list</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/make_cons.html">make_cons</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/make_vector.html">make_vector</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/make_set.html">make_set</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/make_map.html">make_map</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/tiers.html">Tiers</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/list_tie.html">list_tie</a></span></dt>
<dt><span class="section"><a href="sequences/generation/functions/vector_tie.html">vector_tie</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/generation/metafunctions.html">MetaFunctions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/generation/metafunctions/make_list.html">make_list</a></span></dt>
<dt><span class="section"><a href="sequences/generation/metafunctions/make_cons.html">make_cons</a></span></dt>
<dt><span class="section"><a href="sequences/generation/metafunctions/make_vector.html">make_vector</a></span></dt>
<dt><span class="section"><a href="sequences/generation/metafunctions/make_set.html">make_set</a></span></dt>
<dt><span class="section"><a href="sequences/generation/metafunctions/make_map.html">make_map</a></span></dt>
<dt><span class="section"><a href="sequences/generation/metafunctions/list_tie.html">list_tie</a></span></dt>
<dt><span class="section"><a href="sequences/generation/metafunctions/vector_tie.html">vector_tie</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="sequences/conversion.html">Conversion</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/conversion/functions.html">Functions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/conversion/functions/as_list.html">as_list</a></span></dt>
<dt><span class="section"><a href="sequences/conversion/functions/as_vector.html">as_vector</a></span></dt>
<dt><span class="section"><a href="sequences/conversion/functions/as_set.html">as_set</a></span></dt>
<dt><span class="section"><a href="sequences/conversion/functions/as_map.html">as_map</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/conversion/metafunctions.html">Metafunctions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/conversion/metafunctions/as_list.html">as_list</a></span></dt>
<dt><span class="section"><a href="sequences/conversion/metafunctions/as_vector.html">as_vector</a></span></dt>
<dt><span class="section"><a href="sequences/conversion/metafunctions/as_set.html">as_set</a></span></dt>
<dt><span class="section"><a href="sequences/conversion/metafunctions/as_map.html">as_map</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="sequences/operators.html">Operators</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/operators/i_o.html">I/O</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/operators/i_o/in.html">in</a></span></dt>
<dt><span class="section"><a href="sequences/operators/i_o/out.html">out</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="sequences/operators/comparison.html">Comparison</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="sequences/operators/comparison/equal.html">equal</a></span></dt>
<dt><span class="section"><a href="sequences/operators/comparison/not_equal.html">not
equal</a></span></dt>
<dt><span class="section"><a href="sequences/operators/comparison/less_than.html">less
than</a></span></dt>
<dt><span class="section"><a href="sequences/operators/comparison/less_than_equal.html">less
than equal</a></span></dt>
<dt><span class="section"><a href="sequences/operators/comparison/greater_than.html">greater
than</a></span></dt>
<dt><span class="section"><a href="sequences/operators/comparison/greater_than_equal.html">greater
than equal</a></span></dt>
</dl></dd>
</dl></dd>
</dl></div>
<p>
Like <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>, the
Sequence is a fundamental concept in Fusion. A Sequence may or may not actually
store or contain data. <a href="sequences/containers.html" title="Containers">Containers</a>
are sequences that hold data. <a href="sequences/views.html" title="Views">Views</a>,
on the other hand, are sequences that do not store any data. Instead, they
are proxies that impart an alternative presentation over another sequence.
All models of Sequence have an associated <a href="iterators.html" title="Iterators">Iterator</a>
type that can be used to iterate through the Sequence's elements.
</p>
<a name="fusion.sequences.header"></a><h3>
<a name="id962041"></a>
<a href="sequences.html#fusion.sequences.header">Header</a>
</h3>
<pre class="programlisting">
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="iterators/metafunctions/advance_c.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="sequences/concepts.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>