1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-11-05 17:39:01 -06:00

Initial commit

This commit is contained in:
Crimson-Hawk
2024-03-05 16:42:40 +08:00
commit f1e4595ebf
39576 changed files with 7006612 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>THE BOOST MPL LIBRARY</title>
<meta name="copyright" content="Copyright © Aleksey Gurtovoy and David Abrahams, 2002-2004." />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body class="docframe">
<a class="reference" href="http://www.boost.org" target="_top">
<img align="left" alt="www.boost.org" src="../../../boost.png"/>
</a>
<h1 class="title">THE BOOST MPL LIBRARY</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Copyright:</th>
<td>Copyright © Aleksey Gurtovoy and David Abrahams, 2002-2004.</td></tr>
<tr class="field"><th class="docinfo-name">License:</th><td class="field-body">Distributed under the Boost Software License, Version 1.0. (See
accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at
<a class="reference" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</td>
</tr>
</tbody>
</table>
<div class="document" id="the-boost-mpl-library">
<p>The Boost.MPL library is a general-purpose, high-level C++
template metaprogramming framework of compile-time algorithms, sequences and
metafunctions. It provides a conceptual foundation and an extensive
set of powerful and coherent tools that make doing explict metaprogramming
in C++ as easy and enjoyable as possible within the current language.</p>
<p>There are several places to start when getting familiar with the library,
depending on what you know about metaprogramming in general and
C++ template metaprogramming in particular. Starting with
Boost version 1.32, the MPL comes with both an <a class="reference" href="./tutorial/tutorial-metafunctions.html">in-depth tutorial</a> on its
fundamental concepts and an annotated <a class="reference" href="./tutorial/reference-manual.html">reference manual</a> covering all concepts
and components in the library. While the tutorial
only uncovers a bit of what there is to C++ metaprogramming and the MPL,
it's a perfect place to start if you are only somewhat familiar with the
subject. At the very least, after you're done with it, you will be able to put
the rest of the stuff that appears here into context. The reference manual
is <em>the</em> resource for you if you plan — or are already doing — some actual
development with the library, but a casual reading is still allowed and likely
to bring many insights on the framework's organization and underlying
ideas. Finally, the top-level sections in this document that you
see highlighted below might also offer something of interest.</p>
<p>So, welcome, and happy metaprogramming!</p>
<dl>
<dt><strong>Important</strong>:</dt>
<dd>There have been some major interface changes in the library since the last
public release, many of which are <em>not</em> backward compatible. If you are
a seasoned MPL user, be prepared to have to modify your code after
upgrading. Please refer to the <a class="reference" href="./tutorial/changes-in-boost-1-32-0.html">1.32 release changelog</a>
for the detailed information about the changes.</dd>
</dl>
<!-- .. section-numbering:: -->
<ul class="toc simple" id="outline">
<li><a class="reference" href="./tutorial/tutorial-metafunctions.html" id="id40" name="id40">Tutorial: Metafunctions and Higher-Order Metaprogramming</a></li>
<li><a class="reference" href="./tutorial/reference-manual.html" id="id61" name="id61">Reference Manual</a></li>
<li><a class="reference" href="./tutorial/changelog-history.html" id="id62" name="id62">Changelog &amp; History</a></li>
<li><a class="reference" href="./tutorial/technical-details.html" id="id70" name="id70">Technical Details</a></li>
<li><a class="reference" href="./tutorial/resources.html" id="id77" name="id77">Resources</a></li>
<li><a class="reference" href="./tutorial/acknowledgements.html" id="id78" name="id78">Acknowledgements</a></li>
<li><a class="reference" href="./tutorial/tutorial_toc.html">Full TOC</a></li>
</ul>
</div>
<hr class="footer" />
<div class="footer">
Generated on: 2004-11-15 12:20 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/" target="_top">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html" target="_top">reStructuredText</a> source.
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual</title>
<meta name="copyright" content="Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<div class="document" id="the-mpl-reference-manual">
<h1 class="title">The MPL Reference Manual</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Copyright:</th>
<td>Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</td></tr>
<tr class="field"><th class="docinfo-name">License:</th><td class="field-body">Distributed under the Boost Software License, Version 1.0. (See
accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at
<a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</td>
</tr>
</tbody>
</table>
<!-- TOC copyright: -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./refmanual/sequences.html" id="id1393">Sequences</a></li>
<li><a class="reference internal" href="./refmanual/iterators.html" id="id1448">Iterators</a></li>
<li><a class="reference internal" href="./refmanual/algorithms.html" id="id1460">Algorithms</a></li>
<li><a class="reference internal" href="./refmanual/metafunctions.html" id="id1510">Metafunctions</a></li>
<li><a class="reference internal" href="./refmanual/data-types.html" id="id1572">Data Types</a></li>
<li><a class="reference internal" href="./refmanual/macros.html" id="id1586">Macros</a></li>
<li><a class="reference internal" href="./refmanual/terminology.html" id="id1610">Terminology</a></li>
<li><a class="reference internal" href="./refmanual/categorized-index.html" id="id1611">Categorized Index</a></li>
<li><a class="reference internal" href="./refmanual/acknowledgements.html" id="id1614">Acknowledgements</a></li>
<li><a class="reference internal" href="./refmanual/refmanual_toc.html">Full TOC</a></li>
</ul>
<!-- workaround weird substitution bug (used to work!): -->
<!-- workaround weird substitution bug (works with t's!): -->
<!-- "[*Note:*" instead of "|Note:|" to workaround another subst. bug -->
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2010-08-09 18:21 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/" target="_top">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html" target="_top">reStructuredText</a> source.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: accumulate</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./reverse-iter-fold.html" class="navigation-link">Prev</a>&nbsp;<a href="./querying-algorithms.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./reverse-iter-fold.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./iteration-algorithms.html" class="navigation-link">Iteration Algorithms</a> / <a href="./accumulate.html" class="navigation-link">accumulate</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="accumulate">
<h1><a class="toc-backref" href="./iteration-algorithms.html#id1473">accumulate</a></h1>
<div class="section" id="id527">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename State
, typename ForwardOp
&gt;
struct <a href="./accumulate.html" class="identifier">accumulate</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id528">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of the successive application of binary <tt class="literal"><span class="pre">ForwardOp</span></tt> to the
result of the previous <tt class="literal"><span class="pre">ForwardOp</span></tt> invocation (<tt class="literal"><span class="pre">State</span></tt> if it's the first call)
and every element of the sequence in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) in order.
[<em>Note:</em> <tt class="literal"><span class="pre"><a href="./accumulate.html" class="identifier">accumulate</a></span></tt> is a synonym for <a class="reference internal" href="./fold.html">fold</a><em>end note</em>]</p>
</div>
<div class="section" id="id529">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/accumulate.hpp" class="header">boost/mpl/accumulate.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id530">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to iterate.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">State</span></tt></td>
<td>Any type</td>
<td>The initial state for the first <tt class="literal"><span class="pre">ForwardOp</span></tt>
application.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">ForwardOp</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>The operation to be executed on forward
traversal.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id531">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt>, and arbitrary type <tt class="literal"><span class="pre">state</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./accumulate.html" class="identifier">accumulate</a>&lt;s,state,op&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./fold.html" class="identifier">fold</a>&lt;s,state,op&gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id532">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">op</span></tt>.</p>
</div>
<div class="section" id="id533">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long,float,short,double,float,long,long double&gt; types;
typedef <a href="./accumulate.html" class="identifier">accumulate</a>&lt;
types
, <a href="./int.html" class="identifier">int_</a>&lt;0&gt;
, <a href="./if.html" class="identifier">if_</a>&lt; is_float&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt;,<a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;,<a href="./placeholders.html" class="identifier">_1</a> &gt;
&gt;::type number_of_floats;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( number_of_floats::value, ==, 4 );
</pre>
</div>
<div class="section" id="id534">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./fold.html">fold</a>, <a class="reference internal" href="./reverse-fold.html">reverse_fold</a>, <a class="reference internal" href="./iter-fold.html">iter_fold</a>, <a class="reference internal" href="./reverse-iter-fold.html">reverse_iter_fold</a>, <a class="reference internal" href="./copy.html">copy</a>, <a class="reference internal" href="./copy-if.html">copy_if</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./reverse-iter-fold.html" class="navigation-link">Prev</a>&nbsp;<a href="./querying-algorithms.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./reverse-iter-fold.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Acknowledgements</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./components.html" class="navigation-link">Prev</a>&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./acknowledgements.html" class="navigation-link">Acknowledgements</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="acknowledgements">
<h1><a class="toc-backref" href="../refmanual.html#id1614">Acknowledgements</a></h1>
<p id="label-acknowledgements">The format and language of this reference documentation has been greatly influenced by
the SGI's <a class="reference external" href="https://boost.org/sgi/stl/" target="_top">Standard Template Library Programmer's Guide</a>.</p>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./components.html" class="navigation-link">Prev</a>&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: advance</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Prev</a>&nbsp;<a href="./distance.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./distance.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./advance.html" class="navigation-link">advance</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="advance">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id1454">advance</a></h1>
<div class="section" id="id403">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Iterator
, typename N
&gt;
struct <a href="./advance.html" class="identifier">advance</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id404">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Moves <tt class="literal"><span class="pre">Iterator</span></tt> by the distance <tt class="literal"><span class="pre">N</span></tt>. For <a class="reference internal" href="./bidirectional-iterator.html">bidirectional</a> and
<a class="reference internal" href="./random-access-iterator.html">random access</a> iterators, the distance may be negative.</p>
</div>
<div class="section" id="id405">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/advance.hpp" class="header">boost/mpl/advance.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id406">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Iterator</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator to advance.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>A distance.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id407">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model Of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id408">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For a <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> <tt class="literal"><span class="pre">iter</span></tt> and arbitrary <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./advance.html" class="identifier">advance</a>&lt;iter,n&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">If <tt class="literal"><span class="pre">Iterator</span></tt> is a <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>, <tt class="literal"><span class="pre">n::value</span></tt> must be nonnegative.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to:</p>
<pre class="literal-block">
typedef iter i0;
typedef <a href="./next.html" class="identifier">next</a>&lt;i0&gt;::type i1;
<em>...</em>
typedef <a href="./next.html" class="identifier">next</a>&lt;i<em>n-1</em>&gt;::type j;
</pre>
<p>if <tt class="literal"><span class="pre">n::value</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, and</p>
<pre class="literal-block">
typedef iter i0;
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i0&gt;::type i1;
<em>...</em>
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i<em>n-1</em>&gt;::type j;
</pre>
<p>otherwise.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre">j</span></tt> is dereferenceable or past-the-end;
<tt class="literal"><span class="pre"><a href="./distance.html" class="identifier">distance</a>&lt;iter,j&gt;::value</span> <span class="pre">==</span> <span class="pre">n::value</span></tt> if <tt class="literal"><span class="pre">n::value</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, and
<tt class="literal"><span class="pre"><a href="./distance.html" class="identifier">distance</a>&lt;j,iter&gt;::value</span> <span class="pre">==</span> <span class="pre">n::value</span></tt> otherwise.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id409">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time if <tt class="literal"><span class="pre">iter</span></tt> is a model of
<a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a>, otherwise linear time.</p>
</div>
<div class="section" id="id410">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; numbers;
typedef <a href="./begin.html" class="identifier">begin</a>&lt;numbers&gt;::type first;
typedef <a href="./end.html" class="identifier">end</a>&lt;numbers&gt;::type last;
typedef <a href="./advance.html" class="identifier">advance</a>&lt;first,<a href="./int.html" class="identifier">int_</a>&lt;10&gt; &gt;::type i1;
typedef <a href="./advance.html" class="identifier">advance</a>&lt;last,<a href="./int.html" class="identifier">int_</a>&lt;-10&gt; &gt;::type i2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( boost::is_same&lt;i1,last&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( boost::is_same&lt;i2,first&gt; ));
</pre>
</div>
<div class="section" id="id411">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a>, <a class="reference internal" href="./distance.html">distance</a>, <a class="reference internal" href="./next.html">next</a></p>
<!-- Iterators/Iterator Metafunctions//distance |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Prev</a>&nbsp;<a href="./distance.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./distance.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./inserters.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./algorithms-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id453">
<h1><a class="toc-backref" href="./algorithms.html#id1461"><a class="subsection-title" href="#concepts" name="concepts">Concepts</a></a></h1>
<!-- Algorithms/Concepts//Inserter -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./inserter.html" id="id1462">Inserter</a></li>
<li><a class="reference internal" href="./reversible-algorithm.html" id="id1463">Reversible Algorithm</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./inserters.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Algorithms</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-category.html" class="navigation-link">Prev</a>&nbsp;<a href="./algorithms-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators.html" class="navigation-link">Back</a>&nbsp;<a href="./metafunctions.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="algorithms">
<h1><a class="toc-backref" href="../refmanual.html#id1460">Algorithms</a></h1>
<p id="label-algorithms">The MPL provides a broad range of fundamental algorithms aimed to
satisfy the majority of sequential compile-time data processing
needs. The algorithms include compile-time counterparts
of many of the STL algorithms, iteration algorithms borrowed from
functional programming languages, and more.</p>
<p>Unlike the algorithms in the C++ Standard Library, which operate on
implict <em>iterator ranges</em>, the majority of MPL counterparts take
and return <em>sequences</em>. This derivation is not dictated by the
functional nature of C++ compile-time computations per se, but
rather by a desire to improve general usability of the library,
making programming with compile-time data structures as enjoyable
as possible.</p>
<!-- This can be seen as a further generalization and extension of
the STL's conceptual framework. -->
<p>In the spirit of the STL, MPL algorithms are <em>generic</em>, meaning
that they are not tied to particular sequence class
implementations, and can operate on a wide range of arguments as
long as they satisfy the documented requirements. The requirements
are formulated in terms of concepts. Under the hood,
algorithms are decoupled from concrete sequence
implementations by operating on <a class="reference internal" href="./iterators.html">Iterators</a>.</p>
<p>All MPL algorithms can be sorted into three
major categories: iteration algorithms, querying algorithms, and
transformation algorithms. The transformation algorithms introduce
an associated <a class="reference internal" href="./inserter.html">Inserter</a> concept, a rough equivalent for the notion of
<a class="reference external" href="https://boost.org/sgi/stl/OutputIterator.html" target="_top">Output Iterator</a> in the Standard Library. Moreover, every
transformation algorithm provides a <tt class="literal"><span class="pre">reverse_</span></tt> counterpart,
allowing for a wider range of efficient transformations — a
common functionality documented by the <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>
concept.</p>
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./algorithms-concepts.html" id="id1461">Concepts</a></li>
<li><a class="reference internal" href="./inserters.html" id="id1464">Inserters</a></li>
<li><a class="reference internal" href="./iteration-algorithms.html" id="id1468">Iteration Algorithms</a></li>
<li><a class="reference internal" href="./querying-algorithms.html" id="id1474">Querying Algorithms</a></li>
<li><a class="reference internal" href="./transformation-algorithms.html" id="id1485">Transformation Algorithms</a></li>
<li><a class="reference internal" href="./runtime-algorithms.html" id="id1508">Runtime Algorithms</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-category.html" class="navigation-link">Prev</a>&nbsp;<a href="./algorithms-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators.html" class="navigation-link">Back</a>&nbsp;<a href="./metafunctions.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: always</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./identity.html" class="navigation-link">Prev</a>&nbsp;<a href="./inherit.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./identity.html" class="navigation-link">Back</a>&nbsp;<a href="./inherit.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./always.html" class="navigation-link">always</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="always">
<h1><a class="toc-backref" href="./miscellaneous.html#id1565">always</a></h1>
<div class="section" id="id1155">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename X
&gt;
struct <a href="./always.html" class="identifier">always</a>
{
// <em>unspecified</em>
// <em>...</em>
};
</pre>
</div>
<div class="section" id="id1156">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./always.html" class="identifier">always</a>&lt;X&gt;</span></tt> specialization is a variadic <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> always returning the
same type, <tt class="literal"><span class="pre">X</span></tt>, regardless of the number and types of passed arguments.</p>
</div>
<div class="section" id="id1157">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/always.hpp" class="header">boost/mpl/always.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1158">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></p>
</div>
<div class="section" id="id1159">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="22%" />
<col width="28%" />
<col width="51%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">X</span></tt></td>
<td>Any type</td>
<td>A type to be returned.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1160">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For an arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./always.html" class="identifier">always</a>&lt;x&gt; f;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct f : <a href="./bind.html" class="identifier">bind</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;, x > {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1161">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./always.html" class="identifier">always</a>&lt;<a href="./bool.html" class="identifier">true_</a>&gt; always_true;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,<a href="./bool.html" class="identifier">false_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,<a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a> &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,<a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a> > ));
</pre>
</div>
<div class="section" id="id1162">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a>, <a class="reference internal" href="./identity.html">identity</a>, <a class="reference internal" href="./bind.html">bind</a>, <a class="reference internal" href="./apply.html">apply</a></p>
<!-- Metafunctions/Miscellaneous//inherit |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./identity.html" class="navigation-link">Prev</a>&nbsp;<a href="./inherit.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./identity.html" class="navigation-link">Back</a>&nbsp;<a href="./inherit.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: and_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./or.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./or.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./logical-operations.html" class="navigation-link">Logical Operations</a> / <a href="./and.html" class="navigation-link">and_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="and">
<h1><a class="toc-backref" href="./logical-operations.html#id1550">and_</a></h1>
<div class="section" id="id1068">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename F1
, typename F2
<em>...</em>
, typename F<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./and.html" class="identifier">and_</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1069">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of short-circuit <em>logical and</em> (<tt class="literal"><span class="pre">&amp;&amp;</span></tt>) operation on its arguments.</p>
</div>
<div class="section" id="id1070">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/and.hpp" class="header">boost/mpl/and.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/logical.hpp" class="header">boost/mpl/logical.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1071">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F1</span></tt>, <tt class="literal"><span class="pre">F2</span></tt>,... <tt class="literal"><span class="pre">Fn</span></tt></td>
<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1072">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For arbitrary nullary <a class="reference internal" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>,... <tt class="literal"><span class="pre">fn</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./and.html" class="identifier">and_</a>&lt;f1,f2,<em>...</em>,f<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <tt class="literal"><span class="pre"><a href="./bool.html" class="identifier">false_</a></span></tt> if either of <tt class="literal"><span class="pre">f1::type::value</span></tt>, <tt class="literal"><span class="pre">f2::type::value</span></tt>,...
<tt class="literal"><span class="pre">fn::type::value</span></tt> expressions evaluates to <tt class="literal"><span class="pre">false</span></tt>, and <tt class="literal"><span class="pre"><a href="./bool.html" class="identifier">true_</a></span></tt> otherwise;
guarantees left-to-right evaluation; the operands subsequent to the first
<tt class="literal"><span class="pre">f</span></tt><em>i</em> metafunction that evaluates to <tt class="literal"><span class="pre">false</span></tt> are not evaluated.</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./and.html" class="identifier">and_</a>&lt;f1,f2,<em>...</em>,f<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./and.html" class="identifier">and_</a>&lt;f1,f2,<em>...</em>,f<em>n</em>&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1073">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct unknown;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">true_</a>,<a href="./bool.html" class="identifier">true_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">true_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">true_</a>,<a href="./bool.html" class="identifier">false_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,unknown &gt; )); // OK
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,unknown,unknown &gt; )); // OK too
</pre>
</div>
<div class="section" id="id1074">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./logical-operations.html">Logical Operations</a>, <a class="reference internal" href="./or.html">or_</a>, <a class="reference internal" href="./not.html">not_</a></p>
<!-- Metafunctions/Logical Operations//or_ |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./or.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./or.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: apply_wrap</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./apply.html" class="navigation-link">Prev</a>&nbsp;<a href="./unpack-args.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./apply.html" class="navigation-link">Back</a>&nbsp;<a href="./unpack-args.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./invocation.html" class="navigation-link">Invocation</a> / <a href="./apply-wrap.html" class="navigation-link">apply_wrap</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="apply-wrap">
<h1><a class="toc-backref" href="./invocation.html#id1526">apply_wrap</a></h1>
<div class="section" id="id894">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename F
&gt;
struct apply_wrap0
{
typedef <em>unspecified</em> type;
};
template&lt;
typename F, typename A1
&gt;
struct apply_wrap1
{
typedef <em>unspecified</em> type;
};
<em>...</em>
template&lt;
typename F, typename A1,<em>...</em> typename An
&gt;
struct <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id895">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Invokes a <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">F</span></tt> with arguments <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>.</p>
<p>In essence, <tt class="literal"><span class="pre"><a href="./apply-wrap.html" class="identifier">apply_wrap</a></span></tt> forms are nothing more than syntactic wrappers around
<tt class="literal"><span class="pre">F::<a href="./apply.html" class="identifier">apply</a>&lt;A1,...</span> <span class="pre">An&gt;::type</span></tt> / <tt class="literal"><span class="pre">F::<a href="./apply.html" class="identifier">apply</a>::type</span></tt> expressions (hence the name).
They provide a more concise notation and higher portability than their
underlaying constructs at the cost of an extra template instantiation.</p>
</div>
<div class="section" id="id896">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/apply_wrap.hpp" class="header">boost/mpl/apply_wrap.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id897">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F</span></tt></td>
<td><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></td>
<td>A metafunction class to invoke.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt></td>
<td>Any type</td>
<td>Invocation arguments.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id898">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt;f,a1,<em>...</em>an&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">n</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>&lt;a1,...</span> <span class="pre">an&gt;::type</span> <span class="pre">t;</span></tt>,
otherwise equivalent to either <tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>::type</span> <span class="pre">t;</span></tt> or
<tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>&lt;&gt;::type</span> <span class="pre">t;</span></tt> depending on whether <tt class="literal"><span class="pre">f::<a href="./apply.html" class="identifier">apply</a></span></tt> is
a class or a class template.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id899">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct f0
{
template&lt; typename T = int &gt; struct <a href="./apply.html" class="identifier">apply</a>
{
typedef char type;
};
};
struct g0
{
struct <a href="./apply.html" class="identifier">apply</a> { typedef char type; };
};
struct f2
{
template&lt; typename T1, typename T2 &gt; struct <a href="./apply.html" class="identifier">apply</a>
{
typedef T2 type;
};
};
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">0</span></tt>&lt; f0 &gt;::type r1;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">0</span></tt>&lt; g0 &gt;::type r2;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">2</span></tt>&lt; f2,int,char &gt;::type r3;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r1,char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r2,char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r3,char&gt; ));
</pre>
</div>
<div class="section" id="id900">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./invocation.html">invocation</a>, <a class="reference internal" href="./apply.html">apply</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./quote.html">quote</a>, <a class="reference internal" href="./bind.html">bind</a>, <a class="reference internal" href="./protect.html">protect</a></p>
<!-- Metafunctions/Invocation//unpack_args |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./apply.html" class="navigation-link">Prev</a>&nbsp;<a href="./unpack-args.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./apply.html" class="navigation-link">Back</a>&nbsp;<a href="./unpack-args.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: apply</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Prev</a>&nbsp;<a href="./apply-wrap.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./apply-wrap.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./invocation.html" class="navigation-link">Invocation</a> / <a href="./apply.html" class="navigation-link">apply</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="apply">
<h1><a class="toc-backref" href="./invocation.html#id1525">apply</a></h1>
<div class="section" id="id887">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename F
&gt;
struct apply0
{
typedef <em>unspecified</em> type;
};
template&lt;
typename F, typename A1
&gt;
struct apply1
{
typedef <em>unspecified</em> type;
};
<em>...</em>
template&lt;
typename F, typename A1,<em>...</em> typename An
&gt;
struct <a href="./apply.html" class="identifier">apply</a><em>n</em>
{
typedef <em>unspecified</em> type;
};
template&lt;
typename F
, typename A1 = <em>unspecified</em>
<em>...</em>
, typename An = <em>unspecified</em>
&gt;
struct <a href="./apply.html" class="identifier">apply</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id888">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Invokes a <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> or a <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">F</span></tt> with arguments <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>.</p>
</div>
<div class="section" id="id889">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/apply.hpp" class="header">boost/mpl/apply.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id890">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F</span></tt></td>
<td><a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>An expression to invoke.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt></td>
<td>Any type</td>
<td>Invocation arguments.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id891">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./apply.html" class="identifier">apply</a><em>n</em>&lt;f,a1,<em>...</em>a<em>n</em>&gt;::type t;
typedef <a href="./apply.html" class="identifier">apply</a>&lt;f,a1,<em>...</em>a<em>n</em>&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre"><a href="./apply-wrap.html" class="identifier">apply_wrap</a></span></tt><em>n</em><tt class="literal"><span class="pre">&lt;</span> <span class="pre"><a href="./lambda.html" class="identifier">lambda</a>&lt;f&gt;::type,a1,...</span> <span class="pre">an&gt;::type</span> <span class="pre">t;</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id892">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename N1, typename N2 &gt; struct int_plus
: <a href="./int.html" class="identifier">int_</a>&lt;( N1::value + N2::value )&gt;
{
};
typedef <a href="./apply.html" class="identifier">apply</a>&lt; int_plus&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt;, <a href="./int.html" class="identifier">int_</a>&lt;2&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt; &gt;::type r1;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./quote.html" class="identifier">quote</a><tt class="literal"><span class="pre">2</span></tt>&lt;int_plus&gt;, <a href="./int.html" class="identifier">int_</a>&lt;2&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt; &gt;::type r2;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( r1::value, ==, 5 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( r2::value, ==, 5 );
</pre>
</div>
<div class="section" id="id893">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./apply-wrap.html">apply_wrap</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./quote.html">quote</a>, <a class="reference internal" href="./bind.html">bind</a></p>
<!-- Metafunctions/Invocation//apply_wrap |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Prev</a>&nbsp;<a href="./apply-wrap.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./apply-wrap.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: arg</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./quote.html" class="navigation-link">Prev</a>&nbsp;<a href="./protect.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./quote.html" class="navigation-link">Back</a>&nbsp;<a href="./protect.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument-binding.html" class="navigation-link">Composition and Argument Binding</a> / <a href="./arg.html" class="navigation-link">arg</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="arg">
<h1><a class="toc-backref" href="./composition-and-argument-binding.html#id1533">arg</a></h1>
<div class="section" id="id946">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt; int n &gt; struct <a href="./arg.html" class="identifier">arg</a>;
template&lt;&gt; struct <a href="./arg.html" class="identifier">arg</a>&lt;1&gt;
{
template&lt; typename A1,<em>...</em> typename A<em>n</em> = <em>unspecified</em> &gt;
struct <a href="./apply.html" class="identifier">apply</a>
{
typedef A1 type;
};
};
<em>...</em>
template&lt;&gt; struct <a href="./arg.html" class="identifier">arg</a>&lt;<em>n</em>&gt;
{
template&lt; typename A1,<em>...</em> typename A<em>n</em> &gt;
struct <a href="./apply.html" class="identifier">apply</a>
{
typedef A<em>n</em> type;
};
};
</pre>
</div>
<div class="section" id="id947">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./arg.html" class="identifier">arg</a>&lt;n&gt;</span></tt> specialization is a <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> that return the <tt class="literal"><span class="pre">n</span></tt>th of its arguments.</p>
</div>
<div class="section" id="id948">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/arg.hpp" class="header">boost/mpl/arg.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id949">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">n</span></tt></td>
<td>An integral constant</td>
<td>A number of argument to return.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id950">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">n</span></tt> in the range [1, <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a>] and
arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt; <a href="./arg.html" class="identifier">arg</a>&lt;<em>n</em>&gt;,a1,<em>...</em>a<em>n</em> &gt;::type x;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">x</span></tt> is identical to <tt class="literal"><span class="pre">an</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id951">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt; <a href="./arg.html" class="identifier">arg</a>&lt;1&gt;,bool,char,short,int,long &gt;::type t1;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt; <a href="./arg.html" class="identifier">arg</a>&lt;3&gt;,bool,char,short,int,long &gt;::type t3;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t1, bool &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t3, short > ));
</pre>
</div>
<div class="section" id="id952">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./composition-and-argument-binding.html">Composition and Argument Binding</a>, <a class="reference internal" href="./placeholders.html">Placeholders</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./bind.html">bind</a>, <a class="reference internal" href="./apply.html">apply</a>, <a class="reference internal" href="./apply-wrap.html">apply_wrap</a></p>
<!-- Metafunctions/Composition and Argument Binding//protect |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./quote.html" class="navigation-link">Prev</a>&nbsp;<a href="./protect.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./quote.html" class="navigation-link">Back</a>&nbsp;<a href="./protect.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Arithmetic Operations</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./protect.html" class="navigation-link">Prev</a>&nbsp;<a href="./plus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Back</a>&nbsp;<a href="./comparisons.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./arithmetic-operations.html" class="navigation-link">Arithmetic Operations</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="arithmetic-operations">
<h1><a class="toc-backref" href="./metafunctions.html#id1535">Arithmetic Operations</a></h1>
<span class="target" id="label-metafunctions-arithmetic-operations"></span><!-- Metafunctions/Arithmetic Operations//plus |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./plus.html" id="id1536">plus</a></li>
<li><a class="reference internal" href="./minus.html" id="id1537">minus</a></li>
<li><a class="reference internal" href="./times.html" id="id1538">times</a></li>
<li><a class="reference internal" href="./divides.html" id="id1539">divides</a></li>
<li><a class="reference internal" href="./modulus.html" id="id1540">modulus</a></li>
<li><a class="reference internal" href="./negate.html" id="id1541">negate</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./protect.html" class="navigation-link">Prev</a>&nbsp;<a href="./plus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Back</a>&nbsp;<a href="./comparisons.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT_MSG</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert-msg.html" class="navigation-link">BOOST_MPL_ASSERT_MSG</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert-msg">
<h1><a class="toc-backref" href="./asserts.html#id1589">BOOST_MPL_ASSERT_MSG</a></h1>
<div class="section" id="id1294">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>( condition, message, types ) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1295">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Generates a compilation error with an embedded custom message when the condition
doesn't hold.</p>
</div>
<div class="section" id="id1296">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1297">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">condition</span></tt></td>
<td>An integral constant expression</td>
<td>A condition to be asserted.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">message</span></tt></td>
<td>A legal identifier token</td>
<td>A custom message in a form of a legal C++
identifier token.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">types</span></tt></td>
<td>A legal function parameter list</td>
<td>A parenthized list of types to be displayed
in the error message.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1298">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant expression <tt class="literal"><span class="pre">expr</span></tt>, legal C++ identifier <tt class="literal"><span class="pre">message</span></tt>, and
arbitrary types <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt>:</p>
<pre class="literal-block">
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>( expr, message, (t1, t2,... tn) );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> are non-<tt class="literal"><span class="pre">void</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">expr</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include the <tt class="literal"><span class="pre">message</span></tt> identifier and the parenthized
list of <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> types, and have a general form of:</p>
<pre class="last literal-block">
<em>...</em> ************( <em>...</em>::message )************)(t1, t2,... tn) <em>...</em>
</pre>
</td>
</tr>
</tbody>
</table>
<pre class="literal-block">
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>( expr, message, (types&lt;t1, t2,... tn&gt;) );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">expr</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect.</p>
<p>When possible within the compiler's diagnostics capabilities,
the error message will include the <tt class="literal"><span class="pre">message</span></tt> identifier and the list of
<tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> types, and have a general form of:</p>
<pre class="last literal-block">
<em>...</em> ************( <em>...</em>::message )************)(types&lt;t1, t2,... tn&gt;) <em>...</em>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1299">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T &gt; struct my
{
// ...
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>(
is_integral&lt;T&gt;::value
, NON_INTEGRAL_TYPES_ARE_NOT_ALLOWED
, (T)
);
};
my&lt;void*&gt; test;
// In instantiation of `my&lt;void*&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************(my&lt;void*&gt;::
// NON_INTEGRAL_TYPES_ARE_NOT_ALLOWED::************)(void*)
// ' to non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1300">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a>, <a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a>, <a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></p>
<!-- Macros/Asserts//BOOST_MPL_ASSERT_NOT -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT_NOT</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert-not.html" class="navigation-link">BOOST_MPL_ASSERT_NOT</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert-not">
<h1><a class="toc-backref" href="./asserts.html#id1590">BOOST_MPL_ASSERT_NOT</a></h1>
<div class="section" id="id1301">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>( pred ) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1302">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Generates a compilation error when predicate holds true.</p>
</div>
<div class="section" id="id1303">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1304">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="16%" />
<col width="38%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">pred</span></tt></td>
<td>Boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>A predicate to be asserted to be false.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1305">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( pred ));
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">pred::type::value</span> <span class="pre">!=</span> <span class="pre">false</span></tt>, otherwise
has no effect. Note that double parentheses are required even if no commas
appear in the condition.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include the predicate's full type name, and have a
general form of:</p>
<pre class="last literal-block">
<em>...</em> ************boost::mpl::<a href="./not.html" class="identifier">not_</a>&lt; pred >::************ <em>...</em>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1306">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U &gt; struct my
{
// ...
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( is_same&lt; T,U &gt; ));
};
my&lt;void,void&gt; test;
// In instantiation of `my&lt;void, void&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************boost::mpl::<a href="./not.html" class="identifier">not_</a>&lt;boost::is_same&lt;void, void&gt;
// &gt;::************' to non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1307">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a>, <a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a>, <a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></p>
<!-- Macros/Asserts//BOOST_MPL_ASSERT_RELATION -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT_RELATION</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Prev</a>&nbsp;<a href="./introspection.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert-relation.html" class="navigation-link">BOOST_MPL_ASSERT_RELATION</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert-relation">
<h1><a class="toc-backref" href="./asserts.html#id1591">BOOST_MPL_ASSERT_RELATION</a></h1>
<div class="section" id="id1308">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( x, relation, y ) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1309">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A specialized assertion macro for checking numerical conditions. Generates
a compilation error when the condition <tt class="literal"><span class="pre">(</span> <span class="pre">x</span> <span class="pre">relation</span> <span class="pre">y</span> <span class="pre">)</span></tt>
doesn't hold.</p>
</div>
<div class="section" id="id1310">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1311">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">x</span></tt></td>
<td>An integral constant</td>
<td>Left operand of the checked relation.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">y</span></tt></td>
<td>An integral constant</td>
<td>Right operand of the checked relation.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">relation</span></tt></td>
<td>A C++ operator token</td>
<td>An operator token for the relation being
checked.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1312">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constants <tt class="literal"><span class="pre">x</span></tt>, <tt class="literal"><span class="pre">y</span></tt> and a legal C++ operator token <tt class="literal"><span class="pre">op</span></tt>:</p>
<pre class="literal-block">
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( x, op, y );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">(</span> <span class="pre">x</span> <span class="pre">op</span> <span class="pre">y</span> <span class="pre">)</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include a name of the relation being checked,
the actual values of both operands, and have a general form of:</p>
<pre class="last literal-block">
<em>...</em> ************<em>...</em>assert_relation&lt;op, x, y&gt;::************) <em>...</em>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1313">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U &gt; struct my
{
// ...
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( sizeof(T), &lt;, sizeof(U) );
};
my&lt;char[50],char[10]&gt; test;
// In instantiation of `my&lt;char[50], char[10]&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************mpl_::assert_relation&lt;<a href="./less.html" class="identifier">less</a>, 50, 10&gt;::************'
// to non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1314">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a>, <a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a>, <a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Prev</a>&nbsp;<a href="./introspection.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-msg.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./assert-msg.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert.html" class="navigation-link">BOOST_MPL_ASSERT</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert">
<h1><a class="toc-backref" href="./asserts.html#id1588">BOOST_MPL_ASSERT</a></h1>
<div class="section" id="id1287">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>( pred ) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1288">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Generates a compilation error when the predicate <tt class="literal"><span class="pre">pred</span></tt> holds false.</p>
</div>
<div class="section" id="id1289">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1290">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="43%" />
<col width="38%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">pred</span></tt></td>
<td>Boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>A predicate to be asserted.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1291">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( pred ));
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">pred::type::value</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect. Note that double parentheses are required even if no commas
appear in the condition.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include the predicate's full type name, and have a
general form of:</p>
<pre class="last literal-block">
<em>...</em> ************ pred::************ <em>...</em>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1292">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U &gt; struct my
{
// ...
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; T,U &gt; ));
};
my&lt;void*,char*&gt; test;
// In instantiation of `my&lt;void, char*&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************boost::is_same&lt;void, char*&gt;::************' to
// non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1293">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a>, <a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a>, <a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></p>
<!-- Macros/Asserts//BOOST_MPL_ASSERT_MSG -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-msg.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./assert-msg.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Asserts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./macros.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./introspection.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="asserts">
<h1><a class="toc-backref" href="./macros.html#id1587">Asserts</a></h1>
<p id="label-macros-asserts">The MPL supplies a suite of static assertion macros that are specifically
designed to generate maximally useful and informative error messages
within the diagnostic capabilities of each compiler.</p>
<p>All assert macros can be used at class, function, or namespace scope.</p>
<!-- Macros/Asserts//BOOST_MPL_ASSERT -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./assert.html" id="id1588">BOOST_MPL_ASSERT</a></li>
<li><a class="reference internal" href="./assert-msg.html" id="id1589">BOOST_MPL_ASSERT_MSG</a></li>
<li><a class="reference internal" href="./assert-not.html" id="id1590">BOOST_MPL_ASSERT_NOT</a></li>
<li><a class="reference internal" href="./assert-relation.html" id="id1591">BOOST_MPL_ASSERT_RELATION</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./macros.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./introspection.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Associative Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./associative-sequence.html" class="navigation-link">Associative Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="associative-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1401">Associative Sequence</a></h1>
<div class="section" id="id29">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> that allows efficient retrieval of
elements based on keys. Unlike associative containers in the C++ Standard Library,
MPL associative sequences have no associated ordering relation. Instead,
<em>type identity</em> is used to impose an equivalence relation on keys, and the
order in which sequence elements are traversed during iteration is left
unspecified.</p>
</div>
<div class="section" id="id30">
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple" id="value-part">
<li><span id="key-part"></span>A <em>key</em> is a part of the element type used to identify and retrieve
the element within the sequence.</li>
<li>A <em>value</em> is a part of the element type retrievied from the sequence
by its key.</li>
</ul>
</div>
<div class="section" id="id31">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In the following table and subsequent specifications, <tt class="literal"><span class="pre">s</span></tt> is an <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>,
<tt class="literal"><span class="pre">x</span></tt> is a sequence element, and <tt class="literal"><span class="pre">k</span></tt> and <tt class="literal"><span class="pre">def</span></tt> are arbitrary types.</p>
<p>In addition to the requirements defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>,
the following must be met:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="33%" />
<col width="38%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;s,k&gt;::type</span></tt></td>
<td>Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./count.html" class="identifier">count</a>&lt;s,k&gt;::type</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./order.html" class="identifier">order</a>&lt;s,k&gt;::type</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a> or <tt class="literal"><span class="pre"><a href="./void.html" class="identifier">void_</a></span></tt></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;s,k&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;s,k,def&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./key-type.html" class="identifier">key_type</a>&lt;s,x&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id32">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;s,k&gt;::type</span></tt></td>
<td>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if there is one or more
elements with the key <tt class="literal"><span class="pre">k</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./has-key.html">has_key</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./count.html" class="identifier">count</a>&lt;s,k&gt;::type</span></tt></td>
<td>The number of elements with the key <tt class="literal"><span class="pre">k</span></tt> in <tt class="literal"><span class="pre">s</span></tt>;
see <a class="reference internal" href="./count.html">count</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./order.html" class="identifier">order</a>&lt;s,k&gt;::type</span></tt></td>
<td>A unique unsigned <a class="reference internal" href="./integral-constant.html">Integral Constant</a> associated
with the key <tt class="literal"><span class="pre">k</span></tt> in the sequence <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./order.html">order</a>.</td>
</tr>
<tr><td><pre class="first last literal-block">
<a href="./at.html" class="identifier">at</a>&lt;s,k&gt;::type
<a href="./at.html" class="identifier">at</a>&lt;s,k,def&gt;::type
</pre>
</td>
<td>The first element associated with the key <tt class="literal"><span class="pre">k</span></tt>
in the sequence <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./at.html">at</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./key-type.html" class="identifier">key_type</a>&lt;s,x&gt;::type</span></tt></td>
<td>The key part of the element <tt class="literal"><span class="pre">x</span></tt> that would be
used to identify <tt class="literal"><span class="pre">x</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./key-type.html">key_type</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt></td>
<td>The value part of the element <tt class="literal"><span class="pre">x</span></tt> that would be
used for <tt class="literal"><span class="pre">x</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./value-type.html">value_type</a>.</td>
</tr>
</tbody>
</table>
<!-- Invariants
- - - - - - - - - -
For any associative sequence ``s`` the following invariants always hold:
* ??? -->
</div>
<div class="section" id="id33">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./set.html">set</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
</ul>
<!-- * |multiset| -->
</div>
<div class="section" id="id34">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./has-key.html">has_key</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./order.html">order</a>, <a class="reference internal" href="./at.html">at</a>, <a class="reference internal" href="./key-type.html">key_type</a>, <a class="reference internal" href="./value-type.html">value_type</a></p>
<!-- Sequences/Concepts//Extensible Associative Sequence |80 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: at_c</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./at.html" class="navigation-link">Prev</a>&nbsp;<a href="./back.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./at.html" class="navigation-link">Back</a>&nbsp;<a href="./back.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./at-c.html" class="navigation-link">at_c</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="at-c">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1426">at_c</a></h1>
<div class="section" id="id185">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, long n
&gt;
struct <a href="./at-c.html" class="identifier">at_c</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id186">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a type identical to the <tt class="literal"><span class="pre">n</span></tt>th element from the beginning of
the sequence. <tt class="literal"><span class="pre"><a href="./at-c.html" class="identifier">at_c</a>&lt;Sequence,n&gt;::type</span></tt> is a shorcut notation for
<tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;</span> <span class="pre">Sequence,</span> <span class="pre"><a href="./long.html" class="identifier">long_</a>&lt;n&gt;</span> <span class="pre">&gt;::type</span></tt>.</p>
</div>
<div class="section" id="id187">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/at.hpp" class="header">boost/mpl/at.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id188">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">n</span></tt></td>
<td>A compile-time integral constant</td>
<td>An offset from the beginning of the sequence
specifying the element to be retrieved.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id189">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<pre class="literal-block">
typedef <a href="./at-c.html" class="identifier">at_c</a>&lt;Sequence,n&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">n</span> <span class="pre">&lt;</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;Sequence&gt;::value</span></tt></p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt; Sequence, <a href="./long.html" class="identifier">long_</a>&lt;n&gt; &gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id190">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Linear.</td>
</tr>
<tr><td><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id191">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;long,10,50&gt; range;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,0 &gt;::type::value), ==, 10 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,10 &gt;::type::value), ==, 20 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,40 &gt;::type::value), ==, 50 );
</pre>
</div>
<div class="section" id="id192">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference internal" href="./at.html">at</a>, <a class="reference internal" href="./front.html">front</a>, <a class="reference internal" href="./back.html">back</a></p>
<!-- Sequences/Intrinsic Metafunctions//back -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./at.html" class="navigation-link">Prev</a>&nbsp;<a href="./back.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./at.html" class="navigation-link">Back</a>&nbsp;<a href="./back.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,215 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: at</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Prev</a>&nbsp;<a href="./at-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./at-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./at.html" class="navigation-link">at</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="at">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1425">at</a></h1>
<div class="section" id="id177">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename N
&gt;
struct <a href="./at.html" class="identifier">at</a>
{
typedef <em>unspecified</em> type;
};
template&lt;
typename AssocSeq
, typename Key
, typename Default = <em>unspecified</em>
&gt;
struct <a href="./at.html" class="identifier">at</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id178">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a></span></tt> is an <a class="reference internal" href="./terminology.html#overloaded-name">overloaded name</a>:</p>
<ul class="simple">
<li><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;Sequence,N&gt;</span></tt> returns the <tt class="literal"><span class="pre">N</span></tt>-th element from the beginning of the
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">Sequence</span></tt>.</li>
<li><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;AssocSeq,Key,Default&gt;</span></tt> returns the first element associated with <tt class="literal"><span class="pre">Key</span></tt>
in the <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">AssocSeq</span></tt>, or <tt class="literal"><span class="pre">Default</span></tt> if no such element
exists.</li>
</ul>
</div>
<div class="section" id="id179">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/at.hpp" class="header">boost/mpl/at.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id180">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id181">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">AssocSeq</span></tt></td>
<td><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>An offset from the beginning of the sequence
specifying the element to be retrieved.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Key</span></tt></td>
<td>Any type</td>
<td>A key for the element to be retrieved.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Default</span></tt></td>
<td>Any type</td>
<td>A default value to return if the element is
not found.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id182">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,n&gt;::type t;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">n::value</span> <span class="pre">&lt;</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt; <a href="./advance.html" class="identifier">advance</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type,n &gt;::type &gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary types <tt class="literal"><span class="pre">key</span></tt> and <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key,x&gt;::type t;
</pre>
<table class="compound-middle docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;s,key&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>, <tt class="literal"><span class="pre">t</span></tt> is the value type associated with <tt class="literal"><span class="pre">key</span></tt>;
otherwise <tt class="literal"><span class="pre">t</span></tt> is identical to <tt class="literal"><span class="pre">x</span></tt>.</td>
</tr>
</tbody>
</table>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<pre class="compound-middle literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key&gt;::type t;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key,<a href="./void.html" class="identifier">void_</a>&gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="complexity">
<h3>Complexity</h3>
<table border="1" class="docutils table">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Linear.</td>
</tr>
<tr><td><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
<tr><td><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id183">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;long,10,50&gt; range;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at.html" class="identifier">at</a>&lt; range, <a href="./int.html" class="identifier">int_</a>&lt;0&gt; &gt;::value), ==, 10 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at.html" class="identifier">at</a>&lt; range, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; &gt;::value), ==, 20 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at.html" class="identifier">at</a>&lt; range, <a href="./int.html" class="identifier">int_</a>&lt;40&gt; &gt;::value), ==, 50 );
</pre>
<pre class="literal-block">
typedef <a href="./set.html" class="identifier">set</a>&lt; int const,long*,double &gt; s;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;s,char&gt;::type, <a href="./void.html" class="identifier">void_</a> &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;s,int&gt;::type, int > ));
</pre>
</div>
<div class="section" id="id184">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>, <a class="reference internal" href="./at-c.html">at_c</a>, <a class="reference internal" href="./front.html">front</a>, <a class="reference internal" href="./back.html">back</a></p>
<!-- Sequences/Intrinsic Metafunctions//at_c -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Prev</a>&nbsp;<a href="./at-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./at-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_AUX_LAMBDA_SUPPORT</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Prev</a>&nbsp;<a href="./terminology.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./broken-compiler-workarounds.html" class="navigation-link">Broken Compiler Workarounds</a> / <a href="./aux-lambda-support.html" class="navigation-link">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-aux-lambda-support">
<h1><a class="toc-backref" href="./broken-compiler-workarounds.html#id1609">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></h1>
<div class="section" id="id1384">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./aux-lambda-support.html" class="identifier">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>(arity, fun, params) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1385">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Enables metafunction <tt class="literal"><span class="pre">fun</span></tt> for the use in <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a>s on
compilers that don't support partial template specialization or/and
template template parameters. Expands to nothing on conforming compilers.</p>
</div>
<div class="section" id="id1386">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/aux_/lambda_support.hpp" class="header">boost/mpl/aux_/lambda_support.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1387">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">arity</span></tt></td>
<td>An integral constant</td>
<td>The metafunction's arity, i.e. the number of its
template parameters, including the defaults.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">fun</span></tt></td>
<td>A legal identifier token</td>
<td>The metafunction's name.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">params</span></tt></td>
<td>A <a class="reference external" href="http://www.boost.org/libs/preprocessor/doc/data/tuples.html" target="_top">PP-tuple</a></td>
<td>A tuple of the metafunction's parameter names, in
their original order, including the defaults.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1388">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">n</span></tt>, a <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">fun</span></tt>, and arbitrary types <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>:</p>
<pre class="literal-block">
template&lt; typename A1,<em>...</em> typename A<em>n</em> &gt; struct fun
{
// <em>...</em>
<a href="./aux-lambda-support.html" class="identifier">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>(n, fun, (A1,<em>...</em>A<em>n</em>))
};
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">Appears in <tt class="literal"><span class="pre">fun</span></tt>'s scope, immediately followed by the scope-closing
bracket (<tt class="literal"><span class="pre">}</span></tt>).</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Expands to nothing and has no effect on conforming compilers. On compilers that
don't support partial template specialization or/and template template parameters
expands to an unspecified token sequence enabling <tt class="literal"><span class="pre">fun</span></tt> to participate in
<a class="reference internal" href="./lambda-expression.html">Lambda Expression</a>s with the semantics described in this manual.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1389">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U = int &gt; struct f
{
typedef T type[sizeof(U)];
<a href="./aux-lambda-support.html" class="identifier">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>(2, f, (T,U))
};
typedef <a href="./apply.html" class="identifier">apply</a><tt class="literal"><span class="pre">1</span></tt>&lt; f&lt;char,<a href="./placeholders.html" class="identifier">_1</a>&gt;,long &gt;::type r;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r, char[sizeof(long)] > ));
</pre>
</div>
<div class="section" id="id1390">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Prev</a>&nbsp;<a href="./terminology.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Back Extensible Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./front-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./front-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./back-extensible-sequence.html" class="navigation-link">Back Extensible Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="back-extensible-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1400">Back Extensible Sequence</a></h1>
<div class="section" id="id23">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> is an <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> that supports amortized constant
time insertion and removal operations at the end.</p>
</div>
<div class="section" id="id24">
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></p>
</div>
<div class="section" id="id25">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>,
for any <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="35%" />
<col width="35%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-back.html" class="identifier">push_back</a>&lt;s,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-back.html" class="identifier">pop_back</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id26">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-back.html" class="identifier">push_back</a>&lt;s,x&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,<a href="./end.html" class="identifier">end</a>&lt;s&gt;::type,x&gt;::type</span></tt>;
see <a class="reference internal" href="./push-back.html">push_back</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-back.html" class="identifier">pop_back</a>&lt;v&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,<a href="./end.html" class="identifier">end</a>&lt;s&gt;::type&gt;::type</span></tt>;
see <a class="reference internal" href="./pop-back.html">pop_back</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
<td>The last element in the sequence; see <a class="reference internal" href="./back.html">back</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id27">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./deque.html">deque</a></li>
</ul>
</div>
<div class="section" id="id28">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a>, <a class="reference internal" href="./push-back.html">push_back</a>, <a class="reference internal" href="./pop-back.html">pop_back</a>, <a class="reference internal" href="./back.html">back</a></p>
<!-- Sequences/Concepts//Associative Sequence |70 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./front-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./front-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: back_inserter</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Prev</a>&nbsp;<a href="./front-inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./front-inserter.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./inserters.html" class="navigation-link">Inserters</a> / <a href="./back-inserter.html" class="navigation-link">back_inserter</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="back-inserter">
<h1><a class="toc-backref" href="./inserters.html#id1465">back_inserter</a></h1>
<div class="section" id="id465">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Seq
&gt;
struct <a href="./back-inserter.html" class="identifier">back_inserter</a>
{
// <em>unspecified</em>
// <em>...</em>
};
</pre>
</div>
<div class="section" id="id466">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Inserts elements at the end of the sequence.</p>
</div>
<div class="section" id="id467">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/back_inserter.hpp" class="header">boost/mpl/back_inserter.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id468">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./inserter.html">Inserter</a></p>
</div>
<div class="section" id="id469">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="18%" />
<col width="36%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Seq</span></tt></td>
<td><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td>A sequence to bind the inserter to.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id470">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./inserter.html">Inserter</a>.</p>
<p>For any <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./back-inserter.html" class="identifier">back_inserter</a>&lt;s&gt;</span></tt></td>
<td><p class="first">An <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>, equivalent to</p>
<pre class="last literal-block">
struct in : <a href="./inserter-class.html" class="identifier">inserter</a>&lt;s,<a href="./push-back.html" class="identifier">push_back</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt; > {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id471">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id472">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./copy.html" class="identifier">copy</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,5,10&gt;
, <a href="./back-inserter.html" class="identifier">back_inserter</a>&lt; <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,0,1,2,3,4&gt; &gt;
&gt;::type range;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; range, <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; > ));
</pre>
</div>
<div class="section" id="id473">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./inserter.html">Inserter</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./inserter-class.html">inserter (class)</a>, <a class="reference internal" href="./front-inserter.html">front_inserter</a>, <a class="reference internal" href="./push-back.html">push_back</a></p>
<!-- Algorithms/Inserters//front_inserter -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Prev</a>&nbsp;<a href="./front-inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./front-inserter.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: back</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./at-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./begin.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./at-c.html" class="navigation-link">Back</a>&nbsp;<a href="./begin.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./back.html" class="navigation-link">back</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="back">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1427">back</a></h1>
<div class="section" id="id193">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
&gt;
struct <a href="./back.html" class="identifier">back</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id194">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the last element in the sequence.</p>
</div>
<div class="section" id="id195">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/back.hpp" class="header">boost/mpl/back.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id196">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id197">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id198">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./back.html" class="identifier">back</a>&lt;s&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt; <a href="./prior.html" class="identifier">prior</a>&lt; <a href="./end.html" class="identifier">end</a>&lt;s&gt;::type &gt;::type &gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id199">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id200">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,1&gt; range1;
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; range2;
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,-10,0&gt; range3;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./back.html" class="identifier">back</a>&lt;range1&gt;::value, ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./back.html" class="identifier">back</a>&lt;range2&gt;::value, ==, 9 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./back.html" class="identifier">back</a>&lt;range3&gt;::value, ==, -1 );
</pre>
</div>
<div class="section" id="id201">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./front.html">front</a>, <a class="reference internal" href="./push-back.html">push_back</a>, <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./deref.html">deref</a>, <a class="reference internal" href="./at.html">at</a></p>
<!-- Sequences/Intrinsic Metafunctions//begin -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./at-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./begin.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./at-c.html" class="navigation-link">Back</a>&nbsp;<a href="./begin.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: begin</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back.html" class="navigation-link">Prev</a>&nbsp;<a href="./clear.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back.html" class="navigation-link">Back</a>&nbsp;<a href="./clear.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./begin.html" class="navigation-link">begin</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="begin">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1428">begin</a></h1>
<div class="section" id="id202">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename X
&gt;
struct <a href="./begin.html" class="identifier">begin</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id203">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an iterator that points to the first element of the sequence. If
the argument is not a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, returns <a class="reference internal" href="./void.html">void_</a>.</p>
</div>
<div class="section" id="id204">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/begin_end.hpp" class="header">boost/mpl/begin_end.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id205">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id206">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="18%" />
<col width="22%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">X</span></tt></td>
<td>Any type</td>
<td>A type whose begin iterator, if any, will be
returned.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id207">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./begin.html" class="identifier">begin</a>&lt;x&gt;::type first;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> or <a class="reference internal" href="./void.html">void_</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">x</span></tt> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">first</span></tt> is an iterator pointing to the
first element of <tt class="literal"><span class="pre">s</span></tt>; otherwise <tt class="literal"><span class="pre">first</span></tt> is <a class="reference internal" href="./void.html">void_</a>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body">If <tt class="literal"><span class="pre">first</span></tt> is an iterator, it is either dereferenceable or past-the-end; it
is past-the-end if and only if <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">0</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id208">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id209">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt; unsigned char,unsigned short,
unsigned int,unsigned long &gt; unsigned_types;
typedef <a href="./begin.html" class="identifier">begin</a>&lt;unsigned_types&gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type, unsigned char &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./begin.html" class="identifier">begin</a>&lt;int&gt;::type, <a href="./void.html" class="identifier">void_</a> > ));
</pre>
</div>
<div class="section" id="id210">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./size.html">size</a>, <a class="reference internal" href="./empty.html">empty</a></p>
<!-- Sequences/Intrinsic Metafunctions//clear -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back.html" class="navigation-link">Prev</a>&nbsp;<a href="./clear.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back.html" class="navigation-link">Back</a>&nbsp;<a href="./clear.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Bidirectional Iterator</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./forward-iterator.html" class="navigation-link">Prev</a>&nbsp;<a href="./random-access-iterator.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./forward-iterator.html" class="navigation-link">Back</a>&nbsp;<a href="./random-access-iterator.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterators-concepts.html" class="navigation-link">Concepts</a> / <a href="./bidirectional-iterator.html" class="navigation-link">Bidirectional Iterator</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bidirectional-iterator">
<h1><a class="toc-backref" href="./iterators-concepts.html#id1451">Bidirectional Iterator</a></h1>
<div class="section" id="id390">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a> is a <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> that provides a way to
obtain an iterator to the previous element in a sequence.</p>
</div>
<div class="section" id="id391">
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></p>
</div>
<div class="section" id="id392">
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple">
<li>a bidirectional iterator <tt class="literal"><span class="pre">i</span></tt> is <cite>decrementable</cite> if there is a &quot;previous&quot;
iterator, that is, if <tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span></tt> expression is well-defined;
iterators pointing to the first element of the sequence are not
decrementable.</li>
</ul>
</div>
<div class="section" id="id393">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>,
the following requirements must be met.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="25%" />
<col width="46%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre">i::category</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a>, convertible
to <tt class="literal"><span class="pre">bidirectional_iterator_tag</span></tt></td>
<td>Constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id394">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<pre class="literal-block">
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">i</span></tt> is decrementable</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is an iterator pointing to the previous element of the
sequence</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is dereferenceable and incrementable</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id395">
<h3><a class="subsection-title" href="#invariants" name="invariants">Invariants</a></h3>
<p>For any bidirectional iterators <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> the following invariants
always hold:</p>
<ul class="simple">
<li>If <tt class="literal"><span class="pre">i</span></tt> is incrementable, then <tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;</span> <span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span> <span class="pre">&gt;::type</span></tt> is a null
operation; similarly, if <tt class="literal"><span class="pre">i</span></tt> is decrementable, <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;</span> <span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span> <span class="pre">&gt;::type</span></tt>
is a null operation.</li>
</ul>
</div>
<div class="section" id="id396">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>, <a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a>, <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./prior.html">prior</a></p>
<!-- Iterators/Concepts//Random Access Iterator |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./forward-iterator.html" class="navigation-link">Prev</a>&nbsp;<a href="./random-access-iterator.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./forward-iterator.html" class="navigation-link">Back</a>&nbsp;<a href="./random-access-iterator.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Bidirectional Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./forward-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./random-access-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./forward-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./random-access-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./bidirectional-sequence.html" class="navigation-link">Bidirectional Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bidirectional-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1396">Bidirectional Sequence</a></h1>
<div class="section" id="id1">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> whose iterators model
<a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a>.</p>
</div>
<div class="section" id="refinement-of">
<h3>Refinement of</h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></p>
</div>
<div class="section" id="id2">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>,
for any <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="30%" />
<col width="39%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id3">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="28%" />
<col width="72%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
<td>The last element in the sequence; see <a class="reference internal" href="./back.html">back</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id4">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./range-c.html">range_c</a></li>
</ul>
</div>
<div class="section" id="id5">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./back.html">back</a></p>
<!-- Sequences/Concepts//Random Access Sequence |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./forward-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./random-access-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./forward-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./random-access-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bind</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Prev</a>&nbsp;<a href="./quote.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Back</a>&nbsp;<a href="./quote.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument-binding.html" class="navigation-link">Composition and Argument Binding</a> / <a href="./bind.html" class="navigation-link">bind</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bind">
<h1><a class="toc-backref" href="./composition-and-argument-binding.html#id1531">bind</a></h1>
<div class="section" id="id929">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename F
&gt;
struct bind0
{
// <em>unspecified</em>
// <em>...</em>
};
template&lt;
typename F, typename A1
&gt;
struct bind1
{
// <em>unspecified</em>
// <em>...</em>
};
<em>...</em>
template&lt;
typename F, typename A1,<em>...</em> typename An
&gt;
struct <a href="./bind.html" class="identifier">bind</a><em>n</em>
{
// <em>unspecified</em>
// <em>...</em>
};
template&lt;
typename F
, typename A1 = <em>unspecified</em>
<em>...</em>
, typename An = <em>unspecified</em>
&gt;
struct <a href="./bind.html" class="identifier">bind</a>
{
// <em>unspecified</em>
// <em>...</em>
};
</pre>
</div>
<div class="section" id="id930">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./bind.html" class="identifier">bind</a></span></tt> is a higher-order primitive for <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> composition
and argument binding. In essence, it's a compile-time counterpart of
the similar run-time functionality provided by <a class="reference external" href="http://www.boost.org/libs/bind/bind.html" target="_top">Boost.Bind</a> and <a class="reference external" href="http://www.boost.org/libs/lambda/doc/index.html" target="_top">Boost.Lambda</a>
libraries.</p>
</div>
<div class="section" id="id931">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bind.hpp" class="header">boost/mpl/bind.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id932">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></p>
</div>
<div class="section" id="id933">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F</span></tt></td>
<td><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></td>
<td>An metafunction class to perform binding on.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt></td>
<td>Any type</td>
<td>Arguments to bind.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id934">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./bind.html" class="identifier">bind</a>&lt;f,a1,...a<em>n</em>&gt; g;
typedef <a href="./bind.html" class="identifier">bind</a><em>n</em>&lt;f,a1,...a<em>n</em>&gt; g;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" id="bind-semantics" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
struct g
{
template&lt;
typename U1 = <em>unspecified</em>
<em>...</em>
, typename U<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./apply.html" class="identifier">apply</a>
: <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt;
typename h0&lt;f,U1,<em>...</em>U<em>n</em>&gt;::type
, typename h1&lt;a1,U1,<em>...</em>U<em>n</em>&gt;::type
<em>...</em>
, typename h<em>n</em>&lt;a<em>n</em>,U1,<em>...</em>U<em>n</em>&gt;::type
>
{
};
};
</pre>
<p>where <tt class="literal"><span class="pre">h</span></tt><em>k</em> is equivalent to</p>
<pre class="literal-block">
template&lt; typename X, typename U1,<em>...</em> typename U<em>n</em> &gt; struct h<em>k</em>
: <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt;X,U1,<em>...</em>U<em>n</em>&gt;
{
};
</pre>
<p>if <tt class="literal"><span class="pre">f</span></tt> or <tt class="literal"><span class="pre">a</span></tt><em>k</em> is a <a class="reference internal" href="./terminology.html#bind-expression">bind expression</a> or a <a class="reference internal" href="./placeholders.html#placeholder">placeholder</a>, and</p>
<pre class="literal-block">
template&lt; typename X, typename U1,<em>...</em> typename U<em>n</em> &gt; struct h<em>k</em>
{
typedef X type;
};
</pre>
<p class="last">otherwise. [<em>Note:</em> Every <tt class="literal"><span class="pre">n</span></tt>th appearance of the <a class="reference internal" href="./placeholders.html">unnamed placeholder</a>
in the <tt class="literal"><span class="pre"><a href="./bind.html" class="identifier">bind</a>&lt;f,a1,...an&gt;</span></tt> specialization is replaced with the corresponding
numbered placeholder <tt class="literal"><span class="pre">_</span></tt><em>n</em><em>end note</em>]</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id936">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct f1
{
template&lt; typename T1 &gt; struct <a href="./apply.html" class="identifier">apply</a>
{
typedef T1 type;
};
};
struct f5
{
template&lt; typename T1, typename T2, typename T3, typename T4, typename T5 &gt;
struct <a href="./apply.html" class="identifier">apply</a>
{
typedef T5 type;
};
};
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">1</span></tt>&lt;f1,<a href="./placeholders.html" class="identifier">_1</a>&gt;
, int
&gt;::type r11;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">1</span></tt>&lt;f1,<a href="./placeholders.html" class="identifier">_5</a>&gt;
, void,void,void,void,int
&gt;::type r12;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r11,int&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r12,int&gt; ));
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">5</span></tt>&lt;f5,<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>,<a href="./placeholders.html" class="identifier">_3</a>,<a href="./placeholders.html" class="identifier">_4</a>,<a href="./placeholders.html" class="identifier">_5</a>&gt;
, void,void,void,void,int
&gt;::type r51;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">5</span></tt>&lt;f5,<a href="./placeholders.html" class="identifier">_5</a>,<a href="./placeholders.html" class="identifier">_4</a>,<a href="./placeholders.html" class="identifier">_3</a>,<a href="./placeholders.html" class="identifier">_2</a>,<a href="./placeholders.html" class="identifier">_1</a>&gt;
, int,void,void,void,void
&gt;::type r52;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r51,int&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r52,int&gt; ));
</pre>
</div>
<div class="section" id="id937">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./composition-and-argument-binding.html">Composition and Argument Binding</a>, <a class="reference internal" href="./invocation.html">invocation</a>, <a class="reference internal" href="./placeholders.html">Placeholders</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./quote.html">quote</a>,
<a class="reference internal" href="./protect.html">protect</a>, <a class="reference internal" href="./apply.html">apply</a>, <a class="reference internal" href="./apply-wrap.html">apply_wrap</a></p>
<!-- Metafunctions/Composition and Argument Binding//quote |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Prev</a>&nbsp;<a href="./quote.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Back</a>&nbsp;<a href="./quote.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bitand_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitor.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bitor.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a> / <a href="./bitand.html" class="navigation-link">bitand_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitand">
<h1><a class="toc-backref" href="./bitwise-operations.html#id1554">bitand_</a></h1>
<div class="section" id="id1089">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
, typename T3 = <em>unspecified</em>
<em>...</em>
, typename T<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./bitand.html" class="identifier">bitand_</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1090">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of <em>bitwise and</em> (<tt class="literal"><span class="pre">&amp;</span></tt>) operation of its arguments.</p>
</div>
<div class="section" id="id1091">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bitand.hpp" class="header">boost/mpl/bitand.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/bitwise.hpp" class="header">boost/mpl/bitwise.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1092">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1093">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1094">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value &amp; c2::value)
, ( c1::value &amp; c2::value )
&gt; c;
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1095">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1096">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0&gt; u0;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,1&gt; u1;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,2&gt; u2;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,8&gt; u8;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0xffffffff&gt; uffffffff;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u0,u0&gt;::value), ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u1,u0&gt;::value), ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u0,u1&gt;::value), ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u0,uffffffff&gt;::value), ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u1,uffffffff&gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u8,uffffffff&gt;::value), ==, 8 );
</pre>
</div>
<div class="section" id="id1097">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./bitor.html">bitor_</a>, <a class="reference internal" href="./bitxor.html">bitxor_</a>, <a class="reference internal" href="./shift-left.html">shift_left</a></p>
<!-- Metafunctions/Bitwise Operations//bitor_ -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitor.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bitor.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bitor_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitand.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitxor.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitand.html" class="navigation-link">Back</a>&nbsp;<a href="./bitxor.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a> / <a href="./bitor.html" class="navigation-link">bitor_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitor">
<h1><a class="toc-backref" href="./bitwise-operations.html#id1555">bitor_</a></h1>
<div class="section" id="id1098">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
, typename T3 = <em>unspecified</em>
<em>...</em>
, typename T<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./bitor.html" class="identifier">bitor_</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1099">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of <em>bitwise or</em> (<tt class="literal"><span class="pre">|</span></tt>) operation of its arguments.</p>
</div>
<div class="section" id="id1100">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bitor.hpp" class="header">boost/mpl/bitor.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/bitwise.hpp" class="header">boost/mpl/bitwise.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1101">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1102">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1103">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value | c2::value)
, ( c1::value | c2::value )
&gt; c;
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1104">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1105">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0&gt; u0;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,1&gt; u1;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,2&gt; u2;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,8&gt; u8;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0xffffffff&gt; uffffffff;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u0,u0&gt;::value), ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u1,u0&gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u0,u1&gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u0,uffffffff&gt;::value), ==, 0xffffffff );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u1,uffffffff&gt;::value), ==, 0xffffffff );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u8,uffffffff&gt;::value), ==, 0xffffffff );
</pre>
</div>
<div class="section" id="id1106">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./bitand.html">bitand_</a>, <a class="reference internal" href="./bitxor.html">bitxor_</a>, <a class="reference internal" href="./shift-left.html">shift_left</a></p>
<!-- Metafunctions/Bitwise Operations//bitxor_ -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitand.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitxor.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitand.html" class="navigation-link">Back</a>&nbsp;<a href="./bitxor.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Bitwise Operations</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./not.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitand.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Back</a>&nbsp;<a href="./trivial.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitwise-operations">
<h1><a class="toc-backref" href="./metafunctions.html#id1553">Bitwise Operations</a></h1>
<span class="target" id="label-metafunctions-bitwise-operations"></span><!-- Metafunctions/Bitwise Operations//bitand_ -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./bitand.html" id="id1554">bitand_</a></li>
<li><a class="reference internal" href="./bitor.html" id="id1555">bitor_</a></li>
<li><a class="reference internal" href="./bitxor.html" id="id1556">bitxor_</a></li>
<li><a class="reference internal" href="./shift-left.html" id="id1557">shift_left</a></li>
<li><a class="reference internal" href="./shift-right.html" id="id1558">shift_right</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./not.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitand.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Back</a>&nbsp;<a href="./trivial.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bitxor_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitor.html" class="navigation-link">Prev</a>&nbsp;<a href="./shift-left.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitor.html" class="navigation-link">Back</a>&nbsp;<a href="./shift-left.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a> / <a href="./bitxor.html" class="navigation-link">bitxor_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitxor">
<h1><a class="toc-backref" href="./bitwise-operations.html#id1556">bitxor_</a></h1>
<div class="section" id="id1107">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
, typename T3 = <em>unspecified</em>
<em>...</em>
, typename T<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./bitxor.html" class="identifier">bitxor_</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1108">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of <em>bitwise xor</em> (<tt class="literal"><span class="pre">^</span></tt>) operation of its arguments.</p>
</div>
<div class="section" id="id1109">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bitxor.hpp" class="header">boost/mpl/bitxor.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/bitwise.hpp" class="header">boost/mpl/bitwise.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1110">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1111">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1112">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value ^ c2::value)
, ( c1::value ^ c2::value )
&gt; c;
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1113">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1114">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0&gt; u0;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,1&gt; u1;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,2&gt; u2;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,8&gt; u8;
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0xffffffff&gt; uffffffff;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u0,u0&gt;::value), ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u1,u0&gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u0,u1&gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u0,uffffffff&gt;::value), ==, 0xffffffff ^ 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u1,uffffffff&gt;::value), ==, 0xffffffff ^ 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u8,uffffffff&gt;::value), ==, 0xffffffff ^ 8 );
</pre>
</div>
<div class="section" id="id1115">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./bitand.html">bitand_</a>, <a class="reference internal" href="./bitor.html">bitor_</a>, <a class="reference internal" href="./shift-left.html">shift_left</a></p>
<!-- Metafunctions/Bitwise Operations//shift_left -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitor.html" class="navigation-link">Prev</a>&nbsp;<a href="./shift-left.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitor.html" class="navigation-link">Back</a>&nbsp;<a href="./shift-left.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bool_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Prev</a>&nbsp;<a href="./int.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./int.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./numeric.html" class="navigation-link">Numeric</a> / <a href="./bool.html" class="navigation-link">bool_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bool">
<h1><a class="toc-backref" href="./numeric.html#id1576">bool_</a></h1>
<div class="section" id="id1222">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
bool C
&gt;
struct <a href="./bool.html" class="identifier">bool_</a>
{
// <em>unspecified</em>
// ...
};
typedef <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt; <a href="./bool.html" class="identifier">true_</a>;
typedef <a href="./bool.html" class="identifier">bool_</a>&lt;false&gt; <a href="./bool.html" class="identifier">false_</a>;
</pre>
</div>
<div class="section" id="id1223">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> wrapper.</p>
</div>
<div class="section" id="id1224">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bool.hpp" class="header">boost/mpl/bool.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1225">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
</div>
<div class="section" id="id1226">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="42%" />
<col width="37%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">C</span></tt></td>
<td>A boolean integral constant</td>
<td>A value to wrap.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1227">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
<p>For arbitrary integral constant <tt class="literal"><span class="pre">c</span></tt>:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;</span></tt></td>
<td>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">x</span></tt> such that <tt class="literal"><span class="pre">x::value</span> <span class="pre">==</span> <span class="pre">c</span></tt>
and <tt class="literal"><span class="pre">x::<a href="./value-type.html" class="identifier">value_type</a></span></tt> is identical to <tt class="literal"><span class="pre">bool</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1228">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;::<a href="./value-type.html" class="identifier">value_type</a>, bool &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;, <a href="./bool.html" class="identifier">true_</a> &gt; )); }
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;::type, <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt; &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;::value, ==, true );
assert( <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;() == true );
</pre>
</div>
<div class="section" id="id1229">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./int.html">int_</a>, <a class="reference internal" href="./long.html">long_</a>, <a class="reference internal" href="./integral-c.html">integral_c</a></p>
<!-- Data Types/Numeric//int_ |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Prev</a>&nbsp;<a href="./int.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./int.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Broken Compiler Workarounds</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./limit-unrolling.html" class="navigation-link">Prev</a>&nbsp;<a href="./aux-lambda-support.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./broken-compiler-workarounds.html" class="navigation-link">Broken Compiler Workarounds</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="broken-compiler-workarounds">
<h1><a class="toc-backref" href="./macros.html#id1608">Broken Compiler Workarounds</a></h1>
<!-- Macros/Broken Compiler Workarounds//BOOST_MPL_AUX_LAMBDA_SUPPORT -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./aux-lambda-support.html" id="id1609">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./limit-unrolling.html" class="navigation-link">Prev</a>&nbsp;<a href="./aux-lambda-support.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: c_str</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./string-operations.html" class="navigation-link">String Operations</a> / <a href="./c-str.html" class="navigation-link">c_str</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="c-str">
<h1><a class="toc-backref" href="./string-operations.html#id1562">c_str</a></h1>
<div class="section" id="id1137">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
&gt;
struct <a href="./c-str.html" class="identifier">c_str</a>
{
typedef <em>unspecified</em> type;
static char const value[];
};
</pre>
</div>
<div class="section" id="id1138">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./c-str.html" class="identifier">c_str</a></span></tt> converts the <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">Sequence</span></tt>
into a null-terminated byte string containing an equivalent sequence.</p>
</div>
<div class="section" id="id1139">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/string.hpp" class="header">boost/mpl/string.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1140">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
</div>
<div class="section" id="id1141">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of
<a class="reference internal" href="./integral-constant.html">Integral Constant</a>s</td>
<td>A sequence to be converted into a
null-terminated byte string.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1142">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">s</span></tt>,</p>
<pre class="compound-middle literal-block">
<a href="./c-str.html" class="identifier">c_str</a>&lt;s&gt;::value;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A null-terminated byte string.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">&lt;=</span> <span class="pre">BOOST_MPL_STRING_MAX_LENGTH</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
char const value[] = {
<a href="./at.html" class="identifier">at</a>&lt;s, 0&gt;::type::value
, ...
, <a href="./at.html" class="identifier">at</a>&lt;s, <a href="./size.html" class="identifier">size</a>&lt;s&gt;::value-1&gt;::type::value
, '\0'
};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="id1143">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Linear.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1144">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;char,'h','e','l','l','o'&gt; hello;
assert( 0 == std::strcmp( <a href="./c-str.html" class="identifier">c_str</a>&lt;hello&gt;::value, &quot;hello&quot; ) );
</pre>
</div>
<div class="section" id="id1145">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./string.html">string</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Prev</a>&nbsp;<a href="./components.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./components.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a> / <a href="./categorized-index-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id1391">
<h1><a class="toc-backref" href="./categorized-index.html#id1612"><a class="subsection-title" href="#concepts" name="concepts">Concepts</a></a></h1>
<ul class="simple" id="label-categorized-index-concepts">
<li><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></li>
<li><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
<li><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></li>
<li><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a></li>
<li><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></li>
<li><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></li>
<li><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></li>
<li><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></li>
<li><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
<li><a class="reference internal" href="./inserter.html">Inserter</a></li>
<li><a class="reference internal" href="./integral-constant.html">Integral Constant</a></li>
<li><a class="reference internal" href="./integral-sequence-wrapper.html">Integral Sequence Wrapper</a></li>
<li><a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></li>
<li><a class="reference internal" href="./metafunction.html">Metafunction</a></li>
<li><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></li>
<li><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></li>
<li><a class="reference internal" href="./placeholder-expression.html">Placeholder Expression</a></li>
<li><a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a></li>
<li><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></li>
<li><a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a></li>
<li><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></li>
<li><a class="reference internal" href="./trivial-metafunction.html">Trivial Metafunction</a></li>
<li><a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Prev</a>&nbsp;<a href="./components.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./components.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Categorized Index</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Prev</a>&nbsp;<a href="./categorized-index-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Back</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="categorized-index">
<h1><a class="toc-backref" href="../refmanual.html#id1611">Categorized Index</a></h1>
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./categorized-index-concepts.html" id="id1612">Concepts</a></li>
<li><a class="reference internal" href="./components.html" id="id1613">Components</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Prev</a>&nbsp;<a href="./categorized-index-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Back</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Prev</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Back</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-has-xxx-template.html" class="navigation-link">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-cfg-no-has-xxx-template">
<h1><a class="toc-backref" href="./configuration.html#id1600">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></h1>
<div class="section" id="id1350">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
// #define <a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>
</pre>
</div>
<div class="section" id="id1351">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></span></tt> is a boolean configuration
macro signaling availability of the <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a> /
<a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a> introspection macros'
functionality on a particular compiler.</p>
</div>
<div class="section" id="id1352">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./configuration.html">Configuration</a>, <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>, <a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></p>
<!-- Macros/Configuration//BOOST_MPL_LIMIT_METAFUNCTION_ARITY |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Prev</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Back</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"></div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_CFG_NO_HAS_XXX</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Back</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-has-xxx.html" class="navigation-link">BOOST_MPL_CFG_NO_HAS_XXX</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-cfg-no-has-xxx">
<h1><a class="toc-backref" href="./configuration.html#id1599">BOOST_MPL_CFG_NO_HAS_XXX</a></h1>
<div class="section" id="id1347">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
// #define <a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a>
</pre>
</div>
<div class="section" id="id1348">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a></span></tt> is an boolean configuration macro
signaling availability of the <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a> /
<a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a> introspection macros' functionality
on a particular compiler.</p>
</div>
<div class="section" id="id1349">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./configuration.html">Configuration</a>, <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>, <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></p>
<!-- Macros/Configuration//BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE |20 -->
<!-- Copyright Daniel Walker 2007. -->
<!-- Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Back</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-preprocessed-headers.html" class="navigation-link">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-cfg-no-preprocessed-headers">
<h1><a class="toc-backref" href="./configuration.html#id1598">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></h1>
<div class="section" id="id1343">
<span id="boost-mpl-cfg-no-preprocessed"></span><h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
// #define <a href="./cfg-no-preprocessed-headers.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a>
</pre>
</div>
<div class="section" id="id1344">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./cfg-no-preprocessed-headers.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></span></tt> is an boolean configuration macro
regulating library's internal use of preprocessed headers. When defined, it
instructs the MPL to discard the pre-generated headers found in
<tt class="literal"><span class="pre">boost/mpl/aux_/preprocessed</span></tt> directory and use <a class="reference external" href="http://boost-consulting.com/tmpbook/preprocessor.html" target="_top">preprocessor
metaprogramming</a> techniques to generate the necessary versions of the
library components on the fly.</p>
<p>In this implementation of the library, the macro is not defined by default.
To change the default configuration, define
<tt class="literal"><span class="pre"><a href="./cfg-no-preprocessed-headers.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></span></tt> before including any library
header.</p>
</div>
<div class="section" id="id1346">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./configuration.html">Configuration</a></p>
<!-- Macros/Configuration//BOOST_MPL_CFG_NO_HAS_XXX |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: char_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./numeric.html" class="navigation-link">Numeric</a> / <a href="./char.html" class="navigation-link">char_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="char">
<h1><a class="toc-backref" href="./numeric.html#id1581">char_</a></h1>
<div class="section" id="id1262">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
char N
&gt;
struct <a href="./char.html" class="identifier">char_</a>
{
// <em>unspecified</em>
// ...
};
</pre>
</div>
<div class="section" id="id1263">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> wrapper for <tt class="literal"><span class="pre">char</span></tt>.</p>
</div>
<div class="section" id="id1264">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/char.hpp" class="header">boost/mpl/char.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1265">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
</div>
<div class="section" id="id1266">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="42%" />
<col width="37%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
<td>A character constant</td>
<td>A value to wrap.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1267">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
<p>For arbitrary character constant <tt class="literal"><span class="pre">c</span></tt>:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./char.html" class="identifier">char_</a>&lt;c&gt;</span></tt></td>
<td>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">x</span></tt> such that <tt class="literal"><span class="pre">x::value</span> <span class="pre">==</span> <span class="pre">c</span></tt>
and <tt class="literal"><span class="pre">x::<a href="./value-type.html" class="identifier">value_type</a></span></tt> is identical to <tt class="literal"><span class="pre">char</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1268">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./char.html" class="identifier">char_</a>&lt;'c'&gt; c;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; c::<a href="./value-type.html" class="identifier">value_type</a>, char &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; c::type, c &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./next.html" class="identifier">next</a>&lt; c &gt;::type, <a href="./char.html" class="identifier">char_</a>&lt;'d'&gt; &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./prior.html" class="identifier">prior</a>&lt; c &gt;::type, <a href="./char.html" class="identifier">char_</a>&lt;'b'&gt; &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (c::value), ==, 'c' );
assert( c() == 'c' );
</pre>
</div>
<div class="section" id="id1269">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./int.html">int_</a>, <a class="reference internal" href="./size-t.html">size_t</a>, <a class="reference internal" href="./integral-c.html">integral_c</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Classes</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./variadic-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./vector.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Back</a>&nbsp;<a href="./views.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./classes.html" class="navigation-link">Classes</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="classes">
<h1><a class="toc-backref" href="./sequences.html#id1405">Classes</a></h1>
<p id="label-sequences-classes">The MPL provides a large number of predefined general-purpose sequence
classes covering most of the typical metaprogramming needs out-of-box.</p>
<!-- For all library-supplied sequences a publicly-derived class with no additional
members is equivalent except for type identity. -->
<!-- Sequences/Classes//vector |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./vector.html" id="id1406">vector</a></li>
<li><a class="reference internal" href="./list.html" id="id1407">list</a></li>
<li><a class="reference internal" href="./deque.html" id="id1408">deque</a></li>
<li><a class="reference internal" href="./set.html" id="id1409">set</a></li>
<li><a class="reference internal" href="./map.html" id="id1410">map</a></li>
<li><a class="reference internal" href="./range-c.html" id="id1411">range_c</a></li>
<li><a class="reference internal" href="./vector-c.html" id="id1412">vector_c</a></li>
<li><a class="reference internal" href="./list-c.html" id="id1413">list_c</a></li>
<li><a class="reference internal" href="./set-c.html" id="id1414">set_c</a></li>
<li><a class="reference internal" href="./string.html" id="id1415">string</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./variadic-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./vector.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Back</a>&nbsp;<a href="./views.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: clear</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./begin.html" class="navigation-link">Prev</a>&nbsp;<a href="./empty.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./begin.html" class="navigation-link">Back</a>&nbsp;<a href="./empty.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./clear.html" class="navigation-link">clear</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="clear">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1429">clear</a></h1>
<div class="section" id="id211">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
&gt;
struct <a href="./clear.html" class="identifier">clear</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id212">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an empty sequence <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">Sequence</span></tt>.</p>
</div>
<div class="section" id="id213">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/clear.hpp" class="header">boost/mpl/clear.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id214">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id215">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="39%" />
<col width="44%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>A sequence to get an empty &quot;copy&quot; of.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id216">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt; s, <a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type, <a href="./end.html" class="identifier">end</a>&lt;s&gt;::type &gt;::type t;
</pre>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id217">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id218">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,1,3,5,7,9,11&gt; odds;
typedef <a href="./clear.html" class="identifier">clear</a>&lt;odds&gt;::type nothing;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./empty.html" class="identifier">empty</a>&lt;nothing&gt; ));
</pre>
</div>
<div class="section" id="id219">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./empty.html">empty</a>, <a class="reference internal" href="./begin.html">begin</a>, <a class="reference internal" href="./end.html">end</a></p>
<!-- Sequences/Intrinsic Metafunctions//empty -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./begin.html" class="navigation-link">Prev</a>&nbsp;<a href="./empty.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./begin.html" class="navigation-link">Back</a>&nbsp;<a href="./empty.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Comparisons</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./negate.html" class="navigation-link">Prev</a>&nbsp;<a href="./less.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./arithmetic-operations.html" class="navigation-link">Back</a>&nbsp;<a href="./logical-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="comparisons">
<h1><a class="toc-backref" href="./metafunctions.html#id1542">Comparisons</a></h1>
<span class="target" id="label-metafunctions-comparisons"></span><!-- Metafunctions/Comparisons//less |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./less.html" id="id1543">less</a></li>
<li><a class="reference internal" href="./less-equal.html" id="id1544">less_equal</a></li>
<li><a class="reference internal" href="./greater.html" id="id1545">greater</a></li>
<li><a class="reference internal" href="./greater-equal.html" id="id1546">greater_equal</a></li>
<li><a class="reference internal" href="./equal-to.html" id="id1547">equal_to</a></li>
<li><a class="reference internal" href="./not-equal-to.html" id="id1548">not_equal_to</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./negate.html" class="navigation-link">Prev</a>&nbsp;<a href="./less.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./arithmetic-operations.html" class="navigation-link">Back</a>&nbsp;<a href="./logical-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Components</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a> / <a href="./components.html" class="navigation-link">Components</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="components">
<h1><a class="toc-backref" href="./categorized-index.html#id1613">Components</a></h1>
<ul class="simple" id="label-categorized-index-components">
<li><a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a></li>
<li><a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a></li>
<li><a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a></li>
<li><a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></li>
<li><a class="reference internal" href="./aux-lambda-support.html">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></li>
<li><a class="reference internal" href="./cfg-no-preprocessed-headers.html">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></li>
<li><a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a></li>
<li><a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></li>
<li><a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></li>
<li><a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></li>
<li><a class="reference internal" href="./limit-list-size.html">BOOST_MPL_LIMIT_LIST_SIZE</a></li>
<li><a class="reference internal" href="./limit-map-size.html">BOOST_MPL_LIMIT_MAP_SIZE</a></li>
<li><a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></li>
<li><a class="reference internal" href="./limit-set-size.html">BOOST_MPL_LIMIT_SET_SIZE</a></li>
<li><a class="reference internal" href="./limit-string-size.html">BOOST_MPL_LIMIT_STRING_SIZE</a></li>
<li><a class="reference internal" href="./limit-unrolling.html">BOOST_MPL_LIMIT_UNROLLING</a></li>
<li><a class="reference internal" href="./limit-vector-size.html">BOOST_MPL_LIMIT_VECTOR_SIZE</a></li>
<li><a class="reference internal" href="./trivial-metafunctions-summary.html">Trivial Metafunctions Summary</a></li>
<li><a class="reference internal" href="./placeholders.html">_1</a>, <a class="reference internal" href="./placeholders.html">_2</a>, <a class="reference internal" href="./placeholders.html">_3</a>,<em>...</em></li>
<li><a class="reference internal" href="./accumulate.html">accumulate</a></li>
<li><a class="reference internal" href="./advance.html">advance</a></li>
<li><a class="reference internal" href="./always.html">always</a></li>
<li><a class="reference internal" href="./and.html">and_</a></li>
<li><a class="reference internal" href="./apply.html">apply</a></li>
<li><a class="reference internal" href="./apply-wrap.html">apply_wrap</a></li>
<li><a class="reference internal" href="./arg.html">arg</a></li>
<li><a class="reference internal" href="./at.html">at</a></li>
<li><a class="reference internal" href="./at-c.html">at_c</a></li>
<li><a class="reference internal" href="./back.html">back</a></li>
<li><a class="reference internal" href="./back-inserter.html">back_inserter</a></li>
<li><a class="reference internal" href="./begin.html">begin</a></li>
<li><a class="reference internal" href="./bind.html">bind</a></li>
<li><a class="reference internal" href="./bitand.html">bitand_</a></li>
<li><a class="reference internal" href="./bitor.html">bitor_</a></li>
<li><a class="reference internal" href="./bitxor.html">bitxor_</a></li>
<li><a class="reference internal" href="./bool.html">bool_</a></li>
<li><a class="reference internal" href="./c-str.html">c_str</a></li>
<li><a class="reference internal" href="./char.html">char_</a></li>
<li><a class="reference internal" href="./clear.html">clear</a></li>
<li><a class="reference internal" href="./contains.html">contains</a></li>
<li><a class="reference internal" href="./copy.html">copy</a></li>
<li><a class="reference internal" href="./copy-if.html">copy_if</a></li>
<li><a class="reference internal" href="./count.html">count</a></li>
<li><a class="reference internal" href="./count-if.html">count_if</a></li>
<li><a class="reference internal" href="./deque.html">deque</a></li>
<li><a class="reference internal" href="./deref.html">deref</a></li>
<li><a class="reference internal" href="./distance.html">distance</a></li>
<li><a class="reference internal" href="./divides.html">divides</a></li>
<li><a class="reference internal" href="./empty.html">empty</a></li>
<li><a class="reference internal" href="./empty-base.html">empty_base</a></li>
<li><a class="reference internal" href="./empty-sequence.html">empty_sequence</a></li>
<li><a class="reference internal" href="./end.html">end</a></li>
<li><a class="reference internal" href="./equal.html">equal</a></li>
<li><a class="reference internal" href="./equal-to.html">equal_to</a></li>
<li><a class="reference internal" href="./erase.html">erase</a></li>
<li><a class="reference internal" href="./erase-key.html">erase_key</a></li>
<li><a class="reference internal" href="./eval-if.html">eval_if</a></li>
<li><a class="reference internal" href="./eval-if-c.html">eval_if_c</a></li>
<li><a class="reference internal" href="./filter-view.html">filter_view</a></li>
<li><a class="reference internal" href="./find.html">find</a></li>
<li><a class="reference internal" href="./find-if.html">find_if</a></li>
<li><a class="reference internal" href="./fold.html">fold</a></li>
<li><a class="reference internal" href="./for-each.html">for_each</a></li>
<li><a class="reference internal" href="./front.html">front</a></li>
<li><a class="reference internal" href="./front-inserter.html">front_inserter</a></li>
<li><a class="reference internal" href="./greater.html">greater</a></li>
<li><a class="reference internal" href="./greater-equal.html">greater_equal</a></li>
<li><a class="reference internal" href="./has-key.html">has_key</a></li>
<li><a class="reference internal" href="./identity.html">identity</a></li>
<li><a class="reference internal" href="./if.html">if_</a></li>
<li><a class="reference internal" href="./if-c.html">if_c</a></li>
<li><a class="reference internal" href="./inherit.html">inherit</a></li>
<li><a class="reference internal" href="./inherit-linearly.html">inherit_linearly</a></li>
<li><a class="reference internal" href="./insert.html">insert</a></li>
<li><a class="reference internal" href="./insert-range.html">insert_range</a></li>
<li><a class="reference internal" href="./inserter.html">Inserter</a></li>
<li><a class="reference internal" href="./int.html">int_</a></li>
<li><a class="reference internal" href="./integral-c.html">integral_c</a></li>
<li><a class="reference internal" href="./is-sequence.html">is_sequence</a></li>
<li><a class="reference internal" href="./iter-fold.html">iter_fold</a></li>
<li><a class="reference internal" href="./iterator-category.html">iterator_category</a></li>
<li><a class="reference internal" href="./iterator-range.html">iterator_range</a></li>
<li><a class="reference internal" href="./joint-view.html">joint_view</a></li>
<li><a class="reference internal" href="./key-type.html">key_type</a></li>
<li><a class="reference internal" href="./lambda.html">lambda</a></li>
<li><a class="reference internal" href="./less.html">less</a></li>
<li><a class="reference internal" href="./less-equal.html">less_equal</a></li>
<li><a class="reference internal" href="./list.html">list</a></li>
<li><a class="reference internal" href="./list-c.html">list_c</a></li>
<li><a class="reference internal" href="./long.html">long_</a></li>
<li><a class="reference internal" href="./lower-bound.html">lower_bound</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
<li><a class="reference internal" href="./max.html">max</a></li>
<li><a class="reference internal" href="./max-element.html">max_element</a></li>
<li><a class="reference internal" href="./min.html">min</a></li>
<li><a class="reference internal" href="./min-element.html">min_element</a></li>
<li><a class="reference internal" href="./minus.html">minus</a></li>
<li><a class="reference internal" href="./modulus.html">modulus</a></li>
<li><a class="reference internal" href="./negate.html">negate</a></li>
<li><a class="reference internal" href="./next.html">next</a></li>
<li><a class="reference internal" href="./not.html">not_</a></li>
<li><a class="reference internal" href="./not-equal-to.html">not_equal_to</a></li>
<li><a class="reference internal" href="./numeric-cast.html">numeric_cast</a></li>
<li><a class="reference internal" href="./or.html">or_</a></li>
<li><a class="reference internal" href="./order.html">order</a></li>
<li><a class="reference internal" href="./pair.html">pair</a></li>
<li><a class="reference internal" href="./partition.html">partition</a></li>
<li><a class="reference internal" href="./plus.html">plus</a></li>
<li><a class="reference internal" href="./pop-back.html">pop_back</a></li>
<li><a class="reference internal" href="./pop-front.html">pop_front</a></li>
<li><a class="reference internal" href="./prior.html">prior</a></li>
<li><a class="reference internal" href="./protect.html">protect</a></li>
<li><a class="reference internal" href="./push-back.html">push_back</a></li>
<li><a class="reference internal" href="./push-front.html">push_front</a></li>
<li><a class="reference internal" href="./quote.html">quote</a></li>
<li><a class="reference internal" href="./range-c.html">range_c</a></li>
<li><a class="reference internal" href="./remove.html">remove</a></li>
<li><a class="reference internal" href="./remove-if.html">remove_if</a></li>
<li><a class="reference internal" href="./replace.html">replace</a></li>
<li><a class="reference internal" href="./replace-if.html">replace_if</a></li>
<li><a class="reference internal" href="./reverse.html">reverse</a></li>
<li><a class="reference internal" href="./reverse-copy.html">reverse_copy</a></li>
<li><a class="reference internal" href="./reverse-copy-if.html">reverse_copy_if</a></li>
<li><a class="reference internal" href="./reverse-fold.html">reverse_fold</a></li>
<li><a class="reference internal" href="./reverse-iter-fold.html">reverse_iter_fold</a></li>
<li><a class="reference internal" href="./reverse-partition.html">reverse_partition</a></li>
<li><a class="reference internal" href="./reverse-remove.html">reverse_remove</a></li>
<li><a class="reference internal" href="./reverse-remove-if.html">reverse_remove_if</a></li>
<li><a class="reference internal" href="./reverse-replace.html">reverse_replace</a></li>
<li><a class="reference internal" href="./reverse-replace-if.html">reverse_replace_if</a></li>
<li><a class="reference internal" href="./reverse-stable-partition.html">reverse_stable_partition</a></li>
<li><a class="reference internal" href="./reverse-transform.html">reverse_transform</a></li>
<li><a class="reference internal" href="./reverse-unique.html">reverse_unique</a></li>
<li><a class="reference internal" href="./sequence-tag.html">sequence_tag</a></li>
<li><a class="reference internal" href="./set.html">set</a></li>
<li><a class="reference internal" href="./set-c.html">set_c</a></li>
<li><a class="reference internal" href="./shift-left.html">shift_left</a></li>
<li><a class="reference internal" href="./shift-right.html">shift_right</a></li>
<li><a class="reference internal" href="./single-view.html">single_view</a></li>
<li><a class="reference internal" href="./size.html">size</a></li>
<li><a class="reference internal" href="./size-t.html">size_t</a></li>
<li><a class="reference internal" href="./sizeof.html">sizeof_</a></li>
<li><a class="reference internal" href="./sort.html">sort</a></li>
<li><a class="reference internal" href="./stable-partition.html">stable_partition</a></li>
<li><a class="reference internal" href="./string.html">string</a></li>
<li><a class="reference internal" href="./times.html">times</a></li>
<li><a class="reference internal" href="./transform.html">transform</a></li>
<li><a class="reference internal" href="./transform-view.html">transform_view</a></li>
<li><a class="reference internal" href="./unique.html">unique</a></li>
<li><a class="reference internal" href="./unpack-args.html">unpack_args</a></li>
<li><a class="reference internal" href="./upper-bound.html">upper_bound</a></li>
<li><a class="reference internal" href="./value-type.html">value_type</a></li>
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./vector-c.html">vector_c</a></li>
<li><a class="reference internal" href="./void.html">void_</a></li>
<li><a class="reference internal" href="./zip-view.html">zip_view</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Composition and Argument Binding</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./unpack-args.html" class="navigation-link">Prev</a>&nbsp;<a href="./placeholders.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Back</a>&nbsp;<a href="./arithmetic-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument-binding.html" class="navigation-link">Composition and Argument Binding</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="composition-and-argument-binding">
<h1><a class="toc-backref" href="./metafunctions.html#id1528">Composition and Argument Binding</a></h1>
<span class="target" id="label-metafunctions-composition-and-argument-binding"></span><!-- Metafunctions/Composition and Argument Binding//_1,_2,..._n |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./placeholders.html" id="id1529">Placeholders</a></li>
<li><a class="reference internal" href="./lambda.html" id="id1530">lambda</a></li>
<li><a class="reference internal" href="./bind.html" id="id1531">bind</a></li>
<li><a class="reference internal" href="./quote.html" id="id1532">quote</a></li>
<li><a class="reference internal" href="./arg.html" id="id1533">arg</a></li>
<li><a class="reference internal" href="./protect.html" id="id1534">protect</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./unpack-args.html" class="navigation-link">Prev</a>&nbsp;<a href="./placeholders.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Back</a>&nbsp;<a href="./arithmetic-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Prev</a>&nbsp;<a href="./forward-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./classes.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="concepts">
<h1><a class="toc-backref" href="./sequences.html#id1394">Concepts</a></h1>
<p id="label-sequences-concepts">The taxonomy of sequence concepts in MPL parallels the taxonomy of the MPL
<a class="reference internal" href="./iterators.html">Iterators</a>, with two additional classification dimensions:
<cite>extensibility</cite> and <cite>associativeness</cite>.</p>
<!-- The latter two are orthogonal to
sequence traversal characteristics, but not to each other, meaning that
a sequence can be characterized as both `Bidirectional`__
and `Back Extensible`__, or `Bidirectional`__ and
`Extensible Associative`__, but not as `Bidirectional`__,
`Back Extensible`__ *and* `Extensible Associative`__.
__ `Bidirectional Sequence`_
__ `Back Extensible Sequence`_
__ `Bidirectional Sequence`_
__ `Extensible Associative Sequence`_
__ `Bidirectional Sequence`_
__ `Back Extensible Sequence`_
__ `Extensible Associative Sequence`_
Two utility concepts, |Variadic Sequence| and |Integral Sequence Wrapper|,
are not applicable in generic contexts, but are used to group together
the common parts of different sequence classes' specifications. -->
<!-- Sequences/Concepts//Forward Sequence |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./forward-sequence.html" id="id1395">Forward Sequence</a></li>
<li><a class="reference internal" href="./bidirectional-sequence.html" id="id1396">Bidirectional Sequence</a></li>
<li><a class="reference internal" href="./random-access-sequence.html" id="id1397">Random Access Sequence</a></li>
<li><a class="reference internal" href="./extensible-sequence.html" id="id1398">Extensible Sequence</a></li>
<li><a class="reference internal" href="./front-extensible-sequence.html" id="id1399">Front Extensible Sequence</a></li>
<li><a class="reference internal" href="./back-extensible-sequence.html" id="id1400">Back Extensible Sequence</a></li>
<li><a class="reference internal" href="./associative-sequence.html" id="id1401">Associative Sequence</a></li>
<li><a class="reference internal" href="./extensible-associative-sequence.html" id="id1402">Extensible Associative Sequence</a></li>
<li><a class="reference internal" href="./integral-sequence-wrapper.html" id="id1403">Integral Sequence Wrapper</a></li>
<li><a class="reference internal" href="./variadic-sequence.html" id="id1404">Variadic Sequence</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Prev</a>&nbsp;<a href="./forward-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./classes.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Configuration</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./broken-compiler-workarounds.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="./macros.html#id1597">Configuration</a></h1>
<span class="target" id="label-macros-configuration"></span><!-- Macros/Configuration//BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./cfg-no-preprocessed-headers.html" id="id1598">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx.html" id="id1599">BOOST_MPL_CFG_NO_HAS_XXX</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx-template.html" id="id1600">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></li>
<li><a class="reference internal" href="./limit-metafunction-arity.html" id="id1601">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></li>
<li><a class="reference internal" href="./limit-vector-size.html" id="id1602">BOOST_MPL_LIMIT_VECTOR_SIZE</a></li>
<li><a class="reference internal" href="./limit-list-size.html" id="id1603">BOOST_MPL_LIMIT_LIST_SIZE</a></li>
<li><a class="reference internal" href="./limit-set-size.html" id="id1604">BOOST_MPL_LIMIT_SET_SIZE</a></li>
<li><a class="reference internal" href="./limit-map-size.html" id="id1605">BOOST_MPL_LIMIT_MAP_SIZE</a></li>
<li><a class="reference internal" href="./limit-string-size.html" id="id1606">BOOST_MPL_LIMIT_STRING_SIZE</a></li>
<li><a class="reference internal" href="./limit-unrolling.html" id="id1607">BOOST_MPL_LIMIT_UNROLLING</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./broken-compiler-workarounds.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: contains</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./find-if.html" class="navigation-link">Prev</a>&nbsp;<a href="./count.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./find-if.html" class="navigation-link">Back</a>&nbsp;<a href="./count.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./contains.html" class="navigation-link">contains</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="contains">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1477">contains</a></h1>
<div class="section" id="id551">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename T
&gt;
struct <a href="./contains.html" class="identifier">contains</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id552">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if one or more elements in <tt class="literal"><span class="pre">Sequence</span></tt>
are identical to <tt class="literal"><span class="pre">T</span></tt>.</p>
</div>
<div class="section" id="id553">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/contains.hpp" class="header">boost/mpl/contains.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id554">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
<td>Any type</td>
<td>A type to search for.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id555">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./contains.html" class="identifier">contains</a>&lt;s,t&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./not.html" class="identifier">not_</a>&lt; is_same&lt;
<a href="./find.html" class="identifier">find</a>&lt;s,t&gt;::type
, <a href="./end.html" class="identifier">end</a>&lt;s&gt;::type
&gt; &gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id556">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> comparisons for identity.</p>
</div>
<div class="section" id="id557">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; types;
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./contains.html" class="identifier">contains</a>&lt;types,bool&gt; ));
</pre>
</div>
<div class="section" id="id558">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<!-- Algorithms/Querying Algorithms//count |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./find-if.html" class="navigation-link">Prev</a>&nbsp;<a href="./count.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./find-if.html" class="navigation-link">Back</a>&nbsp;<a href="./count.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: copy_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./copy.html" class="navigation-link">Prev</a>&nbsp;<a href="./transform.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./copy.html" class="navigation-link">Back</a>&nbsp;<a href="./transform.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./transformation-algorithms.html" class="navigation-link">Transformation Algorithms</a> / <a href="./copy-if.html" class="navigation-link">copy_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="copy-if">
<h1><a class="toc-backref" href="./transformation-algorithms.html#id1487">copy_if</a></h1>
<div class="section" id="id624">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Pred
, typename In = <em>unspecified</em>
&gt;
struct <a href="./copy-if.html" class="identifier">copy_if</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id625">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a filtered copy of the original sequence containing the elements that satisfy
the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
<p>[<em>Note:</em> This wording applies to a no-inserter version(s) of the algorithm. See the
<cite>Expression semantics</cite> subsection for a precise specification of the algorithm's
details in all cases — <em>end note</em>]</p>
</div>
<div class="section" id="id626">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/copy_if.hpp" class="header">boost/mpl/copy_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id627">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a></p>
</div>
<div class="section" id="id628">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="40%" />
<col width="40%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to copy.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A copying condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">In</span></tt></td>
<td><a class="reference internal" href="./inserter.html">Inserter</a></td>
<td>An inserter.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id629">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>.</p>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, an unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>, and
an <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./copy-if.html" class="identifier">copy_if</a>&lt;s,pred,in&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./lambda.html" class="identifier">lambda</a>&lt;pred&gt;::type p;
typedef <a href="./lambda.html" class="identifier">lambda</a>&lt;in::operation&gt;::type op;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;
s
, in::state
, <a href="./eval-if.html" class="identifier">eval_if</a>&lt;
<a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;p,<a href="./placeholders.html" class="identifier">_2</a>&gt;
, <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">2</span></tt>&lt;op,<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt;
, <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;
&gt;
&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id630">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>, and at
most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">in::operation</span></tt>.</p>
</div>
<div class="section" id="id631">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./copy-if.html" class="identifier">copy_if</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt;
, <a href="./less.html" class="identifier">less</a>&lt; <a href="./placeholders.html" class="identifier">_1</a>, <a href="./int.html" class="identifier">int_</a>&lt;5&gt; &gt;
, <a href="./back-inserter.html" class="identifier">back_inserter</a>&lt; <a href="./vector.html" class="identifier">vector</a>&lt;&gt; &gt;
&gt;::type result;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;result&gt;::value, ==, 5 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt;result,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,5&gt; > ));
</pre>
</div>
<div class="section" id="id632">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./transformation-algorithms.html">Transformation Algorithms</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./reverse-copy-if.html">reverse_copy_if</a>, <a class="reference internal" href="./copy.html">copy</a>, <a class="reference internal" href="./remove-if.html">remove_if</a>, <a class="reference internal" href="./replace-if.html">replace_if</a></p>
<!-- Algorithms/Transformation Algorithms//transform |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./copy.html" class="navigation-link">Prev</a>&nbsp;<a href="./transform.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./copy.html" class="navigation-link">Back</a>&nbsp;<a href="./transform.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: copy</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./copy-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./copy-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./transformation-algorithms.html" class="navigation-link">Transformation Algorithms</a> / <a href="./copy.html" class="navigation-link">copy</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="copy">
<h1><a class="toc-backref" href="./transformation-algorithms.html#id1486">copy</a></h1>
<div class="section" id="id615">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename In = <em>unspecified</em>
&gt;
struct <a href="./copy.html" class="identifier">copy</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id616">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a copy of the original sequence.</p>
<p>[<em>Note:</em> This wording applies to a no-inserter version(s) of the algorithm. See the
<cite>Expression semantics</cite> subsection for a precise specification of the algorithm's
details in all cases — <em>end note</em>]</p>
</div>
<div class="section" id="id617">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/copy.hpp" class="header">boost/mpl/copy.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id618">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a></p>
</div>
<div class="section" id="id619">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="37%" />
<col width="42%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to copy.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">In</span></tt></td>
<td><a class="reference internal" href="./inserter.html">Inserter</a></td>
<td>An inserter.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id620">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>.</p>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and an <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./copy.html" class="identifier">copy</a>&lt;s,in&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./fold.html" class="identifier">fold</a>&lt; s,in::state,in::operation &gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id621">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">in::operation</span></tt>.</p>
</div>
<div class="section" id="id622">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,0,1,2,3,4,5,6,7,8,9&gt; numbers;
typedef <a href="./copy.html" class="identifier">copy</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,10,20&gt;
, <a href="./back-inserter.html" class="identifier">back_inserter</a>&lt; numbers &gt;
&gt;::type result;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;result&gt;::value, ==, 20 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; result,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,20&gt; > ));
</pre>
</div>
<div class="section" id="id623">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./transformation-algorithms.html">Transformation Algorithms</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./reverse-copy.html">reverse_copy</a>, <a class="reference internal" href="./copy-if.html">copy_if</a>, <a class="reference internal" href="./transform.html">transform</a></p>
<!-- Algorithms/Transformation Algorithms//copy_if |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./copy-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./copy-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: count_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./count.html" class="navigation-link">Prev</a>&nbsp;<a href="./lower-bound.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./count.html" class="navigation-link">Back</a>&nbsp;<a href="./lower-bound.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./count-if.html" class="navigation-link">count_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="count-if">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1479">count_if</a></h1>
<div class="section" id="id567">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Pred
&gt;
struct <a href="./count-if.html" class="identifier">count_if</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id568">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the number of elements in <tt class="literal"><span class="pre">Sequence</span></tt> that satisfy the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
</div>
<div class="section" id="id569">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/count_if.hpp" class="header">boost/mpl/count_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id570">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="38%" />
<col width="43%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A count condition.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id571">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./count-if.html" class="identifier">count_if</a>&lt;s,pred&gt;::type n;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./lambda.html" class="identifier">lambda</a>&lt;pred&gt;::type p;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;
s
, <a href="./long.html" class="identifier">long_</a>&lt;0&gt;
, <a href="./if.html" class="identifier">if_</a>&lt; <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;p,<a href="./placeholders.html" class="identifier">_2</a>&gt;, <a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;, <a href="./placeholders.html" class="identifier">_1</a> &gt;
&gt;::type n;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id572">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>.</p>
</div>
<div class="section" id="id573">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;int,char,long,short,char,long,double,long&gt; types;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./count-if.html" class="identifier">count_if</a>&lt; types, is_float&lt;_&gt; &gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./count-if.html" class="identifier">count_if</a>&lt; types, is_same&lt;_,char&gt; &gt;::value), ==, 2 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./count-if.html" class="identifier">count_if</a>&lt; types, is_same&lt;_,void&gt; &gt;::value), ==, 0 );
</pre>
</div>
<div class="section" id="id574">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./contains.html">contains</a></p>
<!-- Algorithms/Querying Algorithms//lower_bound |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./count.html" class="navigation-link">Prev</a>&nbsp;<a href="./lower-bound.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./count.html" class="navigation-link">Back</a>&nbsp;<a href="./lower-bound.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: count</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./contains.html" class="navigation-link">Prev</a>&nbsp;<a href="./count-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./contains.html" class="navigation-link">Back</a>&nbsp;<a href="./count-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./count.html" class="navigation-link">count</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="count">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1478">count</a></h1>
<div class="section" id="id559">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename T
&gt;
struct <a href="./count.html" class="identifier">count</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id560">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the number of elements in a <tt class="literal"><span class="pre">Sequence</span></tt> that are identical to <tt class="literal"><span class="pre">T</span></tt>.</p>
</div>
<div class="section" id="id561">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/count.hpp" class="header">boost/mpl/count.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id562">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
<td>Any type</td>
<td>A type to search for.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id563">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./count.html" class="identifier">count</a>&lt;s,t&gt;::type n;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./count-if.html" class="identifier">count_if</a>&lt; s,is_same&lt;_,T&gt; &gt;::type n;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id564">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> comparisons for identity.</p>
</div>
<div class="section" id="id565">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;int,char,long,short,char,short,double,long&gt; types;
typedef <a href="./count.html" class="identifier">count</a>&lt;types, short&gt;::type n;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( n::value, ==, 2 );
</pre>
</div>
<div class="section" id="id566">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./count-if.html">count_if</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./contains.html">contains</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<!-- Algorithms/Querying Algorithms//count_if |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./contains.html" class="navigation-link">Prev</a>&nbsp;<a href="./count-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./contains.html" class="navigation-link">Back</a>&nbsp;<a href="./count-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-constant.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./numeric.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-types-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id1216">
<h1><a class="toc-backref" href="./data-types.html#id1573"><a class="subsection-title" href="#concepts" name="concepts">Concepts</a></a></h1>
<!-- Data Types/Concepts//Integral Constant -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./integral-constant.html" id="id1574">Integral Constant</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-constant.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./numeric.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Miscellaneous</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./char.html" class="navigation-link">Prev</a>&nbsp;<a href="./pair.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-types-miscellaneous.html" class="navigation-link">Miscellaneous</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id1270">
<h1><a class="toc-backref" href="./data-types.html#id1582"><a class="subsection-title" href="#miscellaneous" name="miscellaneous">Miscellaneous</a></a></h1>
<!-- Data Types/Miscellaneous//pair |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./pair.html" id="id1583">pair</a></li>
<li><a class="reference internal" href="./empty-base.html" id="id1584">empty_base</a></li>
<li><a class="reference internal" href="./void.html" id="id1585">void_</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./char.html" class="navigation-link">Prev</a>&nbsp;<a href="./pair.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Data Types</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sizeof.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Back</a>&nbsp;<a href="./macros.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="data-types">
<h1><a class="toc-backref" href="../refmanual.html#id1572">Data Types</a></h1>
<span class="target" id="data"><span id="label-data-types"></span></span><ul class="toc simple" id="outline">
<li><a class="reference internal" href="./data-types-concepts.html" id="id1573">Concepts</a></li>
<li><a class="reference internal" href="./numeric.html" id="id1575">Numeric</a></li>
<li><a class="reference internal" href="./data-types-miscellaneous.html" id="id1582">Miscellaneous</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sizeof.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Back</a>&nbsp;<a href="./macros.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: deque</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./list.html" class="navigation-link">Prev</a>&nbsp;<a href="./set.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./list.html" class="navigation-link">Back</a>&nbsp;<a href="./set.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./classes.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./classes.html" class="navigation-link">Classes</a> / <a href="./deque.html" class="navigation-link">deque</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="deque">
<h1><a class="toc-backref" href="./classes.html#id1408">deque</a></h1>
<div class="section" id="id64">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./deque.html" class="identifier">deque</a></span></tt> is a <a class="reference internal" href="./variadic-sequence.html">variadic</a>, <a class="reference internal" href="./random-access-sequence.html">random access</a>, <a class="reference internal" href="./extensible-sequence.html">extensible</a> sequence of types that
supports constant-time insertion and removal of elements at both ends, and
linear-time insertion and removal of elements in the middle. In this implementation
of the library, <tt class="literal"><span class="pre"><a href="./deque.html" class="identifier">deque</a></span></tt> is a synonym for <a class="reference internal" href="./vector.html">vector</a>.</p>
</div>
<div class="section" id="id67">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/deque.hpp" class="header">boost/mpl/deque.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id68">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a></li>
<li><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></li>
<li><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></li>
<li><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
<li><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
</ul>
</div>
<div class="section" id="id69">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>See <a class="reference internal" href="./vector.html">vector</a> specification.</p>
</div>
<div class="section" id="id70">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./deque.html" class="identifier">deque</a>&lt;float,double,long double&gt; floats;
typedef <a href="./push-back.html" class="identifier">push_back</a>&lt;floats,int&gt;::type types;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at-c.html" class="identifier">at_c</a>&lt;types,3&gt;::type, int > ));
</pre>
</div>
<div class="section" id="id71">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./vector.html">vector</a>, <a class="reference internal" href="./list.html">list</a>, <a class="reference internal" href="./set.html">set</a></p>
<!-- Sequences/Classes//set |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./list.html" class="navigation-link">Prev</a>&nbsp;<a href="./set.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./list.html" class="navigation-link">Back</a>&nbsp;<a href="./set.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./classes.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: deref</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./prior.html" class="navigation-link">Prev</a>&nbsp;<a href="./iterator-category.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./prior.html" class="navigation-link">Back</a>&nbsp;<a href="./iterator-category.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./deref.html" class="navigation-link">deref</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="deref">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id1458">deref</a></h1>
<div class="section" id="id437">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Iterator
&gt;
struct <a href="./deref.html" class="identifier">deref</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id438">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Dereferences an iterator.</p>
</div>
<div class="section" id="id439">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/deref.hpp" class="header">boost/mpl/deref.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id440">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Iterator</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>The iterator to dereference.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id441">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">iter</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">iter</span></tt> is dereferenceable.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">t</span></tt> is identical to the element referenced by <tt class="literal"><span class="pre">iter</span></tt>. If <tt class="literal"><span class="pre">iter</span></tt> is
a user-defined iterator, the library-provided default implementation is
equivalent to</p>
<pre class="last literal-block">
typedef iter::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id442">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id443">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,short,int,long&gt; types;
typedef <a href="./begin.html" class="identifier">begin</a>&lt;types&gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type, char > ));
</pre>
</div>
<div class="section" id="id444">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./next.html">next</a></p>
<!-- Iterators/Iterator Metafunctions//iterator_category |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./prior.html" class="navigation-link">Prev</a>&nbsp;<a href="./iterator-category.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./prior.html" class="navigation-link">Back</a>&nbsp;<a href="./iterator-category.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: distance</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./advance.html" class="navigation-link">Prev</a>&nbsp;<a href="./next.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./advance.html" class="navigation-link">Back</a>&nbsp;<a href="./next.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./distance.html" class="navigation-link">distance</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="distance">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id1455">distance</a></h1>
<div class="section" id="id412">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename First
, typename Last
&gt;
struct <a href="./distance.html" class="identifier">distance</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id413">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the distance between <tt class="literal"><span class="pre">First</span></tt> and <tt class="literal"><span class="pre">Last</span></tt> iterators, that is, an
<a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt> such that <tt class="literal"><span class="pre"><a href="./advance.html" class="identifier">advance</a>&lt;First,n&gt;::type</span></tt> is
identical to <tt class="literal"><span class="pre">Last</span></tt>.</p>
</div>
<div class="section" id="id414">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/distance.hpp" class="header">boost/mpl/distance.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id415">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">First</span></tt>,
<tt class="literal"><span class="pre">Last</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Iterators to compute a
distance between.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id416">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model Of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id417">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./distance.html" class="identifier">distance</a>&lt;first,last&gt;::type n;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">[<tt class="literal"><span class="pre">first</span></tt>, <tt class="literal"><span class="pre">last</span></tt>) is a valid range.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
typedef <a href="./iter-fold.html" class="identifier">iter_fold</a>&lt;
<a href="./iterator-range.html" class="identifier">iterator_range</a>&lt;first,last&gt;
, <a href="./long.html" class="identifier">long_</a>&lt;0&gt;
, <a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;
&gt;::type n;
</pre>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre">is_same&lt;</span> <span class="pre"><a href="./advance.html" class="identifier">advance</a>&lt;first,n&gt;::type,</span> <span class="pre">last</span> <span class="pre">&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id418">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time if <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> are <a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a>s,
otherwise linear time.</p>
</div>
<div class="section" id="id419">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt;::type range;
typedef <a href="./begin.html" class="identifier">begin</a>&lt;range&gt;::type first;
typedef <a href="./end.html" class="identifier">end</a>&lt;range&gt;::type last;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./distance.html" class="identifier">distance</a>&lt;first,last&gt;::value), ==, 10);
</pre>
</div>
<div class="section" id="id420">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a>, <a class="reference internal" href="./advance.html">advance</a>, <a class="reference internal" href="./next.html">next</a>, <a class="reference internal" href="./prior.html">prior</a></p>
<!-- Iterators/Iterator Metafunctions//next |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./advance.html" class="navigation-link">Prev</a>&nbsp;<a href="./next.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./advance.html" class="navigation-link">Back</a>&nbsp;<a href="./next.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: divides</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./times.html" class="navigation-link">Prev</a>&nbsp;<a href="./modulus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./times.html" class="navigation-link">Back</a>&nbsp;<a href="./modulus.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./arithmetic-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./arithmetic-operations.html" class="navigation-link">Arithmetic Operations</a> / <a href="./divides.html" class="navigation-link">divides</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="divides">
<h1><a class="toc-backref" href="./arithmetic-operations.html#id1539">divides</a></h1>
<div class="section" id="id987">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
, typename T3 = <em>unspecified</em>
<em>...</em>
, typename T<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./divides.html" class="identifier">divides</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id988">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the quotient of its arguments.</p>
</div>
<div class="section" id="id989">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/divides.hpp" class="header">boost/mpl/divides.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/arithmetic.hpp" class="header">boost/mpl/arithmetic.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id990">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id991">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id992">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c2::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>, <em>...</em> <tt class="literal"><span class="pre">cn::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value / c2::value)
, ( c1::value / c2::value )
&gt; c;
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c2::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>, <em>...</em> <tt class="literal"><span class="pre">cn::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id993">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id994">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./divides.html" class="identifier">divides</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;-10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt;, <a href="./long.html" class="identifier">long_</a>&lt;1&gt; &gt;::type r;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( r::value, ==, -3 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r::<a href="./value-type.html" class="identifier">value_type</a>, long > ));
</pre>
</div>
<div class="section" id="id995">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./arithmetic-operations.html">Arithmetic Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./times.html">times</a>, <a class="reference internal" href="./modulus.html">modulus</a>, <a class="reference internal" href="./plus.html">plus</a></p>
<!-- Metafunctions/Arithmetic Operations//modulus |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./times.html" class="navigation-link">Prev</a>&nbsp;<a href="./modulus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./times.html" class="navigation-link">Back</a>&nbsp;<a href="./modulus.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./arithmetic-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: empty_base</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./pair.html" class="navigation-link">Prev</a>&nbsp;<a href="./void.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./pair.html" class="navigation-link">Back</a>&nbsp;<a href="./void.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types-miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-types-miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./empty-base.html" class="navigation-link">empty_base</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="empty-base">
<h1><a class="toc-backref" href="./data-types-miscellaneous.html#id1584">empty_base</a></h1>
<div class="section" id="id1276">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
struct <a href="./empty-base.html" class="identifier">empty_base</a> {};
</pre>
</div>
<div class="section" id="id1277">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An empty base class. Inheritance from <a class="reference internal" href="./empty-base.html">empty_base</a> through the <a class="reference internal" href="./inherit.html">inherit</a>
metafunction is a no-op.</p>
</div>
<div class="section" id="id1278">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/empty_base.hpp" class="header">boost/mpl/empty_base.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1279">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./inherit.html">inherit</a>, <a class="reference internal" href="./inherit-linearly.html">inherit_linearly</a>, <a class="reference internal" href="./void.html">void_</a></p>
<!-- Data Types/Miscellaneous//void_ |100 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./pair.html" class="navigation-link">Prev</a>&nbsp;<a href="./void.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./pair.html" class="navigation-link">Back</a>&nbsp;<a href="./void.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types-miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: empty_sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./views.html" class="navigation-link">Prev</a>&nbsp;<a href="./filter-view.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./filter-view.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./views.html" class="navigation-link">Views</a> / <a href="./empty-sequence.html" class="navigation-link">empty_sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="empty-sequence">
<h1><a class="toc-backref" href="./views.html#id1417">empty_sequence</a></h1>
<div class="section" id="id120">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
struct <a href="./empty-sequence.html" class="identifier">empty_sequence</a>
{
// <em>unspecified</em>
// <em>...</em>
};
</pre>
</div>
<div class="section" id="id121">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Represents a sequence containing no elements.</p>
</div>
<div class="section" id="id122">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/empty_sequence.hpp" class="header">boost/mpl/empty_sequence.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id123">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>.</p>
<p>In the following table, <tt class="literal"><span class="pre">s</span></tt> is an instance of <tt class="literal"><span class="pre"><a href="./empty-sequence.html" class="identifier">empty_sequence</a></span></tt>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./empty-sequence.html" class="identifier">empty_sequence</a></span></tt></td>
<td>An empty <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::type</span></tt></td>
<td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">0</span></tt>; see <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id124">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./begin.html" class="identifier">begin</a>&lt;<a href="./empty-sequence.html" class="identifier">empty_sequence</a>&gt;::type first;
typedef <a href="./end.html" class="identifier">end</a>&lt;<a href="./empty-sequence.html" class="identifier">empty_sequence</a>&gt;::type last;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;first,last&gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;<a href="./empty-sequence.html" class="identifier">empty_sequence</a>&gt;::value, ==, 0 );
typedef <a href="./transform-view.html" class="identifier">transform_view</a>&lt;
<a href="./empty-sequence.html" class="identifier">empty_sequence</a>
, add_pointer&lt;_&gt;
&gt; empty_view;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;<a href="./empty-sequence.html" class="identifier">empty_sequence</a>&gt;::value, ==, 0 );
</pre>
</div>
<div class="section" id="id125">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./views.html">Views</a>, <a class="reference internal" href="./vector.html">vector</a>, <a class="reference internal" href="./list.html">list</a>, <a class="reference internal" href="./single-view.html">single_view</a></p>
<!-- Sequences/Views//filter_view -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./views.html" class="navigation-link">Prev</a>&nbsp;<a href="./filter-view.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./filter-view.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: empty</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./clear.html" class="navigation-link">Prev</a>&nbsp;<a href="./end.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./clear.html" class="navigation-link">Back</a>&nbsp;<a href="./end.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./empty.html" class="navigation-link">empty</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="empty">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1430">empty</a></h1>
<div class="section" id="id220">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
&gt;
struct <a href="./empty.html" class="identifier">empty</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id221">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if
and only if the sequence is empty.</p>
</div>
<div class="section" id="id222">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/empty.hpp" class="header">boost/mpl/empty.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id223">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id224">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="32%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to test.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id225">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre">is_same&lt;</span> <span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type,<a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span> <span class="pre">&gt;::type</span> <span class="pre">c;</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">(</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">0</span> <span class="pre">)</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id226">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id227">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,0&gt; empty_range;
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long,float,double&gt; types;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>( <a href="./empty.html" class="identifier">empty</a>&lt;empty_range&gt; );
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>( <a href="./empty.html" class="identifier">empty</a>&lt;types&gt; );
</pre>
</div>
<div class="section" id="id228">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./size.html">size</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a></p>
<!-- Sequences/Intrinsic Metafunctions//end -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./clear.html" class="navigation-link">Prev</a>&nbsp;<a href="./end.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./clear.html" class="navigation-link">Back</a>&nbsp;<a href="./end.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: end</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./empty.html" class="navigation-link">Prev</a>&nbsp;<a href="./erase.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./empty.html" class="navigation-link">Back</a>&nbsp;<a href="./erase.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./end.html" class="navigation-link">end</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="end">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1431">end</a></h1>
<div class="section" id="id229">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename X
&gt;
struct <a href="./end.html" class="identifier">end</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id230">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the sequence's past-the-end iterator. If the argument is not a
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, returns <a class="reference internal" href="./void.html">void_</a>.</p>
</div>
<div class="section" id="id231">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/begin_end.hpp" class="header">boost/mpl/begin_end.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id232">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id233">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="23%" />
<col width="58%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">X</span></tt></td>
<td>Any type</td>
<td>A type whose end iterator, if any, will be
returned.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id234">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./end.html" class="identifier">end</a>&lt;x&gt;::type last;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> or <a class="reference internal" href="./void.html">void_</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">x</span></tt> is <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">last</span></tt> is an iterator pointing one past the
last element in <tt class="literal"><span class="pre">s</span></tt>; otherwise <tt class="literal"><span class="pre">last</span></tt> is <a class="reference internal" href="./void.html">void_</a>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body">If <tt class="literal"><span class="pre">last</span></tt> is an iterator, it is past-the-end.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id235">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id236">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long&gt; v;
typedef <a href="./begin.html" class="identifier">begin</a>&lt;v&gt;::type first;
typedef <a href="./end.html" class="identifier">end</a>&lt;v&gt;::type last;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./next.html" class="identifier">next</a>&lt;first&gt;::type, last > ));
</pre>
</div>
<div class="section" id="id237">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./begin.html">begin</a>, <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./next.html">next</a></p>
<!-- Sequences/Intrinsic Metafunctions//erase -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./empty.html" class="navigation-link">Prev</a>&nbsp;<a href="./erase.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./empty.html" class="navigation-link">Back</a>&nbsp;<a href="./erase.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: equal_to</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./greater-equal.html" class="navigation-link">Prev</a>&nbsp;<a href="./not-equal-to.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./greater-equal.html" class="navigation-link">Back</a>&nbsp;<a href="./not-equal-to.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a> / <a href="./equal-to.html" class="navigation-link">equal_to</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="equal-to">
<h1><a class="toc-backref" href="./comparisons.html#id1547">equal_to</a></h1>
<div class="section" id="id1050">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
&gt;
struct <a href="./equal-to.html" class="identifier">equal_to</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1051">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> and <tt class="literal"><span class="pre">T2</span></tt> are equal.</p>
</div>
<div class="section" id="id1052">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/equal_to.hpp" class="header">boost/mpl/equal_to.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/comparison.hpp" class="header">boost/mpl/comparison.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1053">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1054">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1055">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./bool.html" class="identifier">bool_</a>&lt; (c1::value == c2::value) &gt; r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1056">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1057">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./equal-to.html" class="identifier">equal_to</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;0&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./equal-to.html" class="identifier">equal_to</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;0&gt; &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal-to.html" class="identifier">equal_to</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; > ));
</pre>
</div>
<div class="section" id="id1058">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./comparisons.html">Comparisons</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./not-equal-to.html">not_equal_to</a>, <a class="reference internal" href="./less.html">less</a></p>
<!-- Metafunctions/Comparisons//not_equal_to |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./greater-equal.html" class="navigation-link">Prev</a>&nbsp;<a href="./not-equal-to.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./greater-equal.html" class="navigation-link">Back</a>&nbsp;<a href="./not-equal-to.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: equal</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./max-element.html" class="navigation-link">Prev</a>&nbsp;<a href="./transformation-algorithms.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./max-element.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./equal.html" class="navigation-link">equal</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="equal">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1484">equal</a></h1>
<div class="section" id="id607">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Seq1
, typename Seq2
, typename Pred = is_same&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt;
&gt;
struct <a href="./equal.html" class="identifier">equal</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id608">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if the two sequences <tt class="literal"><span class="pre">Seq1</span></tt>
and <tt class="literal"><span class="pre">Seq2</span></tt> are identical when compared element-by-element.</p>
</div>
<div class="section" id="id609">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/equal.hpp" class="header">boost/mpl/equal.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id610">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="22%" />
<col width="36%" />
<col width="41%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Seq1</span></tt>, <tt class="literal"><span class="pre">Seq2</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Sequences to compare.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A comparison criterion.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id611">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>s <tt class="literal"><span class="pre">s1</span></tt> and <tt class="literal"><span class="pre">s2</span></tt> and a binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./equal.html" class="identifier">equal</a>&lt;s1,s2,pred&gt;::type c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> is and only if <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s1&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s2&gt;::value</span></tt>
and for every iterator <tt class="literal"><span class="pre">i</span></tt> in [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s1&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s1&gt;::type</span></tt>) <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt> is identical to</p>
<pre class="last literal-block">
<a href="./advance.html" class="identifier">advance</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s2&gt;::type, <a href="./distance.html" class="identifier">distance</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s1&gt;::type,i &gt;::type &gt;::type
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id612">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s1&gt;::value</span></tt> comparisons.</p>
</div>
<div class="section" id="id613">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; s1;
typedef <a href="./list.html" class="identifier">list</a>&lt;char,int,unsigned,long,unsigned long&gt; s2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt;s1,s2&gt; ));
</pre>
</div>
<div class="section" id="id614">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./max-element.html" class="navigation-link">Prev</a>&nbsp;<a href="./transformation-algorithms.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./max-element.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: erase_key</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./erase.html" class="navigation-link">Prev</a>&nbsp;<a href="./front.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./erase.html" class="navigation-link">Back</a>&nbsp;<a href="./front.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./erase-key.html" class="navigation-link">erase_key</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="erase-key">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1433">erase_key</a></h1>
<div class="section" id="id247">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename AssocSeq
, typename Key
&gt;
struct <a href="./erase-key.html" class="identifier">erase_key</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id248">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Erases elements associated with the key <tt class="literal"><span class="pre">Key</span></tt> in the <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>
<tt class="literal"><span class="pre">AssocSeq</span></tt> .</p>
</div>
<div class="section" id="id249">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/erase_key.hpp" class="header">boost/mpl/erase_key.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id250">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id251">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">AssocSeq</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>A sequence to erase elements from.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Key</span></tt></td>
<td>Any type</td>
<td>A key for the elements to be removed.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id252">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">key</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,key&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> and equivalent to <tt class="literal"><span class="pre">s</span></tt> except that
<tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;r,k&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;r&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">-</span> <span class="pre">1</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id253">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id254">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./map.html" class="identifier">map</a>&lt; <a href="./pair.html" class="identifier">pair</a>&lt;int,unsigned&gt;, <a href="./pair.html" class="identifier">pair</a>&lt;char,long&gt; &gt; m;
typedef <a href="./erase-key.html" class="identifier">erase_key</a>&lt;m,char&gt;::type m1;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;m1&gt;::type::value, ==, 1 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;m1,char&gt;::type,<a href="./void.html" class="identifier">void_</a> &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;m1,int&gt;::type,unsigned > ));
</pre>
</div>
<div class="section" id="id255">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./has-key.html">has_key</a>, <a class="reference internal" href="./insert.html">insert</a></p>
<!-- Sequences/Intrinsic Metafunctions//front -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./erase.html" class="navigation-link">Prev</a>&nbsp;<a href="./front.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./erase.html" class="navigation-link">Back</a>&nbsp;<a href="./front.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: erase</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./end.html" class="navigation-link">Prev</a>&nbsp;<a href="./erase-key.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./end.html" class="navigation-link">Back</a>&nbsp;<a href="./erase-key.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./erase.html" class="navigation-link">erase</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="erase">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1432">erase</a></h1>
<div class="section" id="id238">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename First
, typename Last = <em>unspecified</em>
&gt;
struct <a href="./erase.html" class="identifier">erase</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id239">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a></span></tt> performs a removal of one or more adjacent elements in the sequence
starting from an arbitrary position.</p>
</div>
<div class="section" id="id240">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/erase.hpp" class="header">boost/mpl/erase.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id241">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id242">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>A sequence to erase from.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">First</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator to the beginning of the range to
be erased.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Last</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator past-the-end of the range to be
erased.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id243">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and iterators <tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> into <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,first,last&gt;::type r;
</pre>
<table class="compound-middle docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">[first,last)</span></tt> is a valid range in <tt class="literal"><span class="pre">s</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">r</span></tt> is a new sequence, <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">s</span></tt>, of the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), [<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>).</p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">The relative order of the elements in <tt class="literal"><span class="pre">r</span></tt> is the same as in <tt class="literal"><span class="pre">s</span></tt>;</p>
<pre class="last literal-block">
<a href="./size.html" class="identifier">size</a>&lt;r&gt;::value == <a href="./size.html" class="identifier">size</a>&lt;s&gt;::value - <a href="./distance.html" class="identifier">distance</a>&lt;first,last&gt;::value
</pre>
</td>
</tr>
</tbody>
</table>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<pre class="compound-middle literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type r;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">pos</span></tt> is a dereferenceable iterator in <tt class="literal"><span class="pre">s</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt; s,pos,<a href="./next.html" class="identifier">next</a>&lt;pos&gt;::type &gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and iterator <tt class="literal"><span class="pre">pos</span></tt> into <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type r;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">pos</span></tt> is a dereferenceable iterator to <tt class="literal"><span class="pre">s</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Erases the element at a specific position <tt class="literal"><span class="pre">pos</span></tt>; equivalent to
<tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,</span> <span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;pos&gt;::type</span> <span class="pre">&gt;::type</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;r&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">-</span> <span class="pre">1</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="id244">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="45%" />
<col width="55%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity (the range form)</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
<tr><td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Quadratic in the worst case, linear at best.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id245">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,1,0,5,1,7,5,0,5&gt; values;
typedef <a href="./find.html" class="identifier">find</a>&lt; values, <a href="./integral-c.html" class="identifier">integral_c</a>&lt;int,7&gt; &gt;::type pos;
typedef <a href="./erase.html" class="identifier">erase</a>&lt;values,pos&gt;::type result;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;result&gt;::value, ==, 7 );
typedef <a href="./find.html" class="identifier">find</a>&lt;result, <a href="./integral-c.html" class="identifier">integral_c</a>&lt;int,7&gt; &gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; iter, <a href="./end.html" class="identifier">end</a>&lt;result&gt;::type > ));
</pre>
</div>
<div class="section" id="id246">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./erase-key.html">erase_key</a>, <a class="reference internal" href="./pop-front.html">pop_front</a>, <a class="reference internal" href="./pop-back.html">pop_back</a>, <a class="reference internal" href="./insert.html">insert</a></p>
<!-- Sequences/Intrinsic Metafunctions//erase_key -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./end.html" class="navigation-link">Prev</a>&nbsp;<a href="./erase-key.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./end.html" class="navigation-link">Back</a>&nbsp;<a href="./erase-key.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: eval_if_c</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./eval-if.html" class="navigation-link">Prev</a>&nbsp;<a href="./invocation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./eval-if.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./eval-if-c.html" class="navigation-link">eval_if_c</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="eval-if-c">
<h1><a class="toc-backref" href="./type-selection.html#id1523">eval_if_c</a></h1>
<div class="section" id="id880">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
bool c
, typename F1
, typename F2
&gt;
struct <a href="./eval-if-c.html" class="identifier">eval_if_c</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id881">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Evaluates one of its two <a class="reference internal" href="./metafunction.html#nullary-metafunction">nullary-metafunction</a> arguments, <tt class="literal"><span class="pre">F1</span></tt> or <tt class="literal"><span class="pre">F2</span></tt>, depending
on the value of integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class="literal"><span class="pre"><a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt;c,f1,f2&gt;::type</span></tt> is a shorcut
notation for <tt class="literal"><span class="pre"><a href="./eval-if.html" class="identifier">eval_if</a>&lt;</span> <span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;,f1,f2</span> <span class="pre">&gt;::type</span></tt>.</p>
</div>
<div class="section" id="id882">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/eval_if.hpp" class="header">boost/mpl/eval_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id883">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">c</span></tt></td>
<td>An integral constant</td>
<td>An evaluation condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">F1</span></tt>, <tt class="literal"><span class="pre">F2</span></tt></td>
<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Metafunctions to select for evaluation from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id884">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">c</span></tt> and nullary <a class="reference internal" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt;c,f1,f2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre"><a href="./eval-if.html" class="identifier">eval_if</a>&lt;</span> <span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;,f1,f2</span> <span class="pre">&gt;::type</span> <span class="pre">t;</span></tt></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id885">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt; true, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t1;
typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt; false, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t1,char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2,long&gt; ));
</pre>
</div>
<div class="section" id="id886">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./eval-if.html">eval_if</a>, <a class="reference internal" href="./if.html">if_</a>, <a class="reference internal" href="./bool.html">bool_</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./eval-if.html" class="navigation-link">Prev</a>&nbsp;<a href="./invocation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./eval-if.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: eval_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./if-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./eval-if-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./if-c.html" class="navigation-link">Back</a>&nbsp;<a href="./eval-if-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./eval-if.html" class="navigation-link">eval_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="eval-if">
<h1><a class="toc-backref" href="./type-selection.html#id1522">eval_if</a></h1>
<div class="section" id="id873">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename C
, typename F1
, typename F2
&gt;
struct <a href="./eval-if.html" class="identifier">eval_if</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id874">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Evaluates one of its two <a class="reference internal" href="./metafunction.html#nullary-metafunction">nullary-metafunction</a> arguments, <tt class="literal"><span class="pre">F1</span></tt> or <tt class="literal"><span class="pre">F2</span></tt>, depending
on the value <tt class="literal"><span class="pre">C</span></tt>.</p>
</div>
<div class="section" id="id875">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/eval_if.hpp" class="header">boost/mpl/eval_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id876">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">C</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>An evaluation condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">F1</span></tt>, <tt class="literal"><span class="pre">F2</span></tt></td>
<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Metafunctions to select for evaluation from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id877">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> and nullary <a class="reference internal" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt;c,f1,f2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>, <tt class="literal"><span class="pre">t</span></tt> is identical to <tt class="literal"><span class="pre">f1::type</span></tt>; otherwise <tt class="literal"><span class="pre">t</span></tt> is
identical to <tt class="literal"><span class="pre">f2::type</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id878">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt; <a href="./bool.html" class="identifier">true_</a>, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t1;
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt; <a href="./bool.html" class="identifier">false_</a>, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t1,char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2,long&gt; ));
</pre>
</div>
<div class="section" id="id879">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./eval-if-c.html">eval_if_c</a>, <a class="reference internal" href="./if.html">if_</a></p>
<!-- Metafunctions/Type Selection//eval_if_c |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./if-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./eval-if-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./if-c.html" class="navigation-link">Back</a>&nbsp;<a href="./eval-if-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Extensible Associative Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./extensible-associative-sequence.html" class="navigation-link">Extensible Associative Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="extensible-associative-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1402">Extensible Associative Sequence</a></h1>
<div class="section" id="id35">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> is an <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> that supports
insertion and removal of elements. In contrast to <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>,
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> does not provide a mechanism for
inserting an element at a specific position.</p>
</div>
<div class="section" id="id36">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In the following table and subsequent specifications, <tt class="literal"><span class="pre">s</span></tt> is an <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>,
<tt class="literal"><span class="pre">pos</span></tt> is an iterator into <tt class="literal"><span class="pre">s</span></tt>, and <tt class="literal"><span class="pre">x</span></tt> and <tt class="literal"><span class="pre">k</span></tt> are arbitrary types.</p>
<p>In addition to the <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> requirements, the following must be met:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="32%" />
<col width="40%" />
<col width="28%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,k&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id37">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="32%" />
<col width="68%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type</span></tt></td>
<td><p class="first">Inserts <tt class="literal"><span class="pre">x</span></tt> into <tt class="literal"><span class="pre">s</span></tt>; the resulting sequence <tt class="literal"><span class="pre">r</span></tt> is
equivalent to <tt class="literal"><span class="pre">s</span></tt> except that</p>
<pre class="literal-block">
<a href="./at.html" class="identifier">at</a>&lt; r, <a href="./key-type.html" class="identifier">key_type</a>&lt;s,x&gt;::type &gt;::type
</pre>
<p class="last">is identical to <tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt>; see <a class="reference internal" href="./insert.html">insert</a>.</p>
</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type</span></tt>; <tt class="literal"><span class="pre">pos</span></tt> is ignored;
see <a class="reference internal" href="./insert.html">insert</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,k&gt;::type</span></tt></td>
<td>Erases elements in <tt class="literal"><span class="pre">s</span></tt> associated with the key <tt class="literal"><span class="pre">k</span></tt>;
the resulting sequence <tt class="literal"><span class="pre">r</span></tt> is equivalent to <tt class="literal"><span class="pre">s</span></tt> except
that <tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;r,k&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>; see <a class="reference internal" href="./erase-key.html">erase_key</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td>Erases the element at a specific position; equivalent to
<tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,</span> <span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;pos&gt;::type</span> <span class="pre">&gt;::type</span></tt>; see <a class="reference internal" href="./erase.html">erase</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td>An empty sequence concept-identical to <tt class="literal"><span class="pre">s</span></tt>; see
<a class="reference internal" href="./clear.html">clear</a>.</td>
</tr>
</tbody>
</table>
<!-- Invariants
- - - - - - - - - -
For any extensible associative sequence ``s`` the following invariants always hold: -->
</div>
<div class="section" id="id38">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./set.html">set</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
</ul>
<!-- * |multiset| -->
</div>
<div class="section" id="id39">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./clear.html">clear</a></p>
<!-- Sequences/Concepts//Integral Sequence Wrapper |90 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Extensible Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./random-access-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./front-extensible-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./random-access-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./front-extensible-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./extensible-sequence.html" class="navigation-link">Extensible Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="extensible-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1398">Extensible Sequence</a></h1>
<div class="section" id="id12">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> is a sequence that supports insertion and removal of
elements. Extensibility is orthogonal to sequence traversal characteristics.</p>
</div>
<div class="section" id="id13">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, its iterators <tt class="literal"><span class="pre">pos</span></tt> and <tt class="literal"><span class="pre">last</span></tt>,
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">r</span></tt>, and any type <tt class="literal"><span class="pre">x</span></tt>, the following expressions must
be valid:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="39%" />
<col width="30%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert-range.html" class="identifier">insert_range</a>&lt;s,pos,r&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos,last&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id14">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="36%" />
<col width="64%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), <tt class="literal"><span class="pre">x</span></tt>,
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./insert.html">insert</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert-range.html" class="identifier">insert_range</a>&lt;s,pos,r&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;r&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;r&gt;::type</span></tt>),
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./insert-range.html">insert_range</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
[<tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;pos&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./erase.html">erase</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos,last&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
[<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./erase.html">erase</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td>An empty sequence concept-identical to <tt class="literal"><span class="pre">s</span></tt>; see
<a class="reference internal" href="./clear.html">clear</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id15">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./list.html">list</a></li>
</ul>
</div>
<div class="section" id="id16">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./insert-range.html">insert_range</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./clear.html">clear</a></p>
<!-- Sequences/Concepts//Front Extensible Sequence |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./random-access-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./front-extensible-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./random-access-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./front-extensible-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: filter_view</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./empty-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./iterator-range.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./empty-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./iterator-range.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./views.html" class="navigation-link">Views</a> / <a href="./filter-view.html" class="navigation-link">filter_view</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="filter-view">
<h1><a class="toc-backref" href="./views.html#id1418">filter_view</a></h1>
<div class="section" id="id126">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Pred
&gt;
struct <a href="./filter-view.html" class="identifier">filter_view</a>
{
// <em>unspecified</em>
// <em>...</em>
};
</pre>
</div>
<div class="section" id="id127">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A view into a subset of <tt class="literal"><span class="pre">Sequence</span></tt>'s elements satisfying the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
</div>
<div class="section" id="id128">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/filter_view.hpp" class="header">boost/mpl/filter_view.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id129">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></li>
</ul>
</div>
<div class="section" id="parameters">
<h3>Parameters</h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to wrap.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A filtering predicate.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id130">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>Semantics of an expression is defined only where it differs from, or is not
defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<p>In the following table, <tt class="literal"><span class="pre">v</span></tt> is an instance of <tt class="literal"><span class="pre"><a href="./filter-view.html" class="identifier">filter_view</a></span></tt>, <tt class="literal"><span class="pre">s</span></tt> is an arbitrary
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">pred</span></tt> is an unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="40%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><pre class="first last literal-block">
<a href="./filter-view.html" class="identifier">filter_view</a>&lt;s,pred&gt;
<a href="./filter-view.html" class="identifier">filter_view</a>&lt;s,pred&gt;::type
</pre>
</td>
<td>A lazy <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> sequence of all the elements in
the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>) that satisfy the predicate
<tt class="literal"><span class="pre">pred</span></tt>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;v&gt;::type</span></tt></td>
<td>The size of <tt class="literal"><span class="pre">v</span></tt>;
<tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;v&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./count-if.html" class="identifier">count_if</a>&lt;s,pred&gt;::value</span></tt>;
linear complexity; see <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id131">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<p>Find the largest floating type in a sequence.</p>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;int,float,long,float,char[50],long double,char&gt; types;
typedef <a href="./max-element.html" class="identifier">max_element</a>&lt;
<a href="./transform-view.html" class="identifier">transform_view</a>&lt; <a href="./filter-view.html" class="identifier">filter_view</a>&lt; types,boost::is_float&lt;_&gt; &gt;, size_of&lt;_&gt; &gt;
&gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter::base&gt;::type, long double > ));
</pre>
</div>
<div class="section" id="id132">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./views.html">Views</a>, <a class="reference internal" href="./transform-view.html">transform_view</a>, <a class="reference internal" href="./joint-view.html">joint_view</a>, <a class="reference internal" href="./zip-view.html">zip_view</a>, <a class="reference internal" href="./iterator-range.html">iterator_range</a></p>
<!-- Sequences/Views//iterator_range -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./empty-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./iterator-range.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./empty-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./iterator-range.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: find_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./find.html" class="navigation-link">Prev</a>&nbsp;<a href="./contains.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./find.html" class="navigation-link">Back</a>&nbsp;<a href="./contains.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./find-if.html" class="navigation-link">find_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="find-if">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1476">find_if</a></h1>
<div class="section" id="id543">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Pred
&gt;
struct <a href="./find-if.html" class="identifier">find_if</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id544">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an iterator to the first element in <tt class="literal"><span class="pre">Sequence</span></tt> that satisfies
the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
</div>
<div class="section" id="id545">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/find_if.hpp" class="header">boost/mpl/find_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id546">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="19%" />
<col width="38%" />
<col width="43%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to search in.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A search condition.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id547">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;s,pred&gt;::type i;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">i</span></tt> is the first iterator in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>) such that</p>
<pre class="literal-block">
<a href="./apply.html" class="identifier">apply</a>&lt; pred,<a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type &gt;::type::value == true
</pre>
<p class="last">If no such iterator exists, <tt class="literal"><span class="pre">i</span></tt> is identical to <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id548">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>.</p>
</div>
<div class="section" id="id549">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; types;
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;types, is_same&lt;<a href="./placeholders.html" class="identifier">_1</a>,unsigned&gt; &gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type, unsigned &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( iter::pos::value, ==, 2 );
</pre>
</div>
<div class="section" id="id550">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./count-if.html">count_if</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<!-- Algorithms/Querying Algorithms//contains |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./find.html" class="navigation-link">Prev</a>&nbsp;<a href="./contains.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./find.html" class="navigation-link">Back</a>&nbsp;<a href="./contains.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: find</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./find-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./find-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./find.html" class="navigation-link">find</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="find">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1475">find</a></h1>
<div class="section" id="id535">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename T
&gt;
struct <a href="./find.html" class="identifier">find</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id536">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an iterator to the first occurrence of type <tt class="literal"><span class="pre">T</span></tt> in a <tt class="literal"><span class="pre">Sequence</span></tt>.</p>
</div>
<div class="section" id="id537">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/find.hpp" class="header">boost/mpl/find.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id538">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="32%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to search in.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
<td>Any type</td>
<td>A type to search for.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id539">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./find.html" class="identifier">find</a>&lt;s,t&gt;::type i;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;s, is_same&lt;_,t&gt; &gt;::type i;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id540">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> comparisons for identity.</p>
</div>
<div class="section" id="id541">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; types;
typedef <a href="./find.html" class="identifier">find</a>&lt;types,unsigned&gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type, unsigned &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( iter::pos::value, ==, 2 );
</pre>
</div>
<div class="section" id="id542">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./contains.html">contains</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<!-- Algorithms/Querying Algorithms//find_if |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./find-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./find-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: fold</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./iter-fold.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./iter-fold.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./iteration-algorithms.html" class="navigation-link">Iteration Algorithms</a> / <a href="./fold.html" class="navigation-link">fold</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="fold">
<h1><a class="toc-backref" href="./iteration-algorithms.html#id1469">fold</a></h1>
<div class="section" id="id493">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename State
, typename ForwardOp
&gt;
struct <a href="./fold.html" class="identifier">fold</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id494">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of the successive application of binary <tt class="literal"><span class="pre">ForwardOp</span></tt> to the
result of the previous <tt class="literal"><span class="pre">ForwardOp</span></tt> invocation (<tt class="literal"><span class="pre">State</span></tt> if it's the first call)
and every element of the sequence in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) in order.</p>
</div>
<div class="section" id="id495">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/fold.hpp" class="header">boost/mpl/fold.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id496">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to iterate.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">State</span></tt></td>
<td>Any type</td>
<td>The initial state for the first <tt class="literal"><span class="pre">ForwardOp</span></tt>
application.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">ForwardOp</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>The operation to be executed on forward
traversal.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id497">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt>, and arbitrary type <tt class="literal"><span class="pre">state</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./fold.html" class="identifier">fold</a>&lt;s,state,op&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./iter-fold.html" class="identifier">iter_fold</a>&lt;
s
, state
, apply_wrap2&lt; <a href="./lambda.html" class="identifier">lambda</a>&lt;op&gt;::type, <a href="./placeholders.html" class="identifier">_1</a>, <a href="./deref.html" class="identifier">deref</a>&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt; &gt;
&gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id498">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">op</span></tt>.</p>
</div>
<div class="section" id="id499">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long,float,short,double,float,long,long double&gt; types;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;
types
, <a href="./int.html" class="identifier">int_</a>&lt;0&gt;
, <a href="./if.html" class="identifier">if_</a>&lt; is_float&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt;,<a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;,<a href="./placeholders.html" class="identifier">_1</a> &gt;
&gt;::type number_of_floats;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( number_of_floats::value, ==, 4 );
</pre>
</div>
<div class="section" id="id500">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./accumulate.html">accumulate</a>, <a class="reference internal" href="./reverse-fold.html">reverse_fold</a>, <a class="reference internal" href="./iter-fold.html">iter_fold</a>, <a class="reference internal" href="./reverse-iter-fold.html">reverse_iter_fold</a>, <a class="reference internal" href="./copy.html">copy</a>, <a class="reference internal" href="./copy-if.html">copy_if</a></p>
<!-- Algorithms/Iteration Algorithms//iter_fold -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./iter-fold.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./iter-fold.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: for_each</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./runtime-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./metafunctions.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./runtime-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./runtime-algorithms.html" class="navigation-link">Runtime Algorithms</a> / <a href="./for-each.html" class="navigation-link">for_each</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="for-each">
<h1><a class="toc-backref" href="./runtime-algorithms.html#id1509">for_each</a></h1>
<div class="section" id="id812">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename F
&gt;
void <a href="./for-each.html" class="identifier">for_each</a>( F f );
template&lt;
typename Sequence
, typename TransformOp
, typename F
&gt;
void <a href="./for-each.html" class="identifier">for_each</a>( F f );
</pre>
</div>
<div class="section" id="id813">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./for-each.html" class="identifier">for_each</a></span></tt> is a family of overloaded function templates:</p>
<ul class="simple">
<li><tt class="literal"><span class="pre"><a href="./for-each.html" class="identifier">for_each</a>&lt;Sequence&gt;(</span> <span class="pre">f</span> <span class="pre">)</span></tt> applies the runtime function object
<tt class="literal"><span class="pre">f</span></tt> to every element in the [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) range.</li>
<li><tt class="literal"><span class="pre"><a href="./for-each.html" class="identifier">for_each</a>&lt;Sequence,TransformOp&gt;(</span> <span class="pre">f</span> <span class="pre">)</span></tt> applies the runtime function
object <tt class="literal"><span class="pre">f</span></tt> to the result of the transformation <tt class="literal"><span class="pre">TransformOp</span></tt> of
every element in the [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) range.</li>
</ul>
</div>
<div class="section" id="id814">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/for_each.hpp" class="header">boost/mpl/for_each.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id815">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="39%" />
<col width="39%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to iterate.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">TransformOp</span></tt></td>
<td><a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A transformation.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">f</span></tt></td>
<td>An <a class="reference external" href="https://boost.org/sgi/stl/UnaryFunction.html" target="_top">unary function object</a></td>
<td>A runtime operation to apply.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id816">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt> , and an
<a class="reference external" href="https://boost.org/sgi/stl/UnaryFunction.html" target="_top">unary function object</a> <tt class="literal"><span class="pre">f</span></tt>:</p>
<pre class="literal-block">
<a href="./for-each.html" class="identifier">for_each</a>&lt;s&gt;( f );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">void</span></tt></p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
typedef <a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type i<sub>1</sub>;
<a class="reference external" href="http://www.boost.org/libs/utility/value_init.htm" target="_top">value_initialized</a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>1</sub>&gt;::type &gt; x<sub>1</sub>;
f(boost::get(x<sub>1</sub>));
typedef <a href="./next.html" class="identifier">next</a>&lt;i<sub>1</sub>&gt;::type i<sub>2</sub>;
<a class="reference external" href="http://www.boost.org/libs/utility/value_init.htm" target="_top">value_initialized</a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>2</sub>&gt;::type &gt; x<sub>2</sub>;
f(boost::get(x<sub>2</sub>));
<em>...</em>
<a class="reference external" href="http://www.boost.org/libs/utility/value_init.htm" target="_top">value_initialized</a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>n</sub>&gt;::type &gt; x<sub>n</sub>;
f(boost::get(x<sub>n</sub>));
typedef <a href="./next.html" class="identifier">next</a>&lt;i<sub>n</sub>&gt;::type last;
</pre>
<p class="last">where <tt class="literal"><span class="pre">n</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> and <tt class="literal"><span class="pre">last</span></tt> is identical to
<tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>; no effect if <tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
</tr>
</tbody>
</table>
<pre class="literal-block">
<a href="./for-each.html" class="identifier">for_each</a>&lt;s,op&gt;( f );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">void</span></tt></p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
<a href="./for-each.html" class="identifier">for_each</a>&lt; <a href="./transform-view.html" class="identifier">transform_view</a>&lt;s,op&gt; &gt;( f );
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id817">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">op</span></tt> and <tt class="literal"><span class="pre">f</span></tt>.</p>
</div>
<div class="section" id="id818">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct value_printer
{
template&lt; typename U &gt; void operator()(U x)
{
std::cout &lt;&lt; x &lt;&lt; '\n';
}
};
int main()
{
<a href="./for-each.html" class="identifier">for_each</a>&lt; <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; &gt;( value_printer() );
}
</pre>
</div>
<div class="section" id="id819">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./runtime-algorithms.html">Runtime Algorithms</a>, <a class="reference internal" href="./views.html">Views</a>, <a class="reference internal" href="./transform-view.html">transform_view</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./runtime-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./metafunctions.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./runtime-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Forward Iterator</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./bidirectional-iterator.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bidirectional-iterator.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterators-concepts.html" class="navigation-link">Concepts</a> / <a href="./forward-iterator.html" class="navigation-link">Forward Iterator</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="forward-iterator">
<h1><a class="toc-backref" href="./iterators-concepts.html#id1450">Forward Iterator</a></h1>
<div class="section" id="id384">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> <tt class="literal"><span class="pre">i</span></tt> is a type that represents a positional reference
to an element of a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>. It allows to access the element through
a dereference operation, and provides a way to obtain an iterator to
the next element in a sequence.</p>
<!-- A [Forward Iterator] guarantees a linear traversal over
the sequence. -->
</div>
<div class="section" id="id385">
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple">
<li>An iterator can be <cite>dereferenceable</cite>, meaning that <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt>
is a well-defined expression.</li>
<li>An iterator is <cite>past-the-end</cite> if it points beyond the last element of a
sequence; past-the-end iterators are non-dereferenceable.</li>
<li>An iterator <tt class="literal"><span class="pre">i</span></tt> is <cite>incrementable</cite> if there is a &quot;next&quot; iterator, that
is, if <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt> expression is well-defined; past-the-end iterators are
not incrementable.</li>
<li>Two iterators into the same sequence are <cite>equivalent</cite> if they have the same
type.</li>
<li>An iterator <tt class="literal"><span class="pre">j</span></tt> is <cite>reachable</cite> from an iterator <tt class="literal"><span class="pre">i</span></tt> if , after recursive
application of <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a></span></tt> metafunction to <tt class="literal"><span class="pre">i</span></tt> a finite number of times, <tt class="literal"><span class="pre">i</span></tt>
is equivalent to <tt class="literal"><span class="pre">j</span></tt>.</li>
<li>The notation [<tt class="literal"><span class="pre">i</span></tt>,<tt class="literal"><span class="pre">j</span></tt>) refers to a <cite>range</cite> of iterators beginning with
<tt class="literal"><span class="pre">i</span></tt> and up to but not including <tt class="literal"><span class="pre">j</span></tt>.</li>
<li>The range [<tt class="literal"><span class="pre">i</span></tt>,<tt class="literal"><span class="pre">j</span></tt>) is a <cite>valid range</cite> if <tt class="literal"><span class="pre">j</span></tt> is reachable from <tt class="literal"><span class="pre">i</span></tt>.</li>
</ul>
</div>
<div class="section" id="id386">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="25%" />
<col width="46%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre">i::category</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a>, convertible
to <tt class="literal"><span class="pre">forward_iterator_tag</span></tt></td>
<td>Constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id387">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<pre class="literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">i</span></tt> is dereferenceable</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is identical to the type of the pointed element</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./next.html" class="identifier">next</a>&lt;i&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">i</span></tt> is incrementable</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is the next iterator in a sequence</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is dereferenceable or past-the-end</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef i::category c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">c</span></tt> is identical to the iterator's category tag</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id388">
<h3><a class="subsection-title" href="#invariants" name="invariants">Invariants</a></h3>
<p>For any forward iterators <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> the following invariants always hold:</p>
<ul class="simple">
<li><tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent if and only if they are pointing to the same
element.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> is dereferenceable, and <tt class="literal"><span class="pre">j</span></tt> is equivalent to <tt class="literal"><span class="pre">i</span></tt>, then <tt class="literal"><span class="pre">j</span></tt> is
dereferenceable as well.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent and dereferenceable, then <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt>
and <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;j&gt;::type</span></tt> are identical.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> is incrementable, and <tt class="literal"><span class="pre">j</span></tt> is equivalent to <tt class="literal"><span class="pre">i</span></tt>, then <tt class="literal"><span class="pre">j</span></tt> is
incrementable as well.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent and incrementable, then <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt>
and <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;j&gt;::type</span></tt> are equivalent.</li>
</ul>
</div>
<div class="section" id="id389">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./deref.html">deref</a>, <a class="reference internal" href="./next.html">next</a></p>
<!-- Iterators/Concepts//Bidirectional Iterator |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./bidirectional-iterator.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bidirectional-iterator.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Forward Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./bidirectional-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bidirectional-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./forward-sequence.html" class="navigation-link">Forward Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="forward-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1395">Forward Sequence</a></h1>
<div class="section" id="description">
<h3>Description</h3>
<p>A <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> is an MPL concept representing a compile-time sequence of
elements. Sequence elements are
types, and are accessible through <a class="reference internal" href="./iterators.html">Iterators</a>. The <a class="reference internal" href="./begin.html">begin</a> and <a class="reference internal" href="./end.html">end</a> metafunctions
provide iterators delimiting the range of the sequence
elements. A sequence guarantees that its elements are arranged in a definite,
but possibly unspecified, order. Every MPL sequence is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
</div>
<div class="section" id="definitions">
<h3>Definitions</h3>
<ul class="simple">
<li>The <em>size</em> of a sequence is the number of elements it contains. The size is a
nonnegative number.</li>
<li>A sequence is <em>empty</em> if its size is zero.</li>
</ul>
</div>
<div class="section" id="expression-requirements">
<h3>Expression requirements</h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following expressions must be valid:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="30%" />
<col width="39%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type</span></tt></td>
<td>Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="expression-semantics">
<h3>Expression semantics</h3>
<table border="1" class="docutils table">
<colgroup>
<col width="28%" />
<col width="72%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt></td>
<td>An iterator to the first element of the sequence; see <a class="reference internal" href="./begin.html">begin</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt></td>
<td>A past-the-end iterator to the sequence; see <a class="reference internal" href="./end.html">end</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::type</span></tt></td>
<td>The size of the sequence; see <a class="reference internal" href="./size.html">size</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type</span></tt></td>
<td>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if the sequence is empty; see <a class="reference internal" href="./empty.html">empty</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
<td>The first element in the sequence; see <a class="reference internal" href="./front.html">front</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="invariants">
<h3>Invariants</h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following invariants always hold:</p>
<ul class="simple">
<li>[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>) is always a valid range.</li>
<li>An algorithm that iterates through the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>)
will pass through every element of <tt class="literal"><span class="pre">s</span></tt> exactly once.</li>
<li><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt> is identical to <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt> if and only if <tt class="literal"><span class="pre">s</span></tt> is empty.</li>
<li>Two different iterations through <tt class="literal"><span class="pre">s</span></tt> will access its elements in the same order.</li>
</ul>
</div>
<div class="section" id="models">
<h3>Models</h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
<li><a class="reference internal" href="./range-c.html">range_c</a></li>
<li><a class="reference internal" href="./iterator-range.html">iterator_range</a></li>
<li><a class="reference internal" href="./filter-view.html">filter_view</a></li>
</ul>
</div>
<div class="section" id="see-also">
<h3>See also</h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./size.html">size</a>, <a class="reference internal" href="./empty.html">empty</a>, <a class="reference internal" href="./front.html">front</a></p>
<!-- Sequences/Concepts//Bidirectional Sequence |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./bidirectional-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bidirectional-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Front Extensible Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./back-extensible-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./back-extensible-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./front-extensible-sequence.html" class="navigation-link">Front Extensible Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="front-extensible-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1399">Front Extensible Sequence</a></h1>
<div class="section" id="id17">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a> is an <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> that supports amortized constant
time insertion and removal operations at the beginning.</p>
</div>
<div class="section" id="id18">
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></p>
</div>
<div class="section" id="id19">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>,
for any <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="35%" />
<col width="35%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-front.html" class="identifier">push_front</a>&lt;s,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-front.html" class="identifier">pop_front</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
<td>Any type</td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id20">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
<table border="1" class="docutils table">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-front.html" class="identifier">push_front</a>&lt;s,x&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,<a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type,x&gt;::type</span></tt>;
see <a class="reference internal" href="./push-front.html">push_front</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-front.html" class="identifier">pop_front</a>&lt;v&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,<a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type&gt;::type</span></tt>;
see <a class="reference internal" href="./pop-front.html">pop_front</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
<td>The first element in the sequence; see <a class="reference internal" href="./front.html">front</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id21">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./list.html">list</a></li>
</ul>
</div>
<div class="section" id="id22">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a>, <a class="reference internal" href="./push-front.html">push_front</a>, <a class="reference internal" href="./pop-front.html">pop_front</a>, <a class="reference internal" href="./front.html">front</a></p>
<!-- Sequences/Concepts//Back Extensible Sequence |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./back-extensible-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./back-extensible-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: front_inserter</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Back</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./inserters.html" class="navigation-link">Inserters</a> / <a href="./front-inserter.html" class="navigation-link">front_inserter</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="front-inserter">
<h1><a class="toc-backref" href="./inserters.html#id1466">front_inserter</a></h1>
<div class="section" id="id474">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Seq
&gt;
struct <a href="./front-inserter.html" class="identifier">front_inserter</a>
{
// <em>unspecified</em>
// <em>...</em>
};
</pre>
</div>
<div class="section" id="id475">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Inserts elements at the beginning of the sequence.</p>
</div>
<div class="section" id="id476">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/front_inserter.hpp" class="header">boost/mpl/front_inserter.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id477">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./inserter.html">Inserter</a></p>
</div>
<div class="section" id="id478">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="18%" />
<col width="36%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Seq</span></tt></td>
<td><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td>A sequence to bind the inserter to.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id479">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./inserter.html">Inserter</a>.</p>
<p>For any <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./front-inserter.html" class="identifier">front_inserter</a>&lt;s&gt;</span></tt></td>
<td><p class="first">An <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>, equivalent to</p>
<pre class="last literal-block">
struct in : <a href="./inserter-class.html" class="identifier">inserter</a>&lt;s,<a href="./push-front.html" class="identifier">push_front</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt; > {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id480">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id481">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./reverse-copy.html" class="identifier">reverse_copy</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,5&gt;
, <a href="./front-inserter.html" class="identifier">front_inserter</a>&lt; <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,5,6,7,8,9&gt; &gt;
&gt;::type range;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; range, <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; > ));
</pre>
</div>
<div class="section" id="id482">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./inserter.html">Inserter</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./inserter-class.html">inserter (class)</a>, <a class="reference internal" href="./back-inserter.html">back_inserter</a>, <a class="reference internal" href="./push-front.html">push_front</a></p>
<!-- Algorithms/Inserters//inserter -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Back</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: front</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./erase-key.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-key.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./erase-key.html" class="navigation-link">Back</a>&nbsp;<a href="./has-key.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./front.html" class="navigation-link">front</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="front">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1434">front</a></h1>
<div class="section" id="id256">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
&gt;
struct <a href="./front.html" class="identifier">front</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id257">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the first element in the sequence.</p>
</div>
<div class="section" id="id258">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/front.hpp" class="header">boost/mpl/front.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id259">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id260">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="18%" />
<col width="27%" />
<col width="55%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id261">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./front.html" class="identifier">front</a>&lt;s&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type &gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id262">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id263">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./list.html" class="identifier">list</a>&lt;long&gt;::type types1;
typedef <a href="./list.html" class="identifier">list</a>&lt;int,long&gt;::type types2;
typedef <a href="./list.html" class="identifier">list</a>&lt;char,int,long&gt;::type types3;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./front.html" class="identifier">front</a>&lt;types1&gt;::type, long &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./front.html" class="identifier">front</a>&lt;types2&gt;::type, int&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./front.html" class="identifier">front</a>&lt;types3&gt;::type, char&gt; ));
</pre>
</div>
<div class="section" id="id264">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./back.html">back</a>, <a class="reference internal" href="./push-front.html">push_front</a>, <a class="reference internal" href="./begin.html">begin</a>, <a class="reference internal" href="./deref.html">deref</a>, <a class="reference internal" href="./at.html">at</a></p>
<!-- Sequences/Intrinsic Metafunctions//has_key -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./erase-key.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-key.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./erase-key.html" class="navigation-link">Back</a>&nbsp;<a href="./has-key.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_GET_TAG_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./get-tag-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-trait-def.html" class="navigation-link">BOOST_MPL_GET_TAG_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-trait-def">
<h1><a class="toc-backref" href="./introspection.html#id1595">BOOST_MPL_GET_TAG_DEF</a></h1>
<div class="section" id="id1329">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_GET_TAG_DEF</a>(name) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1330">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into a definition of a lazy getter <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">get_tag_name</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">get_tag_name&lt;x&gt;::type</span> <span class="pre">is</span> <span class="pre">type</span></tt> where
<tt class="literal"><span class="pre">name</span></tt> is a nested type member of <tt class="literal"><span class="pre">x</span></tt>.</p>
</div>
<div class="section" id="id1331">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/get_tag.hpp" class="header">boost/mpl/get_tag.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1332">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the member to get.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1333">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifier <tt class="literal"><span class="pre">name</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_GET_TAG_DEF</a>(name)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
namespace boost { namespace mpl {</pre>
<pre class="last literal-block">
template&lt;class T&gt;
struct get_##name {
typedef typename T::name type;
};</pre>
<pre class="last literal-block">
}}
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1334">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct test_type_get_tag_def;
<a href="get-tag-def.html" class="identifier">BOOST_MPL_GET_TAG_DEF</a>(a_tag);
namespace boost { namespace mpl {
struct test_type_get_tag_def
{
typedef int a_tag;
};
}}
typedef boost::mpl::get_a_tag&lt;test_type_get_tag_def&gt;::type got_the_tag;
</pre>
</div>
<div class="section" id="id1335">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></p>
<!-- Macros/Introspection/BOOST_MPL_GET_TAG_DEF -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./get-tag-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2017 Sergey Krivonos and Edward Diener</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: greater_equal</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./greater.html" class="navigation-link">Prev</a>&nbsp;<a href="./equal-to.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./greater.html" class="navigation-link">Back</a>&nbsp;<a href="./equal-to.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a> / <a href="./greater-equal.html" class="navigation-link">greater_equal</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="greater-equal">
<h1><a class="toc-backref" href="./comparisons.html#id1546">greater_equal</a></h1>
<div class="section" id="id1041">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
&gt;
struct <a href="./greater-equal.html" class="identifier">greater_equal</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1042">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> is greater than or equal to <tt class="literal"><span class="pre">T2</span></tt>.</p>
</div>
<div class="section" id="id1043">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/greater_equal.hpp" class="header">boost/mpl/greater_equal.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/comparison.hpp" class="header">boost/mpl/comparison.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1044">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1045">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1046">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./bool.html" class="identifier">bool_</a>&lt; (c1::value &lt; c2::value) &gt; r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1047">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1048">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;0&gt; &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;0&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; > ));
</pre>
</div>
<div class="section" id="id1049">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./comparisons.html">Comparisons</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./greater.html">greater</a>, <a class="reference internal" href="./less.html">less</a>, <a class="reference internal" href="./equal-to.html">equal_to</a></p>
<!-- Metafunctions/Comparisons//equal_to |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./greater.html" class="navigation-link">Prev</a>&nbsp;<a href="./equal-to.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./greater.html" class="navigation-link">Back</a>&nbsp;<a href="./equal-to.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: greater</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./less-equal.html" class="navigation-link">Prev</a>&nbsp;<a href="./greater-equal.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./less-equal.html" class="navigation-link">Back</a>&nbsp;<a href="./greater-equal.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a> / <a href="./greater.html" class="navigation-link">greater</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="greater">
<h1><a class="toc-backref" href="./comparisons.html#id1545">greater</a></h1>
<div class="section" id="id1032">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1
, typename T2
&gt;
struct <a href="./greater.html" class="identifier">greater</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1033">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> is greater than <tt class="literal"><span class="pre">T2</span></tt>.</p>
</div>
<div class="section" id="id1034">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/greater.hpp" class="header">boost/mpl/greater.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/comparison.hpp" class="header">boost/mpl/comparison.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1035">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1036">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1037">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./bool.html" class="identifier">bool_</a>&lt; (c1::value &lt; c2::value) &gt; r;
</pre>
</td>
</tr>
</tbody>
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r : <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt;::type {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1038">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1039">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./greater.html" class="identifier">greater</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;0&gt; &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./greater.html" class="identifier">greater</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;0&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./greater.html" class="identifier">greater</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; > ));
</pre>
</div>
<div class="section" id="id1040">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./comparisons.html">Comparisons</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./greater-equal.html">greater_equal</a>, <a class="reference internal" href="./less.html">less</a>, <a class="reference internal" href="./equal-to.html">equal_to</a></p>
<!-- Metafunctions/Comparisons//greater_equal |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./less-equal.html" class="navigation-link">Prev</a>&nbsp;<a href="./greater-equal.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./less-equal.html" class="navigation-link">Back</a>&nbsp;<a href="./greater-equal.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: has_key</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./front.html" class="navigation-link">Prev</a>&nbsp;<a href="./insert.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./front.html" class="navigation-link">Back</a>&nbsp;<a href="./insert.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./has-key.html" class="navigation-link">has_key</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="has-key">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1435">has_key</a></h1>
<div class="section" id="id265">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Key
&gt;
struct <a href="./has-key.html" class="identifier">has_key</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id266">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">Sequence</span></tt> contains an element
with key <tt class="literal"><span class="pre">Key</span></tt>.</p>
</div>
<div class="section" id="id267">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_key.hpp" class="header">boost/mpl/has_key.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id268">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id269">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></td>
<td>A sequence to query.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Key</span></tt></td>
<td>Any type</td>
<td>The queried key.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id270">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">key</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./has-key.html" class="identifier">has_key</a>&lt;s,key&gt;::type c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if <tt class="literal"><span class="pre">key</span></tt> is in <tt class="literal"><span class="pre">s</span></tt>'s set of keys; otherwise
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id271">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id272">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./map.html" class="identifier">map</a>&lt; <a href="./pair.html" class="identifier">pair</a>&lt;int,unsigned&gt;, <a href="./pair.html" class="identifier">pair</a>&lt;char,long&gt; &gt; m;
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./has-key.html" class="identifier">has_key</a>&lt;m,long&gt; ));
typedef <a href="./insert.html" class="identifier">insert</a>&lt; m, <a href="./pair.html" class="identifier">pair</a>&lt;long,unsigned long&gt; &gt; m1;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./has-key.html" class="identifier">has_key</a>&lt;m1,long&gt; ));
</pre>
</div>
<div class="section" id="id273">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./erase-key.html">erase_key</a></p>
<!-- Sequences/Intrinsic Metafunctions//insert -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./front.html" class="navigation-link">Prev</a>&nbsp;<a href="./insert.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./front.html" class="navigation-link">Back</a>&nbsp;<a href="./insert.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TEMPLATE_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-template-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-template-def">
<h1><a class="toc-backref" href="./introspection.html#id1593">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a></h1>
<div class="section" id="id1315">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-template-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>(name) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1316">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into the definition of a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">has_name</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and
only if <tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested template member
<tt class="literal"><span class="pre">x::template</span> <span class="pre">name</span></tt> with no more than
<a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a> parameters.</p>
<p>On deficient compilers not capable of performing the detection,
<tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span></tt> is always <tt class="literal"><span class="pre">false</span></tt>. A boolean configuration
macro, <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, is provided to signal or
override the &quot;deficient&quot; status of a particular compiler.</p>
<p>[<em>Note:</em> <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a> is a simplified front end to
the <a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a> introspection macro — <em>end note</em>]</p>
</div>
<div class="section" id="id1317">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1318">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the template member being detected.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1319">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifier <tt class="literal"><span class="pre">name</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-template-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>(name)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
<a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(
BOOST_PP_CAT(has_,name), name, false
)
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1320">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-template-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>(xxx)
struct test1 {};
struct test2 { void xxx(); };
struct test3 { int xxx; };
struct test4 { static int xxx(); };
struct test5 { typedef int xxx; };
struct test6 { struct xxx; };
struct test7 { typedef void (*xxx)(); };
struct test8 { typedef void (xxx)(); };
struct test9 { template&lt; class T &gt; struct xxx {}; };
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test1&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test2&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test3&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test4&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test5&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test6&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test7&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test8&gt; ));
#if !defined(<a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>)
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9, <a href="./bool.html" class="identifier">true_</a>&gt; ));
</pre>
</div>
<div class="section" id="id1321">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>,
<a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></p>
<!-- Macros/Introspection//BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF -->
<!-- Copyright Daniel Walker 2007. -->
<!-- Distributed under the Boost -->
<!-- Software License, Version 1.0. (See accompanying -->
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"></div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-template-named-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-template-named-def">
<h1><a class="toc-backref" href="./introspection.html#id1594">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></h1>
<div class="section" id="id1322">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(trait, name, default_) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1323">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into the definition of a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">trait</span></tt> such
that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">trait&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if
<tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested template member <tt class="literal"><span class="pre">x::template</span>
<span class="pre">name</span></tt> with no more than <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a>
parameters.</p>
<p>On deficient compilers not capable of performing the detection,
<tt class="literal"><span class="pre">trait&lt;x&gt;::value</span></tt> always returns a fallback value <tt class="literal"><span class="pre">default_</span></tt>. A
boolean configuration macro, <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, is
provided to signal or override the &quot;deficient&quot; status of a particular
compiler. [<em>Note:</em> The fallback value can also be provided at the
point of the metafunction invocation; see the <cite>Expression semantics</cite>
section for details — <em>end note</em>]</p>
</div>
<div class="section" id="id1324">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1325">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">trait</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the metafunction to be generated.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the member being detected.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">default_</span></tt></td>
<td>An boolean constant</td>
<td>A fallback value for the deficient compilers.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1326">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifiers <tt class="literal"><span class="pre">trait</span></tt> and <tt class="literal"><span class="pre">name</span></tt>, boolean constant
expression <tt class="literal"><span class="pre">c1</span></tt>, boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c2</span></tt>, and arbitrary
type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(trait, name, c1)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Expands into an equivalent of the following class template
definition</p>
<pre class="literal-block">
template&lt;
typename X
, typename fallback = boost::mpl::<a href="./bool.html" class="identifier">bool_</a>&lt;c1&gt;
&gt;
struct trait
{
// <em>unspecified</em>
// ...
};
</pre>
<p>where <tt class="literal"><span class="pre">trait</span></tt> is a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> with the following
semantics:</p>
<pre class="literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a> is defined, <tt class="literal"><span class="pre">r::value</span>
<span class="pre">==</span> <span class="pre">c1</span></tt>; otherwise, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if <tt class="literal"><span class="pre">x</span></tt>
is a class type that has a nested template member <tt class="literal"><span class="pre">x::template</span>
<span class="pre">name</span></tt> with no more than <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a>.</td>
</tr>
</tbody>
</table>
<pre class="literal-block">
typedef trait&lt; x, c2 &gt;::type r;
</pre>
<table class="last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">If <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a> is defined, <tt class="literal"><span class="pre">r::value</span>
<span class="pre">==</span> <span class="pre">c2::value</span></tt>; otherwise, equivalent to</p>
<pre class="last literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1327">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(
has_xxx, xxx, false
)
struct test1 {};
struct test2 { void xxx(); };
struct test3 { int xxx; };
struct test4 { static int xxx(); };
struct test5 { typedef int xxx; };
struct test6 { struct xxx; };
struct test7 { typedef void (*xxx)(); };
struct test8 { typedef void (xxx)(); };
struct test9 { template&lt; class T &gt; struct xxx {}; };
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test1&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test2&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test3&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test4&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test5&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test6&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test7&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test8&gt; ));
#if !defined(<a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>)
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9, <a href="./bool.html" class="identifier">true_</a>&gt; ));
</pre>
</div>
<div class="section" id="id1328">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>,
<a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></p>
<!-- Macros/Introspection//BOOST_MPL_HAS_XXX_TRAIT_DEF -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"></div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TRAIT_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-trait-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-trait-def">
<h1><a class="toc-backref" href="./introspection.html#id1595">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></h1>
<div class="section" id="id1329">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(name) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1330">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into a definition of a boolean unary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">has_name</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only
if <tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested type memeber <tt class="literal"><span class="pre">x::name</span></tt>.</p>
<p>On the deficient compilers not capabale of performing the detection,
<tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span></tt> always returns <tt class="literal"><span class="pre">false</span></tt>. A boolean configuraion
macro, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a>, is provided to signal or override
the &quot;deficient&quot; status of a particular compiler.</p>
<p>[<em>Note:</em> <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a> is a simplified front end to
the <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a> introspection macro — <em>end note</em>]</p>
</div>
<div class="section" id="id1331">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1332">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the member being detected.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1333">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifier <tt class="literal"><span class="pre">name</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(name)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
<a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(
BOOST_PP_CAT(has_,name), name, false
)
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1334">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(xxx)
struct test1 {};
struct test2 { void xxx(); };
struct test3 { int xxx; };
struct test4 { static int xxx(); };
struct test5 { template&lt; typename T &gt; struct xxx {}; };
struct test6 { typedef int xxx; };
struct test7 { struct xxx; };
struct test8 { typedef void (*xxx)(); };
struct test9 { typedef void (xxx)(); };
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test1&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test2&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test3&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test4&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test5&gt; ));
#if !defined(<a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a>)
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9,<a href="./bool.html" class="identifier">true_</a>&gt; ));
</pre>
</div>
<div class="section" id="id1335">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a></p>
<!-- Macros/Introspection//BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,184 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./configuration.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-trait-named-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-trait-named-def">
<h1><a class="toc-backref" href="./introspection.html#id1596">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></h1>
<div class="section" id="id1336">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(trait, name, default_) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1337">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into a definition of a boolean unary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">trait</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">trait&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only
if <tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested type memeber <tt class="literal"><span class="pre">x::name</span></tt>.</p>
<p>On the deficient compilers not capabale of performing the detection,
<tt class="literal"><span class="pre">trait&lt;x&gt;::value</span></tt> always returns a fallback value <tt class="literal"><span class="pre">default_</span></tt>.
A boolean configuraion macro, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a>, is provided
to signal or override the &quot;deficient&quot; status of a particular compiler.
[<em>Note:</em> The fallback value can also be provided at the point of the
metafunction invocation; see the <cite>Expression semantics</cite> section for
details — <em>end note</em>]</p>
</div>
<div class="section" id="id1338">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1339">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">trait</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the metafunction to be generated.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the member being detected.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">default_</span></tt></td>
<td>An boolean constant</td>
<td>A fallback value for the deficient compilers.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1340">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifiers <tt class="literal"><span class="pre">trait</span></tt> and <tt class="literal"><span class="pre">name</span></tt>, boolean constant expression <tt class="literal"><span class="pre">c1</span></tt>,
boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c2</span></tt>, and arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(trait, name, c1)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Expands into an equivalent of the following class template definition</p>
<pre class="literal-block">
template&lt; typename X, typename fallback = boost::mpl::<a href="./bool.html" class="identifier">bool_</a>&lt;c1&gt; &gt;
struct trait
{
// <em>unspecified</em>
// ...
};
</pre>
<p>where <tt class="literal"><span class="pre">trait</span></tt> is a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> with the following semantics:</p>
<pre class="literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a> is defined, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">c1</span></tt>;
otherwise, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if <tt class="literal"><span class="pre">x</span></tt> is a class type
that has a nested type memeber <tt class="literal"><span class="pre">x::name</span></tt>.</td>
</tr>
</tbody>
</table>
<pre class="literal-block">
typedef trait&lt; x,c2 &gt;::type r;
</pre>
<table class="last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">If <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a> is defined, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">c2::value</span></tt>;
otherwise, equivalent to</p>
<pre class="last literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1341">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(has_xxx, xxx, false)
struct test1 {};
struct test2 { void xxx(); };
struct test3 { int xxx; };
struct test4 { static int xxx(); };
struct test5 { template&lt; typename T &gt; struct xxx {}; };
struct test6 { typedef int xxx; };
struct test7 { struct xxx; };
struct test8 { typedef void (*xxx)(); };
struct test9 { typedef void (xxx)(); };
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test1&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test2&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test3&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test4&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test5&gt; ));
#if !defined(<a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a>)
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9,<a href="./bool.html" class="identifier">true_</a>&gt; ));
</pre>
</div>
<div class="section" id="id1342">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./configuration.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: identity</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Prev</a>&nbsp;<a href="./always.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./always.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./identity.html" class="navigation-link">identity</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="identity">
<h1><a class="toc-backref" href="./miscellaneous.html#id1564">identity</a></h1>
<div class="section" id="id1146">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename X
&gt;
struct <a href="./identity.html" class="identifier">identity</a>
{
typedef X type;
};
</pre>
</div>
<div class="section" id="id1147">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>The <a class="reference external" href="http://mathworld.wolfram.com/IdentityFunction.html" target="_top">identity</a> metafunction. Returns <tt class="literal"><span class="pre">X</span></tt> unchanged.</p>
</div>
<div class="section" id="id1149">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/identity.hpp" class="header">boost/mpl/identity.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1150">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
</div>
<div class="section" id="id1151">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="22%" />
<col width="28%" />
<col width="51%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">X</span></tt></td>
<td>Any type</td>
<td>An argument to be returned.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1152">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For an arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./identity.html" class="identifier">identity</a>&lt;x&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
typedef x r;
</pre>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre">is_same&lt;r,x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1153">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;, char &gt;::type t1;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt;, char,int &gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t1, char &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t2, int > ));
</pre>
</div>
<div class="section" id="id1154">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./placeholders.html">Placeholders</a>, <a class="reference internal" href="./trivial.html#label-metafunctions-trivial">Trivial Metafunctions</a>, <a class="reference internal" href="./always.html">always</a>, <a class="reference internal" href="./apply.html">apply</a></p>
<!-- Metafunctions/Miscellaneous//always |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Prev</a>&nbsp;<a href="./always.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./always.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: if_c</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./if.html" class="navigation-link">Prev</a>&nbsp;<a href="./eval-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./if.html" class="navigation-link">Back</a>&nbsp;<a href="./eval-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./if-c.html" class="navigation-link">if_c</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="if-c">
<h1><a class="toc-backref" href="./type-selection.html#id1521">if_c</a></h1>
<div class="section" id="id866">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
bool c
, typename T1
, typename T2
&gt;
struct <a href="./if-c.html" class="identifier">if_c</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id867">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns one of its two arguments, <tt class="literal"><span class="pre">T1</span></tt> or <tt class="literal"><span class="pre">T2</span></tt>, depending on the value of
integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class="literal"><span class="pre"><a href="./if-c.html" class="identifier">if_c</a>&lt;c,t1,t2&gt;::type</span></tt> is a shorcut notation for
<tt class="literal"><span class="pre"><a href="./if.html" class="identifier">if_</a>&lt;</span> <span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;,t1,t2</span> <span class="pre">&gt;::type</span></tt>.</p>
</div>
<div class="section" id="id868">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/if.hpp" class="header">boost/mpl/if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id869">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">c</span></tt></td>
<td>An integral constant</td>
<td>A selection condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td>Any type</td>
<td>Types to select from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id870">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">c</span></tt> and arbitrary types <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;c,t1,t2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre"><a href="./if.html" class="identifier">if_</a>&lt;</span> <span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;,t1,t2</span> <span class="pre">&gt;::type</span> <span class="pre">t;</span></tt></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id871">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;true,char,long&gt;::type t1;
typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;false,char,long&gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t1, char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2, long&gt; ));
</pre>
<pre class="literal-block">
// allocates space for an object of class T on heap or &quot;inplace&quot;
// depending on its <a href="./size.html" class="identifier">size</a>
template&lt; typename T &gt; struct lightweight
{
// ...
typedef typename <a href="./if-c.html" class="identifier">if_c</a>&lt;
sizeof(T) &lt;= sizeof(T*)
, inplace_storage&lt;T&gt;
, heap_storage&lt;T&gt;
&gt;::type impl_t;
impl_t impl;
};
</pre>
</div>
<div class="section" id="id872">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./if.html">if_</a>, <a class="reference internal" href="./eval-if.html">eval_if</a>, <a class="reference internal" href="./bool.html">bool_</a></p>
<!-- Metafunctions/Type Selection//eval_if |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./if.html" class="navigation-link">Prev</a>&nbsp;<a href="./eval-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./if.html" class="navigation-link">Back</a>&nbsp;<a href="./eval-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: if_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Prev</a>&nbsp;<a href="./if-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./if-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./if.html" class="navigation-link">if_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="if">
<h1><a class="toc-backref" href="./type-selection.html#id1520">if_</a></h1>
<div class="section" id="id859">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename C
, typename T1
, typename T2
&gt;
struct <a href="./if.html" class="identifier">if_</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id860">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns one of its two arguments, <tt class="literal"><span class="pre">T1</span></tt> or <tt class="literal"><span class="pre">T2</span></tt>, depending on the value <tt class="literal"><span class="pre">C</span></tt>.</p>
</div>
<div class="section" id="id861">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/if.hpp" class="header">boost/mpl/if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id862">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">C</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>A selection condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td>Any type</td>
<td>Types to select from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id863">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> and arbitrary types <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./if.html" class="identifier">if_</a>&lt;c,t1,t2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>, <tt class="literal"><span class="pre">t</span></tt> is identical to <tt class="literal"><span class="pre">t1</span></tt>; otherwise <tt class="literal"><span class="pre">t</span></tt> is
identical to <tt class="literal"><span class="pre">t2</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id864">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./if.html" class="identifier">if_</a>&lt;<a href="./bool.html" class="identifier">true_</a>,char,long&gt;::type t1;
typedef <a href="./if.html" class="identifier">if_</a>&lt;<a href="./bool.html" class="identifier">false_</a>,char,long&gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t1, char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2, long&gt; ));
</pre>
<pre class="literal-block">
// allocates space for an object of class T on heap or &quot;inplace&quot;
// depending on its <a href="./size.html" class="identifier">size</a>
template&lt; typename T &gt; struct lightweight
{
// ...
typedef typename <a href="./if.html" class="identifier">if_</a>&lt;
<a href="./less-equal.html" class="identifier">less_equal</a>&lt; <a href="./sizeof.html" class="identifier">sizeof_</a>&lt;T&gt;, <a href="./sizeof.html" class="identifier">sizeof_</a>&lt;T*&gt; &gt;
, inplace_storage&lt;T&gt;
, heap_storage&lt;T&gt;
&gt;::type impl_t;
impl_t impl;
};
</pre>
</div>
<div class="section" id="id865">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./if-c.html">if_c</a>, <a class="reference internal" href="./eval-if.html">eval_if</a></p>
<!-- Metafunctions/Type Selection//if_c |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Prev</a>&nbsp;<a href="./if-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./if-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: inherit_linearly</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./inherit.html" class="navigation-link">Prev</a>&nbsp;<a href="./numeric-cast.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inherit.html" class="navigation-link">Back</a>&nbsp;<a href="./numeric-cast.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./inherit-linearly.html" class="navigation-link">inherit_linearly</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="inherit-linearly">
<h1><a class="toc-backref" href="./miscellaneous.html#id1567">inherit_linearly</a></h1>
<div class="section" id="id1172">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Types
, typename Node
, typename Root = <a href="./empty-base.html" class="identifier">empty_base</a>
&gt;
struct <a href="./inherit-linearly.html" class="identifier">inherit_linearly</a>
: <a href="./fold.html" class="identifier">fold</a>&lt;Types,Root,Node&gt;
{
};
</pre>
</div>
<div class="section" id="id1173">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A convenience wrapper for <tt class="literal"><span class="pre"><a href="./fold.html" class="identifier">fold</a></span></tt> to use in the context of sequence-driven
class composition. Returns the result the successive application of binary
<tt class="literal"><span class="pre">Node</span></tt> to the result of the previous <tt class="literal"><span class="pre">Node</span></tt> invocation (<tt class="literal"><span class="pre">Root</span></tt> if it's
the first call) and every type in the <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">Types</span></tt> in order.</p>
</div>
<div class="section" id="id1174">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/inherit_linearly.hpp" class="header">boost/mpl/inherit_linearly.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1175">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
</div>
<div class="section" id="id1176">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Types</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Types to inherit from.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Node</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A derivation metafunction.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Root</span></tt></td>
<td>A class type</td>
<td>A type to be placed at the root of the class
hierarchy.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1177">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">types</span></tt>, binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">node</span></tt>, and arbitrary
class type <tt class="literal"><span class="pre">root</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./inherit-linearly.html" class="identifier">inherit_linearly</a>&lt;types,node,root&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A class type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./fold.html" class="identifier">fold</a>&lt;types,root,node&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1178">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;types&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">node</span></tt>.</p>
</div>
<div class="section" id="id1179">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T &gt; struct tuple_field
{
T field;
};
template&lt; typename T &gt;
inline
T&amp; field(tuple_field&lt;T&gt;&amp; t)
{
return t.field;
}
typedef <a href="./inherit-linearly.html" class="identifier">inherit_linearly</a>&lt;
<a href="./vector.html" class="identifier">vector</a>&lt;int,char const*,bool&gt;
, <a href="./inherit.html" class="identifier">inherit</a>&lt; <a href="./placeholders.html" class="identifier">_1</a>, tuple_field&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt; &gt;
&gt;::type tuple;
int main()
{
tuple t;
field&lt;int&gt;(t) = -1;
field&lt;char const*&gt;(t) = &quot;text&quot;;
field&lt;bool&gt;(t) = false;
std::cout
&lt;&lt; field&lt;int&gt;(t) &lt;&lt; 'n'
&lt;&lt; field&lt;char const*&gt;(t) &lt;&lt; 'n'
&lt;&lt; field&lt;bool&gt;(t) &lt;&lt; 'n'
;
}
</pre>
</div>
<div class="section" id="id1180">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./inherit.html">inherit</a>, <a class="reference internal" href="./empty-base.html">empty_base</a>, <a class="reference internal" href="./fold.html">fold</a>, <a class="reference internal" href="./reverse-fold.html">reverse_fold</a></p>
<!-- Metafunctions/Miscellaneous//numeric_cast |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./inherit.html" class="navigation-link">Prev</a>&nbsp;<a href="./numeric-cast.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inherit.html" class="navigation-link">Back</a>&nbsp;<a href="./numeric-cast.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: inherit</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./always.html" class="navigation-link">Prev</a>&nbsp;<a href="./inherit-linearly.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./always.html" class="navigation-link">Back</a>&nbsp;<a href="./inherit-linearly.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./inherit.html" class="navigation-link">inherit</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="inherit">
<h1><a class="toc-backref" href="./miscellaneous.html#id1566">inherit</a></h1>
<div class="section" id="id1163">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename T1, typename T2
&gt;
struct <a href="./inherit.html" class="identifier">inherit</a><tt class="literal"><span class="pre">2</span></tt>
{
typedef <em>unspecified</em> type;
};
<em>...</em>
template&lt;
typename T1, typename T2,<em>...</em> typename T<em>n</em>
&gt;
struct <a href="./inherit.html" class="identifier">inherit</a><em>n</em>
{
typedef <em>unspecified</em> type;
};
template&lt;
typename T1
, typename T2
<em>...</em>
, typename T<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./inherit.html" class="identifier">inherit</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id1164">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an unspecified class type publically derived from <tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt>.
Guarantees that derivation from <a class="reference internal" href="./empty-base.html">empty_base</a> is always a no-op,
regardless of the position and number of <a class="reference internal" href="./empty-base.html">empty_base</a> classes in
<tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt>.</p>
</div>
<div class="section" id="id1165">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/inherit.hpp" class="header">boost/mpl/inherit.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1166">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
</div>
<div class="section" id="id1167">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="22%" />
<col width="28%" />
<col width="51%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td>A class type</td>
<td>Classes to derived from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1168">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For artibrary class types <em>t</em><sub>1</sub>,<em>t</em><sub>2</sub>,... <em>t</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef inherit2&lt;t1,t2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A class type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">t1</span></tt> and <tt class="literal"><span class="pre">t2</span></tt> are complete types.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">If both <tt class="literal"><span class="pre">t1</span></tt> and <tt class="literal"><span class="pre">t2</span></tt> are identical to <tt class="literal"><span class="pre"><a href="./empty-base.html" class="identifier">empty_base</a></span></tt>, equivalent to</p>
<pre class="literal-block">
typedef <a href="./empty-base.html" class="identifier">empty_base</a> r;
</pre>
<p>otherwise, if <tt class="literal"><span class="pre">t1</span></tt> is identical to <tt class="literal"><span class="pre"><a href="./empty-base.html" class="identifier">empty_base</a></span></tt>, equivalent to</p>
<pre class="literal-block">
typedef t2 r;
</pre>
<p>otherwise, if <tt class="literal"><span class="pre">t2</span></tt> is identical to <tt class="literal"><span class="pre"><a href="./empty-base.html" class="identifier">empty_base</a></span></tt>, equivalent to</p>
<pre class="literal-block">
typedef t1 r;
</pre>
<p>otherwise equivalent to</p>
<pre class="last literal-block">
struct r : t1, t2 {};
</pre>
</td>
</tr>
</tbody>
</table>
<!-- ........................................................................... -->
<pre class="literal-block">
typedef <a href="./inherit.html" class="identifier">inherit</a><em>n</em>&lt;t1,t2,<em>...</em>t<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A class type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><em>t</em><sub>1</sub>,<em>t</em><sub>2</sub>,... <em>t</em><sub>n</sub> are complete types.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct r
: <a href="./inherit.html" class="identifier">inherit</a><tt class="literal"><span class="pre">2</span></tt>&lt;
<a href="./inherit.html" class="identifier">inherit</a><em>n-1</em>&lt;t1,t2,<em>...</em>t<em>n-1</em>&gt;::type
, t<em>n</em>
&gt;
{
};
</pre>
</td>
</tr>
</tbody>
</table>
<!-- ........................................................................... -->
<pre class="literal-block">
typedef <a href="./inherit.html" class="identifier">inherit</a>&lt;t1,t2,<em>...</em>t<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><em>t</em><sub>1</sub>,<em>t</em><sub>2</sub>,... <em>t</em><sub>n</sub> are complete types.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A class type.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./inherit.html" class="identifier">inherit</a><em>n</em>&lt;t1,t2,<em>...</em>t<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1169">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1170">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct udt1 { int n; };
struct udt2 {};
typedef <a href="./inherit.html" class="identifier">inherit</a>&lt;udt1,udt2&gt;::type r1;
typedef <a href="./inherit.html" class="identifier">inherit</a>&lt;<a href="./empty-base.html" class="identifier">empty_base</a>,udt1&gt;::type r2;
typedef <a href="./inherit.html" class="identifier">inherit</a>&lt;<a href="./empty-base.html" class="identifier">empty_base</a>,udt1,<a href="./empty-base.html" class="identifier">empty_base</a>,<a href="./empty-base.html" class="identifier">empty_base</a>&gt;::type r3;
typedef <a href="./inherit.html" class="identifier">inherit</a>&lt;udt1,<a href="./empty-base.html" class="identifier">empty_base</a>,udt2&gt;::type r4;
typedef <a href="./inherit.html" class="identifier">inherit</a>&lt;<a href="./empty-base.html" class="identifier">empty_base</a>,<a href="./empty-base.html" class="identifier">empty_base</a>&gt;::type r5;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_base_and_derived&lt; udt1, r1&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_base_and_derived&lt; udt2, r1&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r2, udt1&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r3, udt1 &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_base_and_derived&lt; udt1, r4 &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_base_and_derived&lt; udt2, r4 &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r5, <a href="./empty-base.html" class="identifier">empty_base</a> > ));
</pre>
</div>
<div class="section" id="id1171">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./empty-base.html">empty_base</a>, <a class="reference internal" href="./inherit-linearly.html">inherit_linearly</a>, <a class="reference internal" href="./identity.html">identity</a></p>
<!-- Metafunctions/Miscellaneous//inherit_linearly |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./always.html" class="navigation-link">Prev</a>&nbsp;<a href="./inherit-linearly.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./always.html" class="navigation-link">Back</a>&nbsp;<a href="./inherit-linearly.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: insert_range</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./insert.html" class="navigation-link">Prev</a>&nbsp;<a href="./is-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./insert.html" class="navigation-link">Back</a>&nbsp;<a href="./is-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./insert-range.html" class="navigation-link">insert_range</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="insert-range">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1437">insert_range</a></h1>
<div class="section" id="id283">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Pos
, typename Range
&gt;
struct <a href="./insert-range.html" class="identifier">insert_range</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id284">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./insert-range.html" class="identifier">insert_range</a></span></tt> performs an insertion of a range of elements at an arbitrary position in
the sequence.</p>
</div>
<div class="section" id="id285">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/insert_range.hpp" class="header">boost/mpl/insert_range.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id286">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id287">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>A sequence to insert into.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pos</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator in <tt class="literal"><span class="pre">Sequence</span></tt> specifying the
insertion position.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Range</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>The range of elements to be inserted.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id288">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, iterator <tt class="literal"><span class="pre">pos</span></tt> in <tt class="literal"><span class="pre">s</span></tt>, and <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">range</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./insert.html" class="identifier">insert</a>&lt;s,pos,range&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">pos</span></tt> is an iterator into <tt class="literal"><span class="pre">s</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">r</span></tt> is a sequence, <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">s</span></tt>, of the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;r&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;r&gt;::type</span></tt>),
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>).</p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">The relative order of the elements in <tt class="literal"><span class="pre">r</span></tt> is the same as in <tt class="literal"><span class="pre">s</span></tt>;</p>
<pre class="last literal-block">
<a href="./size.html" class="identifier">size</a>&lt;r&gt;::value == <a href="./size.html" class="identifier">size</a>&lt;s&gt;::value + <a href="./size.html" class="identifier">size</a>&lt;range&gt;::value
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id289">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Sequence dependent. Quadratic in the worst case, linear at best; see the particular
sequence class' specification for details.</p>
</div>
<div class="section" id="id290">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,0,1,7,8,9&gt; numbers;
typedef <a href="./find.html" class="identifier">find</a>&lt; numbers,<a href="./integral-c.html" class="identifier">integral_c</a>&lt;int,7&gt; &gt;::type pos;
typedef <a href="./insert-range.html" class="identifier">insert_range</a>&lt; numbers,pos,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,2,7&gt; &gt;::type range;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;range&gt;::value, ==, 10 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; range,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; &gt; ));
typedef <a href="./insert-range.html" class="identifier">insert_range</a>&lt;
<a href="./list.html" class="identifier">list</a><tt class="literal"><span class="pre">0</span></tt>&lt;&gt;
, <a href="./end.html" class="identifier">end</a>&lt; <a href="./list.html" class="identifier">list</a><tt class="literal"><span class="pre">0</span></tt>&lt;&gt; &gt;::type
, <a href="./list.html" class="identifier">list</a>&lt;int&gt;
&gt;::type result2;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;result2&gt;::value, ==, 1 );
</pre>
</div>
<div class="section" id="id291">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./push-front.html">push_front</a>, <a class="reference internal" href="./push-back.html">push_back</a>, <a class="reference internal" href="./erase.html">erase</a></p>
<!-- Sequences/Intrinsic Metafunctions//is_sequence -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./insert.html" class="navigation-link">Prev</a>&nbsp;<a href="./is-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./insert.html" class="navigation-link">Back</a>&nbsp;<a href="./is-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

