Files
mpl/doc/ref/Reference/deref.html
Aleksey Gurtovoy a69baa5eae update the docs
[SVN r17836]
2003-03-12 13:29:12 +00:00

56 lines
1.9 KiB
HTML

<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::deref</title>
<link rel="stylesheet" href="../mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="../Table_of_Contents.html"><img src="../mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>deref</h1><h3>Synopsis</h3>
<p>
<pre>
template&lt;
typename Iterator
&gt;
struct deref
{
typedef typename Iterator::type type;
};
</pre>
<p>
<h3>Description</h3>
<p>
Dereferences an iterator.
<p>
<h3>Definition</h3>
<p>
<pre>
#include "<a href="../../../../../boost/mpl/deref.hpp">boost/mpl/deref.hpp</a>"
</pre>
<p>
<h3>Parameters</h3>
<table border="1">
<tr><th>&nbsp;Parameter&nbsp;</th><th>&nbsp;Requirement&nbsp;</th><th>&nbsp;Description &nbsp;</th></tr>
<tr><td><code>Iterator</code></td><td>A model of <a href="../Trivial_Iterator.html">Trivial Iterator</a></td><td>An iterator to be dereferenced. </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression&nbsp;type&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition&nbsp;</th></tr>
<tr><td><code>typedef deref&lt;Iterator&gt;::type t;</code></td><td>A type</td><td></td><td>Equivalent to <code>typedef Iterator::type t;</code>.</td><td><code>Iterator</code> is dereferenceable </td></tr>
</table>
<p>
<h3>Complexity</h3>
<p>
Amortized constant time.
<p>
<h3>Example</h3>
<p>
<pre>
typedef <a href="../Reference/list.html">list</a>&lt;char,short,int,long&gt; types;
typedef <a href="../Reference/begin.html">begin</a>&lt;types&gt;::type iter;
BOOST_STATIC_ASSERT(boost::is_same&lt; deref&lt;iter&gt;::type,char &gt;::value));
</pre>
<p>
<h3>See also</h3>
<p>
<a href="../Iterators.html">Iterators</a>, <code><a href="../Reference/begin.html">begin</a>/<a href="../Reference/end.html">end</a></code>
<p><hr>
<a href="../Table_of_Contents.html">Table of Contents</a><br>Last edited March 10, 2003 5:30 am</body></html>