forked from boostorg/fusion
Sync from trunk (except adapt class)
[SVN r56714]
This commit is contained in:
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,24 +22,27 @@
|
||||
<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" title="category_of">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.category_of"></a><a class="link" href="category_of.html" title="category_of">category_of</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.category_of.description"></a><h5>
|
||||
<a name="id552998"></a>
|
||||
<a class="link" href="category_of.html#fusion.support.category_of.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.category_of.description"></a><h4>
|
||||
<a name="id415166"></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 class="link" href="../sequence.html" title="Sequence">Sequence</a> or <a class="link" href="../iterator.html" title="Iterator">Iterator</a>
|
||||
(see <a class="link" href="../iterator/concepts.html" title="Concepts">Iterator Concepts</a> and
|
||||
<a class="link" href="../sequence/concepts.html" title="Concepts">Sequence Concepts</a>).
|
||||
<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><h5>
|
||||
<a name="id553034"></a>
|
||||
<a class="link" href="category_of.html#fusion.support.category_of.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.category_of.synopsis"></a><h4>
|
||||
<a name="id415216"></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"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
@ -49,10 +52,10 @@
|
||||
<span class="special">};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.category_of.parameters"></a><h5>
|
||||
<a name="id553127"></a>
|
||||
<a class="link" href="category_of.html#fusion.support.category_of.parameters">Parameters</a>
|
||||
</h5>
|
||||
<a name="fusion.support.category_of.parameters"></a><h4>
|
||||
<a name="id415332"></a>
|
||||
<a href="category_of.html#fusion.support.category_of.parameters">Parameters</a>
|
||||
</h4>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -60,49 +63,37 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Parameter
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Requirement
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">T</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Any type
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type to query.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.support.category_of.expression_semantics"></a><h5>
|
||||
<a name="id553210"></a>
|
||||
<a class="link" href="category_of.html#fusion.support.category_of.expression_semantics">Expression
|
||||
<a name="fusion.support.category_of.expression_semantics"></a><h4>
|
||||
<a name="id415431"></a>
|
||||
<a href="category_of.html#fusion.support.category_of.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
</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"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">category</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Return type</strong></span>:
|
||||
<span class="bold"><b>Return type</b></span>:
|
||||
</p>
|
||||
<p>
|
||||
For Iterators, the return type is derived from one of:
|
||||
@ -153,23 +144,23 @@
|
||||
<span class="special">}}</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Semantics</strong></span>: Establishes the conceptual classification
|
||||
of a particular <a class="link" href="../sequence.html" title="Sequence">Sequence</a> or <a class="link" href="../iterator.html" title="Iterator">Iterator</a>.
|
||||
<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><h5>
|
||||
<a name="id553651"></a>
|
||||
<a class="link" href="category_of.html#fusion.support.category_of.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.category_of.header"></a><h4>
|
||||
<a name="id415978"></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"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.category_of.example"></a><h5>
|
||||
<a name="id553759"></a>
|
||||
<a class="link" href="category_of.html#fusion.support.category_of.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.support.category_of.example"></a><h4>
|
||||
<a name="id416116"></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"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><></span> <span class="special">>::</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"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">vector_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"><</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special"><></span> <span class="special">>::</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"><</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><></span> <span class="special">>::</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"><</span><span class="identifier">forward_traversal_tag</span><span class="special">,</span> <span class="identifier">list_category</span><span class="special">></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"><</span><span class="identifier">random_access_traversal_tag</span><span class="special">,</span> <span class="identifier">vector_category</span><span class="special">></span> <span class="special">));</span>
|
||||
</pre>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,34 +22,37 @@
|
||||
<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" title="deduce">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.deduce"></a><a class="link" href="deduce.html" title="deduce">deduce</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.deduce.description"></a><h5>
|
||||
<a name="id553980"></a>
|
||||
<a class="link" href="deduce.html#fusion.support.deduce.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.deduce.description"></a><h4>
|
||||
<a name="id416406"></a>
|
||||
<a href="deduce.html#fusion.support.deduce.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
Metafunction to apply <a class="link" href="../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element
|
||||
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 <code class="computeroutput"><span class="keyword">const</span></code>,
|
||||
references to array types are kept, even if the array is <code class="computeroutput"><span class="keyword">const</span></code>.
|
||||
Reference wrappers are removed (see <a class="link" href="../notes.html#fusion.notes.boost__ref"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span></code></a>).
|
||||
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><h5>
|
||||
<a name="id554038"></a>
|
||||
<a class="link" href="deduce.html#fusion.support.deduce.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.deduce.header"></a><h4>
|
||||
<a name="id416503"></a>
|
||||
<a href="deduce.html#fusion.support.deduce.header">Header</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.deduce.synopsis"></a><h5>
|
||||
<a name="id554146"></a>
|
||||
<a class="link" href="deduce.html#fusion.support.deduce.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.deduce.synopsis"></a><h4>
|
||||
<a name="id416658"></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"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
@ -59,10 +62,10 @@
|
||||
<span class="special">};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.deduce.example"></a><h5>
|
||||
<a name="id554239"></a>
|
||||
<a class="link" href="deduce.html#fusion.support.deduce.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.support.deduce.example"></a><h4>
|
||||
<a name="id416787"></a>
|
||||
<a href="deduce.html#fusion.support.deduce.example">Example</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">holder</span>
|
||||
<span class="special">{</span>
|
||||
@ -79,11 +82,11 @@
|
||||
<span class="keyword">return</span> <span class="identifier">holder</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">a</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.deduce.see_also"></a><h5>
|
||||
<a name="id554507"></a>
|
||||
<a class="link" href="deduce.html#fusion.support.deduce.see_also">See also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><a class="link" href="deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a></li></ul></div>
|
||||
<a name="fusion.support.deduce.see_also"></a><h4>
|
||||
<a name="id417150"></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>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,32 +22,37 @@
|
||||
<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" title="deduce_sequence">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.deduce_sequence"></a><a class="link" href="deduce_sequence.html" title="deduce_sequence">deduce_sequence</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.deduce_sequence.description"></a><h5>
|
||||
<a name="id554548"></a>
|
||||
<a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.deduce_sequence.description"></a><h4>
|
||||
<a name="id417217"></a>
|
||||
<a href="deduce_sequence.html#fusion.support.deduce_sequence.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
Applies <a class="link" href="../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element
|
||||
conversion</em></span></a> to each element in a <a class="link" href="../sequence/concepts/forward_sequence.html" title="Forward Sequence">Forward
|
||||
Sequence</a>. The resulting type is a <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random
|
||||
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><h5>
|
||||
<a name="id554580"></a>
|
||||
<a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.deduce_sequence.header"></a><h4>
|
||||
<a name="id417277"></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"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.deduce_sequence.synopsis"></a><h5>
|
||||
<a name="id554688"></a>
|
||||
<a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.deduce_sequence.synopsis"></a><h4>
|
||||
<a name="id417432"></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"><</span><span class="keyword">class</span> <span class="identifier">Sequence</span><span class="special">></span>
|
||||
@ -57,10 +62,10 @@
|
||||
<span class="special">};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.deduce_sequence.example"></a><h5>
|
||||
<a name="id554782"></a>
|
||||
<a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.support.deduce_sequence.example"></a><h4>
|
||||
<a name="id417561"></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"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">holder</span>
|
||||
<span class="special">{</span>
|
||||
@ -72,18 +77,18 @@
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">holder</span><span class="special"><</span> <a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&></span> <span class="special">></span>
|
||||
<span class="identifier">holder</span><span class="special"><</span> <a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&></span> <span class="special">></span>
|
||||
<span class="identifier">make_holder</span><span class="special">(</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a0</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">a1</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<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"><</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&></span> <span class="identifier">arg_vec_t</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"><</span><span class="identifier">T0</span> <span class="keyword">const</span> <span class="special">&,</span> <span class="identifier">T1</span> <span class="keyword">const</span> <span class="special">&></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"><</span><span class="identifier">arg_vec_t</span><span class="special">>(</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><h5>
|
||||
<a name="id555192"></a>
|
||||
<a class="link" href="deduce_sequence.html#fusion.support.deduce_sequence.see_also">See also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><a class="link" href="deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li></ul></div>
|
||||
<a name="fusion.support.deduce_sequence.see_also"></a><h4>
|
||||
<a name="id418120"></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>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,25 +22,28 @@
|
||||
<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" title="is_sequence">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.is_sequence"></a><a class="link" href="is_sequence.html" title="is_sequence">is_sequence</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.is_sequence.description"></a><h5>
|
||||
<a name="id549643"></a>
|
||||
<a class="link" href="is_sequence.html#fusion.support.is_sequence.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.is_sequence.description"></a><h4>
|
||||
<a name="id412300"></a>
|
||||
<a href="is_sequence.html#fusion.support.is_sequence.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
|
||||
if a certain type <code class="computeroutput"><span class="identifier">T</span></code> is a
|
||||
conforming Fusion <a class="link" href="../sequence.html" title="Sequence">Sequence</a>, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
|
||||
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><h5>
|
||||
<a name="id549701"></a>
|
||||
<a class="link" href="is_sequence.html#fusion.support.is_sequence.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_sequence.synopsis"></a><h4>
|
||||
<a name="id412380"></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"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
@ -50,10 +53,10 @@
|
||||
<span class="special">};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.is_sequence.parameters"></a><h5>
|
||||
<a name="id549794"></a>
|
||||
<a class="link" href="is_sequence.html#fusion.support.is_sequence.parameters">Parameters</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_sequence.parameters"></a><h4>
|
||||
<a name="id412496"></a>
|
||||
<a href="is_sequence.html#fusion.support.is_sequence.parameters">Parameters</a>
|
||||
</h4>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -61,74 +64,62 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Parameter
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Requirement
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">T</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Any type
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type to query.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.support.is_sequence.expression_semantics"></a><h5>
|
||||
<a name="id549877"></a>
|
||||
<a class="link" href="is_sequence.html#fusion.support.is_sequence.expression_semantics">Expression
|
||||
<a name="fusion.support.is_sequence.expression_semantics"></a><h4>
|
||||
<a name="id412595"></a>
|
||||
<a href="is_sequence.html#fusion.support.is_sequence.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
</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"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
<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"><strong>Semantics</strong></span>: Metafunction that evaluates to
|
||||
<code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> if a certain type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is a conforming Fusion sequence, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
|
||||
<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><h5>
|
||||
<a name="id549991"></a>
|
||||
<a class="link" href="is_sequence.html#fusion.support.is_sequence.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_sequence.header"></a><h4>
|
||||
<a name="id412744"></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"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.is_sequence.example"></a><h5>
|
||||
<a name="id551192"></a>
|
||||
<a class="link" href="is_sequence.html#fusion.support.is_sequence.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_sequence.example"></a><h4>
|
||||
<a name="id412883"></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"><</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></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"><</span> <span class="keyword">int</span> <span class="special">></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"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><></span> <span class="special">></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"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></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"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="special">></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"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></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"><</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special"><></span> <span class="special">></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"><</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></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"><</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><></span> <span class="special">></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"><</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="special">));</span>
|
||||
</pre>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,28 +22,31 @@
|
||||
<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" title="is_view">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.is_view"></a><a class="link" href="is_view.html" title="is_view">is_view</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.is_view.description"></a><h5>
|
||||
<a name="id551504"></a>
|
||||
<a class="link" href="is_view.html#fusion.support.is_view.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.is_view.description"></a><h4>
|
||||
<a name="id413272"></a>
|
||||
<a href="is_view.html#fusion.support.is_view.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
|
||||
if a certain type <code class="computeroutput"><span class="identifier">T</span></code> is a
|
||||
conforming Fusion <a class="link" href="../view.html" title="View">View</a>, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
|
||||
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. <code class="computeroutput"><span class="identifier">is_view</span></code> may be
|
||||
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><h5>
|
||||
<a name="id551569"></a>
|
||||
<a class="link" href="is_view.html#fusion.support.is_view.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_view.synopsis"></a><h4>
|
||||
<a name="id413366"></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"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
@ -53,10 +56,10 @@
|
||||
<span class="special">};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.is_view.parameters"></a><h5>
|
||||
<a name="id551662"></a>
|
||||
<a class="link" href="is_view.html#fusion.support.is_view.parameters">Parameters</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_view.parameters"></a><h4>
|
||||
<a name="id413482"></a>
|
||||
<a href="is_view.html#fusion.support.is_view.parameters">Parameters</a>
|
||||
</h4>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -64,74 +67,62 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Parameter
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Requirement
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">T</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Any type
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type to query.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.support.is_view.expression_semantics"></a><h5>
|
||||
<a name="id551745"></a>
|
||||
<a class="link" href="is_view.html#fusion.support.is_view.expression_semantics">Expression Semantics</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_view.expression_semantics"></a><h4>
|
||||
<a name="id413581"></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"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">c</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Return type</strong></span>: An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
<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"><strong>Semantics</strong></span>: Metafunction that evaluates to
|
||||
<code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> if a certain type <code class="computeroutput"><span class="identifier">T</span></code>
|
||||
is a conforming Fusion view, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
|
||||
<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><h5>
|
||||
<a name="id551859"></a>
|
||||
<a class="link" href="is_view.html#fusion.support.is_view.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_view.header"></a><h4>
|
||||
<a name="id413730"></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"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.is_view.example"></a><h5>
|
||||
<a name="id551967"></a>
|
||||
<a class="link" href="is_view.html#fusion.support.is_view.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.support.is_view.example"></a><h4>
|
||||
<a name="id413867"></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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></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"><</span><span class="keyword">int</span><span class="special">></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 class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</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">></span> <span class="identifier">vector_type</span><span class="special">;</span>
|
||||
<span class="keyword">typedef</span> <a class="link" href="../view/filter_view.html" title="filter_view"><code class="computeroutput"><span class="identifier">filter_view</span></code></a><span class="special"><</span><span class="identifier">vector_type</span><span class="special">,</span> <span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">></span> <span class="identifier">filter_view_type</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"><</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">></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"><</span><span class="identifier">vector_type</span><span class="special">,</span> <span class="identifier">is_pointer</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">></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"><</span><span class="identifier">filter_view_type</span><span class="special">></span> <span class="special">));</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,25 +22,28 @@
|
||||
<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" title="pair">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.pair"></a><a class="link" href="pair.html" title="pair">pair</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.pair.description"></a><h5>
|
||||
<a name="id555233"></a>
|
||||
<a class="link" href="pair.html#fusion.support.pair.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.pair.description"></a><h4>
|
||||
<a name="id418183"></a>
|
||||
<a href="pair.html#fusion.support.pair.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
Fusion <code class="computeroutput"><span class="identifier">pair</span></code> type is a half
|
||||
runtime pair. A half runtime pair is similar to a <a class="link" href="../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a>,
|
||||
but, unlike <a class="link" href="../adapted/std__pair.html" title="std::pair"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></a>,
|
||||
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><h5>
|
||||
<a name="id555295"></a>
|
||||
<a class="link" href="pair.html#fusion.support.pair.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.pair.synopsis"></a><h4>
|
||||
<a name="id418285"></a>
|
||||
<a href="pair.html#fusion.support.pair.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">pair</span><span class="special">;</span>
|
||||
|
||||
@ -60,276 +63,212 @@
|
||||
<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special"><</span><span class="identifier">First</span><span class="special">,</span><span class="identifier">Second</span><span class="special">>::</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">&);</span>
|
||||
</pre>
|
||||
<a name="fusion.support.pair.template_parameters"></a><h5>
|
||||
<a name="id556684"></a>
|
||||
<a class="link" href="pair.html#fusion.support.pair.template_parameters">Template parameters</a>
|
||||
</h5>
|
||||
<a name="fusion.support.pair.template_parameters"></a><h4>
|
||||
<a name="id418690"></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>
|
||||
<th><p>
|
||||
Parameter
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
First
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The first type. This is purely a type. No data is held.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
Second
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The second type. This contains data.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<div class="variablelist" title="Notation">
|
||||
<div class="variablelist">
|
||||
<p class="title"><b>Notation</b></p>
|
||||
<dl>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></span></dt>
|
||||
<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"><code class="computeroutput"><span class="identifier">p</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">p2</span></code></span></dt>
|
||||
<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"><code class="computeroutput"><span class="identifier">F</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">S</span></code></span></dt>
|
||||
<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"><code class="computeroutput"><span class="identifier">s</span></code></span></dt>
|
||||
<dt><span class="term"><tt class="computeroutput"><span class="identifier">s</span></tt></span></dt>
|
||||
<dd><p>
|
||||
Value of type <code class="computeroutput"><span class="identifier">S</span></code>
|
||||
Value of type <tt class="computeroutput"><span class="identifier">S</span></tt>
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">o</span></code></span></dt>
|
||||
<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"><code class="computeroutput"><span class="identifier">i</span></code></span></dt>
|
||||
<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><h5>
|
||||
<a name="id556902"></a>
|
||||
<a class="link" href="pair.html#fusion.support.pair.expression_semantics">Expression Semantics</a>
|
||||
</h5>
|
||||
<a name="fusion.support.pair.expression_semantics"></a><h4>
|
||||
<a name="id418971"></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>
|
||||
<th><p>
|
||||
Expression
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Semantics
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">first_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of the first template parameter, <code class="computeroutput"><span class="identifier">F</span></code>,
|
||||
equivalent to <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">first</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<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"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></tt>.
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">second_type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of the second template parameter, <code class="computeroutput"><span class="identifier">S</span></code>,
|
||||
equivalent to <code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">second</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<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"><</span><span class="identifier">P</span><span class="special">>::</span><span class="identifier">type</span></tt>.
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">P</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">P</span><span class="special">()</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Default construction.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">P</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Construct a pair given value for the second type, <code class="computeroutput"><span class="identifier">s</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<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>
|
||||
<code class="computeroutput"><span class="identifier">P</span><span class="special">(</span><span class="identifier">p2</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Copy constructs a pair from another pair, <code class="computeroutput"><span class="identifier">p2</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<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>
|
||||
<code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Get the data from <code class="computeroutput"><span class="identifier">p1</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Get the data from <tt class="computeroutput"><span class="identifier">p1</span></tt>.
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">p</span> <span class="special">=</span>
|
||||
<span class="identifier">p2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assigns a pair, <code class="computeroutput"><span class="identifier">p1</span></code>,
|
||||
from another pair, <code class="computeroutput"><span class="identifier">p2</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<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, <tt class="computeroutput"><span class="identifier">p1</span></tt>,
|
||||
from another pair, <tt class="computeroutput"><span class="identifier">p2</span></tt>.
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
make_pair<F>(s)
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Make a pair given the first type, <code class="computeroutput"><span class="identifier">F</span></code>,
|
||||
and a value for the second type, <code class="computeroutput"><span class="identifier">s</span></code>.
|
||||
The second type assumes the type of <code class="computeroutput"><span class="identifier">s</span></code>
|
||||
</p>
|
||||
</td>
|
||||
</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>
|
||||
<code class="computeroutput"><span class="identifier">o</span> <span class="special"><<</span>
|
||||
<span class="identifier">p</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Output <code class="computeroutput"><span class="identifier">p</span></code> to output
|
||||
stream, <code class="computeroutput"><span class="identifier">o</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">o</span> <span class="special"><<</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>
|
||||
<code class="computeroutput"><span class="identifier">i</span> <span class="special">>></span>
|
||||
<span class="identifier">p</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Input <code class="computeroutput"><span class="identifier">p</span></code> from input
|
||||
stream, <code class="computeroutput"><span class="identifier">i</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">i</span> <span class="special">>></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>
|
||||
<code class="computeroutput"><span class="identifier">p</span> <span class="special">==</span>
|
||||
<span class="identifier">p2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<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>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">p</span> <span class="special">!=</span>
|
||||
<span class="identifier">p2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<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>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.support.pair.header"></a><h5>
|
||||
<a name="id557488"></a>
|
||||
<a class="link" href="pair.html#fusion.support.pair.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.pair.header"></a><h4>
|
||||
<a name="id419746"></a>
|
||||
<a href="pair.html#fusion.support.pair.header">Header</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.pair.example"></a><h5>
|
||||
<a name="id557596"></a>
|
||||
<a class="link" href="pair.html#fusion.support.pair.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.support.pair.example"></a><h4>
|
||||
<a name="id419900"></a>
|
||||
<a href="pair.html#fusion.support.pair.example">Example</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="identifier">pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">></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"><<</span> <span class="identifier">p</span> <span class="special"><<</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"><<</span> <span class="identifier">make_pair</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(</span><span class="char">'X'</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<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.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" 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">
|
||||
@ -22,28 +22,31 @@
|
||||
<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" title="tag_of">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.support.tag_of"></a><a class="link" href="tag_of.html" title="tag_of">tag_of</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.support.tag_of.description"></a><h5>
|
||||
<a name="id552287"></a>
|
||||
<a class="link" href="tag_of.html#fusion.support.tag_of.description">Description</a>
|
||||
</h5>
|
||||
<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></div>
|
||||
</div>
|
||||
<a name="fusion.support.tag_of.description"></a><h4>
|
||||
<a name="id414266"></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 class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
dispatching</em></span></a> from <a class="link" href="../sequence/intrinsic.html" title="Intrinsic">Intrinsic</a>
|
||||
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><h5>
|
||||
<a name="id552319"></a>
|
||||
<a class="link" href="tag_of.html#fusion.support.tag_of.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.support.tag_of.synopsis"></a><h4>
|
||||
<a name="id414314"></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"><</span><span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">></span>
|
||||
@ -53,10 +56,10 @@
|
||||
<span class="special">};</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.support.tag_of.parameters"></a><h5>
|
||||
<a name="id552411"></a>
|
||||
<a class="link" href="tag_of.html#fusion.support.tag_of.parameters">Parameters</a>
|
||||
</h5>
|
||||
<a name="fusion.support.tag_of.parameters"></a><h4>
|
||||
<a name="id414428"></a>
|
||||
<a href="tag_of.html#fusion.support.tag_of.parameters">Parameters</a>
|
||||
</h4>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -64,68 +67,56 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Parameter
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Requirement
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">T</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">T</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Any type
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type to query.
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.support.tag_of.expression_semantics"></a><h5>
|
||||
<a name="id552494"></a>
|
||||
<a class="link" href="tag_of.html#fusion.support.tag_of.expression_semantics">Expression Semantics</a>
|
||||
</h5>
|
||||
<a name="fusion.support.tag_of.expression_semantics"></a><h4>
|
||||
<a name="id414528"></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"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag</span><span class="special">;</span>
|
||||
</pre>
|
||||
<p>
|
||||
<span class="bold"><strong>Return type</strong></span>: Any type.
|
||||
<span class="bold"><b>Return type</b></span>: Any type.
|
||||
</p>
|
||||
<p>
|
||||
<span class="bold"><strong>Semantics</strong></span>: Returns the tag type associated
|
||||
with <code class="computeroutput"><span class="identifier">T</span></code>.
|
||||
<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><h5>
|
||||
<a name="id552574"></a>
|
||||
<a class="link" href="tag_of.html#fusion.support.tag_of.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.support.tag_of.header"></a><h4>
|
||||
<a name="id414630"></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"><</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">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</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">></span>
|
||||
</pre>
|
||||
<a name="fusion.support.tag_of.example"></a><h5>
|
||||
<a name="id552682"></a>
|
||||
<a class="link" href="tag_of.html#fusion.support.tag_of.example">Example</a>
|
||||
</h5>
|
||||
<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"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><></span> <span class="special">>::</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"><</span><a class="link" href="../container/list.html" title="list"><code class="computeroutput"><span class="identifier">list</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>::</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"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><></span> <span class="special">>::</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"><</span><a class="link" href="../container/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="identifier">tag4</span><span class="special">;</span>
|
||||
<a name="fusion.support.tag_of.example"></a><h4>
|
||||
<a name="id414767"></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"><</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special"><></span> <span class="special">>::</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"><</span><a href="../container/list.html" title="list"><tt class="computeroutput"><span class="identifier">list</span></tt></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>::</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"><</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><></span> <span class="special">>::</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"><</span><a href="../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>::</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"><</span><span class="identifier">tag1</span><span class="special">,</span> <span class="identifier">tag2</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"><</span><span class="identifier">tag3</span><span class="special">,</span> <span class="identifier">tag4</span><span class="special">>));</span>
|
||||
|
Reference in New Issue
Block a user