Files
boost_fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_key.html
Joel de Guzman d004046aa5 Merge from Trunk
[SVN r49252]
2008-10-10 15:05:47 +00:00

168 lines
9.8 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="../../../../../../../../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 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%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">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="id516357"></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="id516396" href="#ftn.id516396">8</a>]</sup>
.
</p>
<a name="fusion.sequence.intrinsic.metafunctions.at_key.synopsis"></a><h6>
<a name="id516515"></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="id516633"></a><p class="title"><b>Table 1.30. 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="id516772"></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="id516924"></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.id516396" href="#id516396">8</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">Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias
Schwinger<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="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>