Full merge from trunk at revision 41356 of entire boost-root tree.

[SVN r41369]
This commit is contained in:
Beman Dawes
2007-11-25 18:07:19 +00:00
parent 6e7e8a12eb
commit ed9cb87ac3
455 changed files with 0 additions and 64511 deletions

View File

@ -1,197 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>category_of</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="tag_of.html" title="tag_of">
<link rel="next" href="deduce.html" title="deduce">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tag_of.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="deduce.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.category_of"></a><a href="category_of.html" title="category_of">category_of</a></h3></div></div></div>
<a name="fusion.support.category_of.description"></a><h4>
<a name="id462954"></a>
<a href="category_of.html#fusion.support.category_of.description">Description</a>
</h4>
<p>
A metafunction that establishes the conceptual classification of a particular
<a href="../sequence.html" title="Sequence">Sequence</a> or <a href="../iterator.html" title="Iterator">Iterator</a>
(see <a href="../iterator/concepts.html" title="Concepts">Iterator Concepts</a> and
<a href="../sequence/concepts.html" title="Concepts">Sequence Concepts</a>).
</p>
<a name="fusion.support.category_of.synopsis"></a><h4>
<a name="id463022"></a>
<a href="category_of.html#fusion.support.category_of.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">category_of</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.category_of.parameters"></a><h4>
<a name="id463153"></a>
<a href="category_of.html#fusion.support.category_of.parameters">Parameters</a>
</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Requirement
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">T</span></tt>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
The type to query.
</p>
</td>
</tr></tbody>
</table></div>
<a name="fusion.support.category_of.expression_semantics"></a><h4>
<a name="id463259"></a>
<a href="category_of.html#fusion.support.category_of.expression_semantics">Expression
Semantics</a>
</h4>
<pre class="programlisting">
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">category_of</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span>
</pre>
<p>
<span class="bold"><b>Return type</b></span>:
</p>
<p>
For Iterators, the return type is derived from one of:
</p>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span>
<span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">incrementable_traversal_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">single_pass_traversal_tag</span>
<span class="special">:</span> <span class="identifier">incrementable_traversal_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">forward_traversal_tag</span>
<span class="special">:</span> <span class="identifier">single_pass_traversal_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">bidirectional_traversal_tag</span>
<span class="special">:</span> <span class="identifier">forward_traversal_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">random_access_traversal_tag</span>
<span class="special">:</span> <span class="identifier">bidirectional_traversal_tag</span> <span class="special">{};</span>
<span class="special">}}</span>
</pre>
<p>
For Sequences, the return type is derived from one of:
</p>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span>
<span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">incrementable_sequence_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">single_pass_sequence_tag</span>
<span class="special">:</span> <span class="identifier">incrementable_sequence_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">forward_traversal_tag</span>
<span class="special">:</span> <span class="identifier">single_pass_sequence_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">bidirectional_traversal_tag</span>
<span class="special">:</span> <span class="identifier">forward_traversal_tag</span> <span class="special">{};</span>
<span class="keyword">struct</span> <span class="identifier">random_access_traversal_tag</span>
<span class="special">:</span> <span class="identifier">bidirectional_traversal_tag</span> <span class="special">{};</span>
<span class="special">}}</span>
</pre>
<p>
And optionally from:
</p>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">fusion</span>
<span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">associative_sequence_tag</span> <span class="special">{};</span>
<span class="special">}}</span>
</pre>
<p>
<span class="bold"><b>Semantics</b></span>: Establishes the conceptual classification
of a particular <a href="../sequence.html" title="Sequence">Sequence</a> or <a href="../iterator.html" title="Iterator">Iterator</a>.
</p>
<a name="fusion.support.category_of.header"></a><h4>
<a name="id463862"></a>
<a href="category_of.html#fusion.support.category_of.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">category_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">category_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.category_of.example"></a><h4>
<a name="id464020"></a>
<a href="category_of.html#fusion.support.category_of.example">Example</a>
</h4>
<pre class="programlisting">
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_base_of</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">category_of</span><span class="special">&lt;</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">list_category</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">category_of</span><span class="special">&lt;</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">vector_category</span><span class="special">;</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">is_base_of</span><span class="special">&lt;</span><span class="identifier">forward_traversal_tag</span><span class="special">,</span> <span class="identifier">list_category</span><span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">is_base_of</span><span class="special">&lt;</span><span class="identifier">random_access_traversal_tag</span><span class="special">,</span> <span class="identifier">vector_category</span><span class="special">&gt;</span> <span class="special">));</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"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tag_of.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="deduce.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,104 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>deduce</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="category_of.html" title="category_of">
<link rel="next" href="deduce_sequence.html" title="deduce_sequence">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="category_of.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="deduce_sequence.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.deduce"></a><a href="deduce.html" title="deduce">deduce</a></h3></div></div></div>
<a name="fusion.support.deduce.description"></a><h4>
<a name="id464340"></a>
<a href="deduce.html#fusion.support.deduce.description">Description</a>
</h4>
<p>
Metafunction to apply <a href="../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element
conversion</em></span></a> to the full argument type.
</p>
<p>
It removes references to <tt class="computeroutput"><span class="keyword">const</span></tt>,
references to array types are kept, even if the array is <tt class="computeroutput"><span class="keyword">const</span></tt>.
Reference wrappers are removed (see <a href="../notes.html#fusion.notes.boost__ref"><tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></tt></a>).
</p>
<a name="fusion.support.deduce.header"></a><h4>
<a name="id464439"></a>
<a href="deduce.html#fusion.support.deduce.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">deduce</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">deduce</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.deduce.synopsis"></a><h4>
<a name="id464595"></a>
<a href="deduce.html#fusion.support.deduce.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">deduce</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.deduce.example"></a><h4>
<a name="id464726"></a>
<a href="deduce.html#fusion.support.deduce.example">Example</a>
</h4>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">holder</span>
<span class="special">{</span>
<span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">deduce</span><span class="special">&lt;</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;&gt;::</span><span class="identifier">type</span> <span class="identifier">element</span><span class="special">;</span>
<span class="identifier">holder</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">a</span><span class="special">)</span>
<span class="special">:</span> <span class="identifier">element</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
<span class="special">{</span> <span class="special">}</span>
<span class="special">};</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="identifier">holder</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">make_holder</span><span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">a</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">holder</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;(</span><span class="identifier">a</span><span class="special">);</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.deduce.see_also"></a><h4>
<a name="id465091"></a>
<a href="deduce.html#fusion.support.deduce.see_also">See also</a>
</h4>
<div class="itemizedlist"><ul type="disc"><li><a href="deduce_sequence.html" title="deduce_sequence"><tt class="computeroutput"><span class="identifier">deduce_sequence</span></tt></a></li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="category_of.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="deduce_sequence.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,106 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>deduce_sequence</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="deduce.html" title="deduce">
<link rel="next" href="pair.html" title="pair">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="deduce.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="pair.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.deduce_sequence"></a><a href="deduce_sequence.html" title="deduce_sequence">deduce_sequence</a></h3></div></div></div>
<a name="fusion.support.deduce_sequence.description"></a><h4>
<a name="id465160"></a>
<a href="deduce_sequence.html#fusion.support.deduce_sequence.description">Description</a>
</h4>
<p>
Applies <a href="../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element
conversion</em></span></a> to each element in a <a href="../sequence/concepts/forward_sequence.html" title="Forward
Sequence">Forward
Sequence</a>. The resulting type is a <a href="../sequence/concepts/random_access_sequence.html" title="Random
Access Sequence">Random
Access Sequence</a> that provides a converting constructor accepting the
original type as its argument.
</p>
<a name="fusion.support.deduce_sequence.header"></a><h4>
<a name="id465222"></a>
<a href="deduce_sequence.html#fusion.support.deduce_sequence.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">deduce_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">deduce_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.deduce_sequence.synopsis"></a><h4>
<a name="id465380"></a>
<a href="deduce_sequence.html#fusion.support.deduce_sequence.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Sequence</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">deduce_sequence</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.deduce_sequence.example"></a><h4>
<a name="id465512"></a>
<a href="deduce_sequence.html#fusion.support.deduce_sequence.example">Example</a>
</h4>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">holder</span>
<span class="special">{</span>
<span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">deduce_sequence</span><span class="special">&lt;</span><span class="identifier">Seq</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">element</span><span class="special">;</span>
<span class="identifier">holder</span><span class="special">(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">a</span><span class="special">)</span>
<span class="special">:</span> <span class="identifier">element</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
<span class="special">{</span> <span class="special">}</span>
<span class="special">};</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">&gt;</span>
<span class="identifier">holder</span><span class="special">&lt;</span> <a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&amp;,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&amp;&gt;</span> <span class="special">&gt;</span>
<span class="identifier">make_holder</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">a0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">a1</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&amp;,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&amp;&gt;</span> <span class="identifier">arg_vec_t</span><span class="special">;</span>
<span class="keyword">return</span> <span class="identifier">holder</span><span class="special">&lt;</span><span class="identifier">arg_vec_t</span><span class="special">&gt;(</span> <span class="identifier">arg_vec_t</span><span class="special">(</span><span class="identifier">a0</span><span class="special">,</span><span class="identifier">a1</span><span class="special">)</span> <span class="special">);</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.deduce_sequence.see_also"></a><h4>
<a name="id466071"></a>
<a href="deduce_sequence.html#fusion.support.deduce_sequence.see_also">See also</a>
</h4>
<div class="itemizedlist"><ul type="disc"><li><a href="deduce.html" title="deduce"><tt class="computeroutput"><span class="identifier">deduce</span></tt></a></li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="deduce.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="pair.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,151 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>is_sequence</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="../support.html" title="Support">
<link rel="next" href="is_view.html" title="is_view">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../support.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_view.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.is_sequence"></a><a href="is_sequence.html" title="is_sequence">is_sequence</a></h3></div></div></div>
<a name="fusion.support.is_sequence.description"></a><h4>
<a name="id459701"></a>
<a href="is_sequence.html#fusion.support.is_sequence.description">Description</a>
</h4>
<p>
Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
if a certain type <tt class="computeroutput"><span class="identifier">T</span></tt> is a
conforming Fusion <a href="../sequence.html" title="Sequence">Sequence</a>, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
otherwise. This may be specialized to accomodate clients which provide Fusion
conforming sequences.
</p>
<a name="fusion.support.is_sequence.synopsis"></a><h4>
<a name="id459795"></a>
<a href="is_sequence.html#fusion.support.is_sequence.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">is_sequence</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.is_sequence.parameters"></a><h4>
<a name="id459926"></a>
<a href="is_sequence.html#fusion.support.is_sequence.parameters">Parameters</a>
</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Requirement
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">T</span></tt>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
The type to query.
</p>
</td>
</tr></tbody>
</table></div>
<a name="fusion.support.is_sequence.expression_semantics"></a><h4>
<a name="id460032"></a>
<a href="is_sequence.html#fusion.support.is_sequence.expression_semantics">Expression
Semantics</a>
</h4>
<pre class="programlisting">
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span>
</pre>
<p>
<span class="bold"><b>Return type</b></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
Boolean Constant</a>.
</p>
<p>
<span class="bold"><b>Semantics</b></span>: Metafunction that evaluates to
<tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt> if a certain type <tt class="computeroutput"><span class="identifier">T</span></tt>
is a conforming Fusion sequence, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
otherwise.
</p>
<a name="fusion.support.is_sequence.header"></a><h4>
<a name="id460202"></a>
<a href="is_sequence.html#fusion.support.is_sequence.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">is_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">is_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.is_sequence.example"></a><h4>
<a name="id460359"></a>
<a href="is_sequence.html#fusion.support.is_sequence.example">Example</a>
</h4>
<pre class="programlisting">
<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">is_sequence</span><span class="special">&lt;</span> <span class="keyword">int</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special">&lt;</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special">&lt;</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special">&lt;</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_sequence</span><span class="special">&lt;</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">));</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"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../support.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="is_view.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,155 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>is_view</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="is_sequence.html" title="is_sequence">
<link rel="next" href="tag_of.html" title="tag_of">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_sequence.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tag_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.is_view"></a><a href="is_view.html" title="is_view">is_view</a></h3></div></div></div>
<a name="fusion.support.is_view.description"></a><h4>
<a name="id460805"></a>
<a href="is_view.html#fusion.support.is_view.description">Description</a>
</h4>
<p>
Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
if a certain type <tt class="computeroutput"><span class="identifier">T</span></tt> is a
conforming Fusion <a href="../view.html" title="View">View</a>, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
otherwise. A view is a specialized sequence that does not actually contain
data. Views hold sequences which may be other views. In general, views are
held by other views by value, while non-views are held by other views by
reference. <tt class="computeroutput"><span class="identifier">is_view</span></tt> may be
specialized to accomodate clients providing Fusion conforming views.
</p>
<a name="fusion.support.is_view.synopsis"></a><h4>
<a name="id460916"></a>
<a href="is_view.html#fusion.support.is_view.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">is_view</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.is_view.parameters"></a><h4>
<a name="id461047"></a>
<a href="is_view.html#fusion.support.is_view.parameters">Parameters</a>
</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Requirement
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">T</span></tt>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
The type to query.
</p>
</td>
</tr></tbody>
</table></div>
<a name="fusion.support.is_view.expression_semantics"></a><h4>
<a name="id461153"></a>
<a href="is_view.html#fusion.support.is_view.expression_semantics">Expression Semantics</a>
</h4>
<pre class="programlisting">
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span>
</pre>
<p>
<span class="bold"><b>Return type</b></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
Boolean Constant</a>.
</p>
<p>
<span class="bold"><b>Semantics</b></span>: Metafunction that evaluates to
<tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt> if a certain type <tt class="computeroutput"><span class="identifier">T</span></tt>
is a conforming Fusion view, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
otherwise.
</p>
<a name="fusion.support.is_view.header"></a><h4>
<a name="id461323"></a>
<a href="is_view.html#fusion.support.is_view.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">is_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">is_view</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.is_view.example"></a><h4>
<a name="id461479"></a>
<a href="is_view.html#fusion.support.is_view.example">Example</a>
</h4>
<pre class="programlisting">
<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_MPL_ASSERT_NOT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">));</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">_</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">*,</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">long</span><span class="special">*,</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">vector_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <a href="../view/filter_view.html" title="filter_view"><tt class="computeroutput"><span class="identifier">filter_view</span></tt></a><span class="special">&lt;</span><span class="identifier">vector_type</span><span class="special">,</span> <span class="identifier">is_pointer</span><span class="special">&lt;</span><span class="identifier">_</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">filter_view_type</span><span class="special">;</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_view</span><span class="special">&lt;</span><span class="identifier">filter_view_type</span><span class="special">&gt;</span> <span class="special">));</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"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_sequence.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tag_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,342 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>pair</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="deduce_sequence.html" title="deduce_sequence">
<link rel="next" href="../iterator.html" title="Iterator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="deduce_sequence.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../iterator.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.pair"></a><a href="pair.html" title="pair">pair</a></h3></div></div></div>
<a name="fusion.support.pair.description"></a><h4>
<a name="id466136"></a>
<a href="pair.html#fusion.support.pair.description">Description</a>
</h4>
<p>
Fusion <tt class="computeroutput"><span class="identifier">pair</span></tt> type is a half
runtime pair. A half runtime pair is similar to a <a href="../adapted/std__pair.html" title="std::pair"><tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></tt></a>,
but, unlike <a href="../adapted/std__pair.html" title="std::pair"><tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></tt></a>,
the first type does not have data. It is used as elements in <span class="underline">_map</span>_s,
for example.
</p>
<a name="fusion.support.pair.synopsis"></a><h4>
<a name="id466241"></a>
<a href="pair.html#fusion.support.pair.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">pair</span><span class="special">;</span>
<span class="keyword">namespace</span> <span class="identifier">result_of</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">first</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">second</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">make_pair</span><span class="special">;</span>
<span class="special">}</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">First</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Second</span><span class="special">&gt;</span>
<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">&lt;</span><span class="identifier">First</span><span class="special">,</span><span class="identifier">Second</span><span class="special">&gt;::</span><span class="identifier">type</span>
<span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">Second</span> <span class="keyword">const</span> <span class="special">&amp;);</span>
</pre>
<a name="fusion.support.pair.template_parameters"></a><h4>
<a name="id466684"></a>
<a href="pair.html#fusion.support.pair.template_parameters">Template parameters</a>
</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
First
</p>
</td>
<td>
<p>
The first type. This is purely a type. No data is held.
</p>
</td>
</tr>
<tr>
<td>
<p>
Second
</p>
</td>
<td>
<p>
The second type. This contains data.
</p>
</td>
</tr>
</tbody>
</table></div>
<div class="variablelist">
<p class="title"><b>Notation</b></p>
<dl>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">P</span></tt></span></dt>
<dd><p>
Fusion pair type
</p></dd>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">p</span></tt>,
<tt class="computeroutput"><span class="identifier">p2</span></tt></span></dt>
<dd><p>
Fusion pairs
</p></dd>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">F</span></tt>,
<tt class="computeroutput"><span class="identifier">S</span></tt></span></dt>
<dd><p>
Arbitrary types
</p></dd>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">s</span></tt></span></dt>
<dd><p>
Value of type <tt class="computeroutput"><span class="identifier">S</span></tt>
</p></dd>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">o</span></tt></span></dt>
<dd><p>
Output stream
</p></dd>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">i</span></tt></span></dt>
<dd><p>
Input stream
</p></dd>
</dl>
</div>
<a name="fusion.support.pair.expression_semantics"></a><h4>
<a name="id466964"></a>
<a href="pair.html#fusion.support.pair.expression_semantics">Expression Semantics</a>
</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">first_type</span></tt>
</p>
</td>
<td>
<p>
The type of the first template parameter, <tt class="computeroutput"><span class="identifier">F</span></tt>,
equivalent to <tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">first</span><span class="special">&lt;</span><span class="identifier">P</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">second_type</span></tt>
</p>
</td>
<td>
<p>
The type of the second template parameter, <tt class="computeroutput"><span class="identifier">S</span></tt>,
equivalent to <tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">second</span><span class="special">&lt;</span><span class="identifier">P</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">P</span><span class="special">()</span></tt>
</p>
</td>
<td>
<p>
Default construction.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">P</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></tt>
</p>
</td>
<td>
<p>
Construct a pair given value for the second type, <tt class="computeroutput"><span class="identifier">s</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">P</span><span class="special">(</span><span class="identifier">p2</span><span class="special">)</span></tt>
</p>
</td>
<td>
<p>
Copy constructs a pair from another pair, <tt class="computeroutput"><span class="identifier">p2</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">p</span> <span class="special">=</span>
<span class="identifier">p2</span></tt>
</p>
</td>
<td>
<p>
Assigns a pair, p1, from another pair, <tt class="computeroutput"><span class="identifier">p2</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
make_pair&lt;F&gt;(s)
</p>
</td>
<td>
<p>
Make a pair given the first type, <tt class="computeroutput"><span class="identifier">F</span></tt>,
and a value for the second type, <tt class="computeroutput"><span class="identifier">s</span></tt>.
The second type assumes the type of <tt class="computeroutput"><span class="identifier">s</span></tt>
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">o</span> <span class="special">&lt;&lt;</span>
<span class="identifier">p</span></tt>
</p>
</td>
<td>
<p>
Output <tt class="computeroutput"><span class="identifier">p</span></tt> to output
stream, <tt class="computeroutput"><span class="identifier">o</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">i</span> <span class="special">&gt;&gt;</span>
<span class="identifier">p</span></tt>
</p>
</td>
<td>
<p>
Input <tt class="computeroutput"><span class="identifier">p</span></tt> from input
stream, <tt class="computeroutput"><span class="identifier">i</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">p</span> <span class="special">==</span>
<span class="identifier">p2</span></tt>
</p>
</td>
<td>
<p>
Tests two pairs for equality.
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">p</span> <span class="special">!=</span>
<span class="identifier">p2</span></tt>
</p>
</td>
<td>
<p>
Tests two pairs for inequality.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="fusion.support.pair.header"></a><h4>
<a name="id467677"></a>
<a href="pair.html#fusion.support.pair.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.pair.example"></a><h4>
<a name="id467833"></a>
<a href="pair.html#fusion.support.pair.example">Example</a>
</h4>
<pre class="programlisting">
<span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">p</span><span class="special">(</span><span class="char">'X'</span><span class="special">);</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">p</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">make_pair</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="char">'X'</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="identifier">assert</span><span class="special">((</span><span class="identifier">p</span> <span class="special">==</span> <span class="identifier">make_pair</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;(</span><span class="char">'X'</span><span class="special">)));</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"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="deduce_sequence.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../iterator.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@ -1,151 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>tag_of</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../support.html" title="Support">
<link rel="prev" href="is_view.html" title="is_view">
<link rel="next" href="category_of.html" title="category_of">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<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>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_view.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="category_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="fusion.support.tag_of"></a><a href="tag_of.html" title="tag_of">tag_of</a></h3></div></div></div>
<a name="fusion.support.tag_of.description"></a><h4>
<a name="id461929"></a>
<a href="tag_of.html#fusion.support.tag_of.description">Description</a>
</h4>
<p>
All conforming Fusion sequences and iterators have an associated tag type.
The purpose of the tag is to enable <a href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
dispatching</em></span></a> from <a href="../sequence/intrinsic.html" title="Intrinsic">Intrinsic</a>
functions to implementations appropriate for the type.
</p>
<p>
This metafunction may be specialized to accomodate clients providing Fusion
conforming sequences.
</p>
<a name="fusion.support.tag_of.synopsis"></a><h4>
<a name="id461989"></a>
<a href="tag_of.html#fusion.support.tag_of.synopsis">Synopsis</a>
</h4>
<pre class="programlisting">
<span class="keyword">namespace</span> <span class="identifier">traits</span>
<span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">tag_of</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
<span class="special">}</span>
</pre>
<a name="fusion.support.tag_of.parameters"></a><h4>
<a name="id462118"></a>
<a href="tag_of.html#fusion.support.tag_of.parameters">Parameters</a>
</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Requirement
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">T</span></tt>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
The type to query.
</p>
</td>
</tr></tbody>
</table></div>
<a name="fusion.support.tag_of.expression_semantics"></a><h4>
<a name="id462224"></a>
<a href="tag_of.html#fusion.support.tag_of.expression_semantics">Expression Semantics</a>
</h4>
<pre class="programlisting">
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">tag</span><span class="special">;</span>
</pre>
<p>
<span class="bold"><b>Return type</b></span>: Any type.
</p>
<p>
<span class="bold"><b>Semantics</b></span>: Returns the tag type associated
with <tt class="computeroutput"><span class="identifier">T</span></tt>.
</p>
<a name="fusion.support.tag_of.header"></a><h4>
<a name="id462343"></a>
<a href="tag_of.html#fusion.support.tag_of.header">Header</a>
</h4>
<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">support</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<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">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.support.tag_of.example"></a><h4>
<a name="id462499"></a>
<a href="tag_of.html#fusion.support.tag_of.example">Example</a>
</h4>
<pre class="programlisting">
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special">&lt;</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">tag1</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special">&lt;</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">tag2</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special">&lt;</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">tag3</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special">&lt;</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">tag4</span><span class="special">;</span>
<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><span class="identifier">tag1</span><span class="special">,</span> <span class="identifier">tag2</span><span class="special">&gt;));</span>
<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><span class="identifier">tag3</span><span class="special">,</span> <span class="identifier">tag4</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"><div class="copyright-footer">Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_view.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../support.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="category_of.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>