Files
boost_fusion/doc/html/fusion/sequences/intrinsics/metafunctions/at_key.html
Tobias Schwinger ca6f831b96 adds documentation for functional module
[SVN r36959]
2007-02-15 23:11:24 +00:00

134 lines
9.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>at_key</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="../../../../index.html" title="Chapter 1. Fusion 2.0">
<link rel="up" href="../metafunctions.html" title="Metafunctions">
<link rel="prev" href="has_key.html" title="has_key">
<link rel="next" href="value_at_key.html" title="value_at_key">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_key.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="value_at_key.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="fusion.sequences.intrinsics.metafunctions.at_key"></a><a href="at_key.html" title="at_key">at_key</a></h5></div></div></div>
<a name="fusion.sequences.intrinsics.metafunctions.at_key.description"></a><h6>
<a name="id1036491"></a>
<a href="at_key.html#fusion.sequences.intrinsics.metafunctions.at_key.description">Description</a>
</h6>
<p>
Returns the result type of <a href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a>
<sup>[<a name="id1036524" href="#ftn.id1036524">8</a>]</sup>
.
</p>
<a name="fusion.sequences.intrinsics.metafunctions.at_key.synopsis"></a><h6>
<a name="id1036625"></a>
<a href="at_key.html#fusion.sequences.intrinsics.metafunctions.at_key.synopsis">Synopsis</a>
</h6>
<pre class="programlisting">
<span class="keyword">template</span><span class="special">&lt;</span>
<span class="keyword">typename</span> <span class="identifier">Seq</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">at_key</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="emphasis"><em>unspecified</em></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<div class="table">
<a name="id1036728"></a><p class="title"><b>Table 1.30. Parameters</b></p>
<table class="table" summary="Parameters">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr></thead>
<tbody>
<tr>
<td><code class="computeroutput"><span class="identifier">Seq</span></code></td>
<td>A
model of <a href="../../concepts/forward_sequence.html" title="Forward
Sequence">Forward
Sequence</a>
</td>
<td>Argument sequence</td>
</tr>
<tr>
<td><code class="computeroutput"><span class="identifier">Key</span></code></td>
<td>Any
type</td>
<td>Key type</td>
</tr>
</tbody>
</table>
</div>
<a name="fusion.sequences.intrinsics.metafunctions.at_key.expression_semantics"></a><h6>
<a name="id1036813"></a>
<a href="at_key.html#fusion.sequences.intrinsics.metafunctions.at_key.expression_semantics">Expression
Semantics</a>
</h6>
<pre class="programlisting">
<span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span><span class="special">&lt;</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">&gt;::</span><span class="identifier">type</span>
</pre>
<p>
<span class="bold"><strong>Return type</strong></span>: Any type.
</p>
<p>
<span class="bold"><strong>Semantics</strong></span>: Returns the result of using
<a href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a> to access the element
with key type <code class="computeroutput"><span class="identifier">Key</span></code> in
<code class="computeroutput"><span class="identifier">Seq</span></code>.
</p>
<a name="fusion.sequences.intrinsics.metafunctions.at_key.header"></a><h6>
<a name="id1036936"></a>
<a href="at_key.html#fusion.sequences.intrinsics.metafunctions.at_key.header">Header</a>
</h6>
<pre class="programlisting">
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">intrinsic</span><span class="special">/</span><span class="identifier">at_key</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<a name="fusion.sequences.intrinsics.metafunctions.at_key.example"></a><h6>
<a name="id1037029"></a>
<a href="at_key.html#fusion.sequences.intrinsics.metafunctions.at_key.example">Example</a>
</h6>
<pre class="programlisting">
<span class="keyword">typedef</span> <a href="../../containers/map.html" title="map"><code class="computeroutput"><span class="identifier">map</span></code></a><span class="special">&lt;</span><a href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;,</span> <a href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special">&lt;</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;,</span> <a href="../../../support/pair.html" title="pair"><code class="computeroutput"><span class="identifier">pair</span></code></a><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">mymap</span><span class="special">;</span>
<span class="identifier">BOOST_MPL_ASSERT</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><a href="at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">mymap</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&amp;&gt;));</span>
</pre>
<div class="footnotes">
<br><hr width="100" align="left">
<div class="footnote"><p><sup>[<a name="ftn.id1036524" href="#id1036524">8</a>] </sup>
<a href="at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a> reflects the actual
return type of the function <a href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a>. <span class="underline">_sequence</span>_s
typically return references to its elements via the <a href="../functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a> function. If you
want to get the actual element type, use <a href="value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a>
</p></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><small>Copyright © 2001-2005 Joel de Guzman, Dan Marsden</small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_key.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="value_at_key.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
</body>
</html>