• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>begin</title>
5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.2">
8<link rel="up" href="../metafunctions.html" title="Metafunctions">
9<link rel="prev" href="../metafunctions.html" title="Metafunctions">
10<link rel="next" href="end.html" title="end">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="fusion.sequence.intrinsic.metafunctions.begin"></a><a class="link" href="begin.html" title="begin">begin</a>
28</h5></div></div></div>
29<h6>
30<a name="fusion.sequence.intrinsic.metafunctions.begin.h0"></a>
31            <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.description"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.description">Description</a>
32          </h6>
33<p>
34            Returns the result type of <a class="link" href="../functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a>.
35          </p>
36<h6>
37<a name="fusion.sequence.intrinsic.metafunctions.begin.h1"></a>
38            <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.synopsis"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.synopsis">Synopsis</a>
39          </h6>
40<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">&gt;</span>
41<span class="keyword">struct</span> <span class="identifier">begin</span>
42<span class="special">{</span>
43    <span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
44<span class="special">};</span>
45</pre>
46<div class="table">
47<a name="fusion.sequence.intrinsic.metafunctions.begin.t0"></a><p class="title"><b>Table 1.22. Parameters</b></p>
48<div class="table-contents"><table class="table" summary="Parameters">
49<colgroup>
50<col>
51<col>
52<col>
53</colgroup>
54<thead><tr>
55<th>
56                    <p>
57                      Parameter
58                    </p>
59                  </th>
60<th>
61                    <p>
62                      Requirement
63                    </p>
64                  </th>
65<th>
66                    <p>
67                      Description
68                    </p>
69                  </th>
70</tr></thead>
71<tbody><tr>
72<td>
73                    <p>
74                      <code class="computeroutput"><span class="identifier">Seq</span></code>
75                    </p>
76                  </td>
77<td>
78                    <p>
79                      A model of <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward
80                      Sequence</a>
81                    </p>
82                  </td>
83<td>
84                    <p>
85                      Argument sequence
86                    </p>
87                  </td>
88</tr></tbody>
89</table></div>
90</div>
91<br class="table-break"><h6>
92<a name="fusion.sequence.intrinsic.metafunctions.begin.h2"></a>
93            <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.expression_semantics"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.expression_semantics">Expression
94            Semantics</a>
95          </h6>
96<pre class="programlisting"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span><span class="special">&lt;</span><span class="identifier">Seq</span><span class="special">&gt;::</span><span class="identifier">type</span>
97</pre>
98<p>
99            <span class="bold"><strong>Return type</strong></span>:
100          </p>
101<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
102<li class="listitem">
103                A model of <a class="link" href="../../../iterator/concepts/forward_iterator.html" title="Forward Iterator">Forward
104                Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code>
105                is a <a class="link" href="../../concepts/forward_sequence.html" title="Forward Sequence">Forward
106                Sequence</a> else, <a class="link" href="../../../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional
107                Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code>
108                is a <a class="link" href="../../concepts/bidirectional_sequence.html" title="Bidirectional Sequence">Bidirectional
109                Sequence</a> else, <a class="link" href="../../../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random
110                Access Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code>
111                is a <a class="link" href="../../concepts/random_access_sequence.html" title="Random Access Sequence">Random
112                Access Sequence</a>.
113              </li>
114<li class="listitem">
115                A model of <a class="link" href="../../../iterator/concepts/associative_iterator.html" title="Associative Iterator">Associative
116                Iterator</a> if <code class="computeroutput"><span class="identifier">seq</span></code>
117                is an <a class="link" href="../../concepts/associative_sequence.html" title="Associative Sequence">Associative
118                Sequence</a>.
119              </li>
120</ul></div>
121<p>
122            <span class="bold"><strong>Semantics</strong></span>: Returns the type of an iterator
123            to the first element of <code class="computeroutput"><span class="identifier">Seq</span></code>.
124          </p>
125<h6>
126<a name="fusion.sequence.intrinsic.metafunctions.begin.h3"></a>
127            <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.header"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.header">Header</a>
128          </h6>
129<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">intrinsic</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
130<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">include</span><span class="special">/</span><span class="identifier">begin</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
131</pre>
132<h6>
133<a name="fusion.sequence.intrinsic.metafunctions.begin.h4"></a>
134            <span class="phrase"><a name="fusion.sequence.intrinsic.metafunctions.begin.example"></a></span><a class="link" href="begin.html#fusion.sequence.intrinsic.metafunctions.begin.example">Example</a>
135          </h6>
136<pre class="programlisting"><span class="keyword">typedef</span> <a class="link" href="../../../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
137<span class="keyword">typedef</span> <a class="link" href="begin.html" title="begin"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">begin</span></code></a><span class="special">&lt;</span><span class="identifier">vec</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">it</span><span class="special">;</span>
138<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><a class="link" href="../../../iterator/metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a><span class="special">&lt;</span><span class="identifier">it</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&amp;&gt;))</span>
139</pre>
140</div>
141<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
142<td align="left"></td>
143<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
144      Dan Marsden, Tobias Schwinger<p>
145        Distributed under the Boost Software License, Version 1.0. (See accompanying
146        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
147      </p>
148</div></td>
149</tr></table>
150<hr>
151<div class="spirit-nav">
152<a accesskey="p" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="end.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
153</div>
154</body>
155</html>
156