Files
boost_fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html

167 lines
9.8 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>at_key</title>
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
<link rel="up" href="../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%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="../../../../../../../../people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_key.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.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="value_at_key.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="fusion.sequence.intrinsic.metafunctions.at_key"></a><a href="at_key.html" title="at_key">at_key</a></h5></div></div></div>
<a name="fusion.sequence.intrinsic.metafunctions.at_key.description"></a><h6>
<a name="id513500"></a>
<a href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.description">Description</a>
</h6>
<p>
Returns the result type of <a href="../functions/at_key.html" title="at_key"><tt class="computeroutput"><span class="identifier">at_key</span></tt></a>
<sup>[<a name="id513538" href="#ftn.id513538">7</a>]</sup>
.
</p>
<a name="fusion.sequence.intrinsic.metafunctions.at_key.synopsis"></a><h6>
<a name="id513658"></a>
<a href="at_key.html#fusion.sequence.intrinsic.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="id513775"></a><p class="title"><b>Table<EFBFBD>1.30.<2E>Parameters</b></p>
<table class="table" summary="Parameters">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Parameter
</p>
</th>
<th>
<p>
Requirement
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">Seq</span></tt>
</p>
</td>
<td>
<p>
A model of <a href="../../concepts/forward_sequence.html" title="Forward
Sequence">Forward
Sequence</a>
</p>
</td>
<td>
<p>
Argument sequence
</p>
</td>
</tr>
<tr>
<td>
<p>
<tt class="computeroutput"><span class="identifier">Key</span></tt>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
Key type
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a name="fusion.sequence.intrinsic.metafunctions.at_key.expression_semantics"></a><h6>
<a name="id513914"></a>
<a href="at_key.html#fusion.sequence.intrinsic.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"><b>Return type</b></span>: Any type.
</p>
<p>
<span class="bold"><b>Semantics</b></span>: Returns the result of using
<a href="../functions/at_key.html" title="at_key"><tt class="computeroutput"><span class="identifier">at_key</span></tt></a> to access the element
with key type <tt class="computeroutput"><span class="identifier">Key</span></tt> in
<tt class="computeroutput"><span class="identifier">Seq</span></tt>.
</p>
<p>
/sequence/intrinsic/at_key.hpp&gt;
</p>
<a name="fusion.sequence.intrinsic.metafunctions.at_key.example"></a><h6>
<a name="id514066"></a>
<a href="at_key.html#fusion.sequence.intrinsic.metafunctions.at_key.example">Example</a>
</h6>
<pre class="programlisting">
<span class="keyword">typedef</span> <a href="../../../container/map.html" title="map"><tt class="computeroutput"><span class="identifier">map</span></tt></a><span class="special">&lt;</span><a href="../../../support/pair.html" title="pair"><tt class="computeroutput"><span class="identifier">pair</span></tt></a><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">&gt;,</span> <a href="../../../support/pair.html" title="pair"><tt class="computeroutput"><span class="identifier">pair</span></tt></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"><tt class="computeroutput"><span class="identifier">pair</span></tt></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"><tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></tt></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.id513538" href="#id513538">7</a>] </sup>
<a href="at_key.html" title="at_key"><tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></tt></a> reflects the actual
return type of the function <a href="../functions/at_key.html" title="at_key"><tt class="computeroutput"><span class="identifier">at_key</span></tt></a>. <span class="underline">_sequence</span>_s
typically return references to its elements via the <a href="../functions/at_key.html" title="at_key"><tt class="computeroutput"><span class="identifier">at_key</span></tt></a> function. If you
want to get the actual element type, use <a href="value_at_key.html" title="value_at_key"><tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></tt></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"><div class="copyright-footer"><small>Copyright <20> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p></small></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="has_key.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../metafunctions.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="value_at_key.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>