View File

@@ -0,0 +1,218 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: insert</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-key.html" class="navigation-link">Prev</a>&nbsp;<a href="./insert-range.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-key.html" class="navigation-link">Back</a>&nbsp;<a href="./insert-range.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./insert.html" class="navigation-link">insert</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="insert">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1436">insert</a></h1>
<div class="section" id="id274">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
, typename Pos
, typename T
&gt;
struct <a href="./insert.html" class="identifier">insert</a>
{
typedef <em>unspecified</em> type;
};
template&lt;
typename Sequence
, typename T
&gt;
struct <a href="./insert.html" class="identifier">insert</a>
{
typedef <em>unspecified</em> type;
};
</pre>
</div>
<div class="section" id="id275">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a></span></tt> is an <a class="reference internal" href="./terminology.html#overloaded-name">overloaded name</a>:</p>
<ul class="simple">
<li><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;Sequence,Pos,T&gt;</span></tt> performs an insertion of
type <tt class="literal"><span class="pre">T</span></tt> at an arbitrary position <tt class="literal"><span class="pre">Pos</span></tt> in <tt class="literal"><span class="pre">Sequence</span></tt>. <tt class="literal"><span class="pre">Pos</span></tt> is ignored is
<tt class="literal"><span class="pre">Sequence</span></tt> is a model of <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>.</li>
<li><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;Sequence,T&gt;</span></tt> is a shortcut notation for <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;Sequence,Pos,T&gt;</span></tt> for the
case when <tt class="literal"><span class="pre">Sequence</span></tt> is a model of <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>.</li>
</ul>
</div>
<div class="section" id="id276">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/insert.hpp" class="header">boost/mpl/insert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id277">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id278">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>A sequence to insert into.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pos</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator in <tt class="literal"><span class="pre">Sequence</span></tt> specifying the
insertion position.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
<td>Any type</td>
<td>The element to be inserted.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id279">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, iterator <tt class="literal"><span class="pre">pos</span></tt> in <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type r;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">pos</span></tt> is an iterator in <tt class="literal"><span class="pre">s</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">r</span></tt> is a sequence, <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">s</span></tt>, of the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), <tt class="literal"><span class="pre">x</span></tt>, [<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>).</p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">The relative order of the elements in <tt class="literal"><span class="pre">r</span></tt> is the same as in <tt class="literal"><span class="pre">s</span></tt>.</p>
<pre class="literal-block">
<a href="./at.html" class="identifier">at</a>&lt; r, <a href="./distance.html" class="identifier">distance</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type,pos &gt;::type &gt;::type
</pre>
<p>is identical to <tt class="literal"><span class="pre">x</span></tt>;</p>
<pre class="last literal-block">
<a href="./size.html" class="identifier">size</a>&lt;r&gt;::value == <a href="./size.html" class="identifier">size</a>&lt;s&gt;::value + 1;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, iterator <tt class="literal"><span class="pre">pos</span></tt> in <tt class="literal"><span class="pre">s</span></tt>,
and arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type r;
</pre>
<table class="compound-middle docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> and equivalent to <tt class="literal"><span class="pre">s</span></tt>, except that
<tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;</span> <span class="pre">r,</span> <span class="pre"><a href="./key-type.html" class="identifier">key_type</a>&lt;s,x&gt;::type</span> <span class="pre">&gt;::type</span></tt> is identical to <tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;r&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">+</span> <span class="pre">1</span></tt>.</td>
</tr>
</tbody>
</table>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<pre class="compound-middle literal-block">
typedef <a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type r;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">pos</span></tt> is an iterator in <tt class="literal"><span class="pre">s</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type</span> <span class="pre">r</span></tt>; <tt class="literal"><span class="pre">pos</span></tt> is ignored.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="id280">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="45%" />
<col width="55%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
<tr><td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Linear in the worst case, or amortized
constant time.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id281">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,0,1,3,4,5,6,7,8,9&gt; numbers;
typedef <a href="./find.html" class="identifier">find</a>&lt; numbers,<a href="./integral-c.html" class="identifier">integral_c</a>&lt;int,3&gt; &gt;::type pos;
typedef <a href="./insert.html" class="identifier">insert</a>&lt; numbers,pos,<a href="./integral-c.html" class="identifier">integral_c</a>&lt;int,2&gt; &gt;::type range;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;range&gt;::value, ==, 10 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; range,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; > ));
</pre>
<pre class="literal-block">
typedef <a href="./map.html" class="identifier">map</a>&lt; mpl::<a href="./pair.html" class="identifier">pair</a>&lt;int,unsigned&gt; &gt; m;
typedef <a href="./insert.html" class="identifier">insert</a>&lt;m,mpl::<a href="./pair.html" class="identifier">pair</a>&lt;char,long&gt; &gt;::type m1;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;m1&gt;::value, ==, 2 );
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;m1,int&gt;::type,unsigned &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;m1,char&gt;::type,long > ));
</pre>
</div>
<div class="section" id="id282">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./insert-range.html">insert_range</a>, <a class="reference internal" href="./push-front.html">push_front</a>, <a class="reference internal" href="./push-back.html">push_back</a>, <a class="reference internal" href="./erase.html">erase</a></p>
<!-- Sequences/Intrinsic Metafunctions//insert_range -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-key.html" class="navigation-link">Prev</a>&nbsp;<a href="./insert-range.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-key.html" class="navigation-link">Back</a>&nbsp;<a href="./insert-range.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>

Some files were not shown because too many files have changed in this diff Show More