9298 lines
538 KiB
HTML
9298 lines
538 KiB
HTML
<?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.12: http://docutils.sourceforge.net/" />
|
|
<title>The Boost Parameter Library Reference Documentation</title>
|
|
<meta name="authors" content="David Abrahams Daniel Wallin" />
|
|
<meta name="organization" content="BoostPro Computing" />
|
|
<meta name="date" content="2005-07-17" />
|
|
<meta name="copyright" content="Copyright David Abrahams, Daniel Wallin 2005-2009. 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)" />
|
|
<link rel="stylesheet" href="rst.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div class="document" id="the-boost-parameter-library-reference-documentation">
|
|
<h1 class="title">The Boost Parameter Library Reference Documentation</h1>
|
|
<table class="docinfo" frame="void" rules="none">
|
|
<col class="docinfo-name" />
|
|
<col class="docinfo-content" />
|
|
<tbody valign="top">
|
|
<tr><th class="docinfo-name">Authors:</th>
|
|
<td>David Abrahams
|
|
<br />Daniel Wallin</td></tr>
|
|
<tr><th class="docinfo-name">Contact:</th>
|
|
<td><a class="first reference external" href="mailto:dave@boost-consulting.com">dave@boost-consulting.com</a>, <a class="last reference external" href="mailto:daniel@boostpro.com">daniel@boostpro.com</a></td></tr>
|
|
<tr><th class="docinfo-name">Organization:</th>
|
|
<td><a class="first last reference external" href="http://www.boostpro.com">BoostPro Computing</a></td></tr>
|
|
<tr><th class="docinfo-name">Date:</th>
|
|
<td>2005-07-17</td></tr>
|
|
<tr><th class="docinfo-name">Copyright:</th>
|
|
<td>Copyright David Abrahams, Daniel Wallin
|
|
2005-2009. 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">http://www.boost.org/LICENSE_1_0.txt</a>)</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<p><a class="reference external" href="../../../../index.htm"><img alt="Boost" src="../../../../boost.png" /></a></p>
|
|
<hr class="docutils" />
|
|
<div class="contents topic" id="contents">
|
|
<p class="topic-title first">Contents</p>
|
|
<ul class="auto-toc simple">
|
|
<li><a class="reference internal" href="#preliminaries" id="id1074">1 Preliminaries</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#namespaces" id="id1075">1.1 Namespaces</a></li>
|
|
<li><a class="reference internal" href="#exceptions" id="id1076">1.2 Exceptions</a></li>
|
|
<li><a class="reference internal" href="#thread-safety" id="id1077">1.3 Thread Safety</a></li>
|
|
<li><a class="reference internal" href="#typography" id="id1078">1.4 Typography</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#terminology" id="id1079">2 Terminology</a></li>
|
|
<li><a class="reference internal" href="#concepts" id="id1080">3 Concepts</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#argumentpack" id="id1081">3.1 <span class="concept">ArgumentPack</span></a></li>
|
|
<li><a class="reference internal" href="#id3" id="id1082">3.2 <span class="concept">ParameterSpec</span></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#class-templates" id="id1083">4 Class Templates</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#id5" id="id1084">4.1 <tt class="docutils literal">keyword</tt></a></li>
|
|
<li><a class="reference internal" href="#id10" id="id1085">4.2 <tt class="docutils literal">template_keyword</tt></a></li>
|
|
<li><a class="reference internal" href="#parameters" id="id1086">4.3 <tt class="docutils literal">parameters</tt></a></li>
|
|
<li><a class="reference internal" href="#optional-required" id="id1087">4.4 <tt class="docutils literal">optional</tt>, <tt class="docutils literal">required</tt></a></li>
|
|
<li><a class="reference internal" href="#deduced" id="id1088">4.5 <tt class="docutils literal">deduced</tt></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#metafunctions" id="id1089">5 Metafunctions</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#binding" id="id1090">5.1 <tt class="docutils literal">binding</tt></a></li>
|
|
<li><a class="reference internal" href="#lazy-binding" id="id1091">5.2 <tt class="docutils literal">lazy_binding</tt></a></li>
|
|
<li><a class="reference internal" href="#value-type" id="id1092">5.3 <tt class="docutils literal">value_type</tt></a></li>
|
|
<li><a class="reference internal" href="#lazy-value-type" id="id1093">5.4 <tt class="docutils literal">lazy_value_type</tt></a></li>
|
|
<li><a class="reference internal" href="#are-tagged-arguments" id="id1094">5.5 <tt class="docutils literal">are_tagged_arguments</tt></a></li>
|
|
<li><a class="reference internal" href="#is-argument-pack" id="id1095">5.6 <tt class="docutils literal">is_argument_pack</tt></a></li>
|
|
<li><a class="reference internal" href="#result-of-compose" id="id1096">5.7 <tt class="docutils literal"><span class="pre">result_of::compose</span></tt></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#function-templates" id="id1097">6 Function Templates</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#compose" id="id1098">6.1 <tt class="docutils literal">compose</tt></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#code-generation-macros" id="id1099">7 Code Generation Macros</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#boost-parameter-function-result-name-tag-namespace-arguments" id="id1100">7.1 <tt class="docutils literal">BOOST_PARAMETER_FUNCTION(result, name, tag_namespace, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-member-function-result-name-tag-namespace-arguments" id="id1101">7.2 <tt class="docutils literal">BOOST_PARAMETER_MEMBER_FUNCTION(result, name, tag_namespace, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-const-member-function-result-name-tag-ns-arguments" id="id1102">7.3 <tt class="docutils literal">BOOST_PARAMETER_CONST_MEMBER_FUNCTION(result, name, tag_ns, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-function-call-operator-result-tag-namespace-arguments" id="id1103">7.4 <tt class="docutils literal">BOOST_PARAMETER_FUNCTION_CALL_OPERATOR(result, tag_namespace, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-const-function-call-operator-result-tag-ns-arguments" id="id1104">7.5 <tt class="docutils literal">BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-constructor-cls-impl-tag-namespace-arguments" id="id1105">7.6 <tt class="docutils literal">BOOST_PARAMETER_CONSTRUCTOR(cls, impl, tag_namespace, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-basic-function-result-name-tag-namespace-arguments" id="id1106">7.7 <tt class="docutils literal">BOOST_PARAMETER_BASIC_FUNCTION(result, name, tag_namespace, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-basic-member-function-result-name-tag-ns-arguments" id="id1107">7.8 <tt class="docutils literal">BOOST_PARAMETER_BASIC_MEMBER_FUNCTION(result, name, tag_ns, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-basic-const-member-function-result-name-tag-ns-args" id="id1108">7.9 <tt class="docutils literal">BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION(result, name, tag_ns, args)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-basic-function-call-operator-result-tag-ns-arguments" id="id1109">7.10 <tt class="docutils literal">BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR(result, tag_ns, arguments)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-basic-const-function-call-operator-result-tag-ns-args" id="id1110">7.11 <tt class="docutils literal">BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, args)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-function-result-name" id="id1111">7.12 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_FUNCTION(result, name)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-member-function-result-name" id="id1112">7.13 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION(result, name)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-const-member-function-result-name" id="id1113">7.14 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION(result, name)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-function-call-operator-result" id="id1114">7.15 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR(result)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-const-function-call-operator-result" id="id1115">7.16 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR(result)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-constructor-cls-impl" id="id1116">7.17 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR(cls, impl)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-no-spec-no-base-constructor-cls-impl" id="id1117">7.18 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR(cls, impl)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-name-name" id="id1118">7.19 <tt class="docutils literal">BOOST_PARAMETER_NAME(name)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-nested-keyword-tag-namespace-name-alias" id="id1119">7.20 <tt class="docutils literal">BOOST_PARAMETER_NESTED_KEYWORD(tag_namespace, name, alias)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-template-keyword-name" id="id1120">7.21 <tt class="docutils literal">BOOST_PARAMETER_TEMPLATE_KEYWORD(name)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-fun-r-n-l-h-p" id="id1121">7.22 <tt class="docutils literal">BOOST_PARAMETER_FUN(r, n, l, h, p)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-keyword-n-k" id="id1122">7.23 <tt class="docutils literal">BOOST_PARAMETER_KEYWORD(n, k)</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-match-p-a-x" id="id1123">7.24 <tt class="docutils literal">BOOST_PARAMETER_MATCH(p, a, x)</tt></a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#configuration-macros" id="id1124">8 Configuration Macros</a><ul class="auto-toc">
|
|
<li><a class="reference internal" href="#boost-parameter-has-perfect-forwarding" id="id1125">8.1 <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-disable-perfect-forwarding" id="id1126">8.2 <tt class="docutils literal">BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-can-use-mp11" id="id1127">8.3 <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-disable-mp11-usage" id="id1128">8.4 <tt class="docutils literal">BOOST_PARAMETER_DISABLE_MP11_USAGE</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-variadic-mpl-sequence" id="id1129">8.5 <tt class="docutils literal">BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-max-arity" id="id1130">8.6 <tt class="docutils literal">BOOST_PARAMETER_MAX_ARITY</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-compose-max-arity" id="id1131">8.7 <tt class="docutils literal">BOOST_PARAMETER_COMPOSE_MAX_ARITY</tt></a></li>
|
|
<li><a class="reference internal" href="#boost-parameter-exponential-overload-threshold-arity" id="id1132">8.8 <tt class="docutils literal">BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY</tt></a></li>
|
|
<li><a class="reference internal" href="#outside-of-this-library" id="id1133">8.9 ...Outside Of This Library</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="reference internal" href="#tutorial" id="id1134">9 Tutorial</a></li>
|
|
</ul>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="preliminaries">
|
|
<h1><a class="toc-backref" href="#id1074">1 Preliminaries</a></h1>
|
|
<p>This section covers some basic information you'll need to know in order to
|
|
understand this reference.</p>
|
|
<div class="section" id="namespaces">
|
|
<h2><a class="toc-backref" href="#id1075">1.1 Namespaces</a></h2>
|
|
<p>In this document, all unqualified identifiers should be assumed to be defined
|
|
in namespace <tt class="docutils literal"><span class="pre">boost::parameter</span></tt> unless otherwise specified.</p>
|
|
</div>
|
|
<div class="section" id="exceptions">
|
|
<h2><a class="toc-backref" href="#id1076">1.2 Exceptions</a></h2>
|
|
<p>No operation described in this document throws an exception unless otherwise
|
|
specified.</p>
|
|
</div>
|
|
<div class="section" id="thread-safety">
|
|
<h2><a class="toc-backref" href="#id1077">1.3 Thread Safety</a></h2>
|
|
<p>All components of this library can be used safely from multiple threads
|
|
without synchronization.<a class="footnote-reference" href="#thread" id="id2"><sup>1</sup></a></p>
|
|
</div>
|
|
<div class="section" id="typography">
|
|
<h2><a class="toc-backref" href="#id1078">1.4 Typography</a></h2>
|
|
<p>Names written in <span class="concept">sans serif type</span> represent <a class="reference internal" href="#concepts">concepts</a>.</p>
|
|
<p>In code blocks, <em>italic type</em> represents unspecified text that satisfies the
|
|
requirements given in the detailed description that follows the code block.</p>
|
|
<p>In a specification of the tokens generated by a macro, <strong>bold type</strong> is used
|
|
to highlight the position of the expanded macro argument in the result.</p>
|
|
<p>The special character β represents the value of <a class="reference internal" href="#boost-parameter-max-arity"><tt class="docutils literal">BOOST_PARAMETER_MAX_ARITY</tt></a>.</p>
|
|
</div>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="terminology">
|
|
<h1><a class="toc-backref" href="#id1079">2 Terminology</a></h1>
|
|
<dl class="docutils" id="kw">
|
|
<dt>keyword</dt>
|
|
<dd>The name of a function parameter.</dd>
|
|
</dl>
|
|
<span class="target" id="keyword-tag-type"></span><dl class="docutils">
|
|
<dt>keyword tag type</dt>
|
|
<dd>A type used to uniquely identify a function parameter. Typically its name
|
|
will be the same as that of the parameter.</dd>
|
|
</dl>
|
|
<span class="target" id="positional"></span><dl class="docutils">
|
|
<dt>positional argument</dt>
|
|
<dd>An argument passed with no explicit keyword. Its parameter is determined
|
|
in the usual C++ way: by position with respect to a parameter list.</dd>
|
|
</dl>
|
|
<span class="target" id="tag-type"></span><dl class="docutils">
|
|
<dt>tag type</dt>
|
|
<dd>Shorthand for “<a class="reference internal" href="#keyword-tag-type">keyword tag type</a>.”</dd>
|
|
</dl>
|
|
<span class="target" id="keyword-object"></span><dl class="docutils">
|
|
<dt>keyword object</dt>
|
|
<dd>An instance of <a class="reference internal" href="#keyword"><tt class="docutils literal">keyword</tt></a> <tt class="docutils literal"><T></tt> for some <a class="reference internal" href="#tag-type">tag type</a> <tt class="docutils literal">T</tt>.</dd>
|
|
</dl>
|
|
<span class="target" id="tagged-reference"></span><dl class="docutils">
|
|
<dt>tagged reference</dt>
|
|
<dd><p class="first">An object whose type is associated with a <a class="reference internal" href="#keyword-tag-type">keyword tag type</a> (the object's
|
|
<em>keyword</em>), and that holds a reference (to the object's <em>value</em>).</p>
|
|
<p class="last">As a shorthand, a “tagged reference to <tt class="docutils literal">x</tt>” means a tagged reference
|
|
whose <em>value</em> is <tt class="docutils literal">x</tt>.</p>
|
|
</dd>
|
|
</dl>
|
|
<span class="target" id="tagged-default"></span><dl class="docutils">
|
|
<dt>tagged default</dt>
|
|
<dd>A <a class="reference internal" href="#tagged-reference">tagged reference</a> whose <em>value</em> represents the value of a
|
|
default argument.</dd>
|
|
</dl>
|
|
<span class="target" id="tagged-lazy-default"></span><dl class="docutils">
|
|
<dt>tagged lazy default</dt>
|
|
<dd>A <a class="reference internal" href="#tagged-reference">tagged reference</a> whose <em>value</em>, when invoked with no arguments,
|
|
computes a default argument value.</dd>
|
|
</dl>
|
|
<span class="target" id="intended-argument-type"></span><dl class="docutils">
|
|
<dt>intended argument type</dt>
|
|
<dd>The <em>intended argument type</em> of a single-element <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> is the
|
|
type of its element's <em>value</em>. The intended argument type of any other
|
|
type <tt class="docutils literal">X</tt> is <tt class="docutils literal">X</tt> itself.</dd>
|
|
</dl>
|
|
<div class="note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">In this reference, we will use concept names (and other names) to describe
|
|
both types and objects, depending on context. So for example, “an
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>” can refer to a type that models <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>
|
|
<em>or</em> an object of such a type.</p>
|
|
</div>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="concepts">
|
|
<h1><a class="toc-backref" href="#id1080">3 Concepts</a></h1>
|
|
<p>This section describes the generic type concepts used by the Parameter
|
|
library.</p>
|
|
<div class="section" id="argumentpack">
|
|
<h2><a class="toc-backref" href="#id1081">3.1 <span class="concept">ArgumentPack</span></a></h2>
|
|
<p>An <span class="concept">ArgumentPack</span> is a collection of <a class="reference internal" href="#tagged-reference">tagged reference</a>s to the actual
|
|
arguments passed to a function. Every <span class="concept">ArgumentPack</span> is also a valid <a class="reference external" href="../../../mpl/doc/refmanual/forward-sequence.html">MPL
|
|
Forward Sequence</a> and <a class="reference external" href="../../../mpl/doc/refmanual/associative-sequence.html">MPL Associative Sequence</a> consisting of the <a class="reference internal" href="#keyword-tag-type">keyword tag type</a>s in its <a class="reference internal" href="#tagged-reference">tagged reference</a>s. If <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt>
|
|
is defined, then every <span class="concept">ArgumentPack</span> is also a valid <a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a> map whose
|
|
keys are <a class="reference internal" href="#keyword-tag-type">keyword tag type</a>s. The <a class="reference external" href="../../test/singular.cpp">singular.cpp</a>, <a class="reference external" href="../../test/compose.cpp">compose.cpp</a>, and
|
|
<a class="reference external" href="../../test/mpl.cpp">mpl.cpp</a> test programs demonstrate this functionality.</p>
|
|
<div class="section" id="requirements">
|
|
<h3>Requirements</h3>
|
|
<p>In the table below,</p>
|
|
<ul>
|
|
<li><p class="first"><tt class="docutils literal">A</tt> is a model of <span class="concept">ArgumentPack</span></p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal">x</tt> is an instance of <tt class="docutils literal">A</tt></p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal">u</tt> is a <a class="reference internal" href="#keyword-object">keyword object</a> of type <tt class="docutils literal">K</tt></p>
|
|
</li>
|
|
<li><p class="first"><tt class="docutils literal">v</tt> is a <a class="reference internal" href="#tagged-default">tagged default</a> with <a class="reference internal" href="#tag-type">tag type</a> <tt class="docutils literal">L</tt> and <em>value</em> of type <tt class="docutils literal">D</tt></p>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal">w</tt> is a <a class="reference internal" href="#tagged-lazy-default">tagged lazy default</a> with <a class="reference internal" href="#tag-type">tag type</a> <tt class="docutils literal">M</tt> and <em>value</em> of type</dt>
|
|
<dd><p class="first last"><tt class="docutils literal">E const</tt></p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal">z</tt> is an <span class="concept">ArgumentPack</span> containing a single element (as created by</dt>
|
|
<dd><p class="first last"><a class="reference internal" href="#keyword"><tt class="docutils literal">keyword</tt></a><tt class="docutils literal"><span class="pre"><…>::operator=</span></tt>)</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<p>Any exceptions thrown from the invocation of <tt class="docutils literal">w</tt>'s <em>value</em>
|
|
will be propagated to the caller.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 210)</p>
|
|
<p>Content block expected for the "table" directive; none found.</p>
|
|
<pre class="literal-block">
|
|
.. table:: |ArgumentPack| requirements
|
|
|
|
</pre>
|
|
</div>
|
|
<table border="1" class="docutils">
|
|
<colgroup>
|
|
<col width="16%" />
|
|
<col width="26%" />
|
|
<col width="22%" />
|
|
<col width="36%" />
|
|
</colgroup>
|
|
<thead valign="bottom">
|
|
<tr><th class="head">Expression</th>
|
|
<th class="head">Type</th>
|
|
<th class="head">Requirements</th>
|
|
<th class="head">Semantics/Notes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr><td><tt class="docutils literal">x[u]</tt></td>
|
|
<td><dl class="first docutils">
|
|
<dt><tt class="docutils literal">binding<</tt></dt>
|
|
<dd><tt class="docutils literal">A, K</tt></dd>
|
|
</dl>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 218)</p>
|
|
Definition list ends without a blank line; unexpected unindent.</div>
|
|
<p class="last"><tt class="docutils literal"><span class="pre">>::type</span></tt></p>
|
|
</td>
|
|
<td><tt class="docutils literal">x</tt> contains
|
|
an element <em>b</em>
|
|
whose <a class="reference internal" href="#kw">keyword</a> is
|
|
<tt class="docutils literal">K</tt></td>
|
|
<td>Returns <em>b</em>'s <em>value</em>
|
|
(by reference).</td>
|
|
</tr>
|
|
<tr><td><tt class="docutils literal">x[u]</tt></td>
|
|
<td><dl class="first docutils">
|
|
<dt><tt class="docutils literal">binding<</tt></dt>
|
|
<dd><tt class="docutils literal">A, L, D</tt></dd>
|
|
</dl>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 223)</p>
|
|
Definition list ends without a blank line; unexpected unindent.</div>
|
|
<p class="last"><tt class="docutils literal"><span class="pre">>::type</span></tt></p>
|
|
</td>
|
|
<td><em>none</em></td>
|
|
<td>If <tt class="docutils literal">x</tt> contains an
|
|
element <em>b</em> whose <a class="reference internal" href="#kw">keyword</a>
|
|
is the same as
|
|
<tt class="docutils literal">u</tt>'s, returns
|
|
<em>b</em>'s <em>value</em> (by
|
|
reference). Otherwise,
|
|
returns <tt class="docutils literal">u</tt>'s
|
|
<em>value</em>.</td>
|
|
</tr>
|
|
<tr><td><tt class="docutils literal">x[w]</tt></td>
|
|
<td><dl class="first docutils">
|
|
<dt><tt class="docutils literal">lazy_binding<</tt></dt>
|
|
<dd><tt class="docutils literal">A, M, E</tt></dd>
|
|
</dl>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 232)</p>
|
|
Definition list ends without a blank line; unexpected unindent.</div>
|
|
<p class="last"><tt class="docutils literal"><span class="pre">>::type</span></tt></p>
|
|
</td>
|
|
<td><em>none</em></td>
|
|
<td>If <tt class="docutils literal">x</tt> contains an
|
|
element <em>b</em> whose <a class="reference internal" href="#kw">keyword</a>
|
|
is the same as
|
|
<tt class="docutils literal">w</tt>'s, returns
|
|
<em>b</em>'s <em>value</em> (by
|
|
reference). Otherwise,
|
|
invokes <tt class="docutils literal">w</tt>'s
|
|
<em>value</em> and returns the
|
|
result.</td>
|
|
</tr>
|
|
<tr><td><tt class="docutils literal">x, z</tt></td>
|
|
<td>Model of
|
|
<span class="concept">ArgumentPack</span></td>
|
|
<td><em>none</em></td>
|
|
<td>Returns an
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>
|
|
containing all the
|
|
elements of both <tt class="docutils literal">x</tt>
|
|
and <tt class="docutils literal">z</tt>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="id3">
|
|
<span id="parameterspec"></span><h2><a class="toc-backref" href="#id1082">3.2 <span class="concept">ParameterSpec</span></a></h2>
|
|
<p>A <span class="concept">ParameterSpec</span> describes the type requirements for arguments corresponding
|
|
to a given <a class="reference internal" href="#kw">keyword</a> and indicates whether the argument is optional or
|
|
required. The table below details the allowed forms and describes their
|
|
condition for satisfaction by an actual argument type. In each row,</p>
|
|
<ul class="simple" id="conditions">
|
|
<li><tt class="docutils literal">K</tt> is the <span class="concept">ParameterSpec</span>'s <a class="reference internal" href="#keyword-tag-type">keyword tag type</a></li>
|
|
<li><tt class="docutils literal">A</tt> is an <a class="reference internal" href="#intended-argument-type">intended argument type</a> associated with <tt class="docutils literal">K</tt>, if any</li>
|
|
<li><tt class="docutils literal">P</tt> is a model of <span class="concept">ArgumentPack</span> that contains <tt class="docutils literal">A</tt></li>
|
|
<li><tt class="docutils literal">F</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a></li>
|
|
</ul>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 265)</p>
|
|
<p>Content block expected for the "table" directive; none found.</p>
|
|
<pre class="literal-block">
|
|
.. table:: |ParameterSpec| allowed forms and conditions of satisfaction
|
|
|
|
</pre>
|
|
</div>
|
|
<table border="1" class="docutils">
|
|
<colgroup>
|
|
<col width="32%" />
|
|
<col width="14%" />
|
|
<col width="54%" />
|
|
</colgroup>
|
|
<thead valign="bottom">
|
|
<tr><th class="head">Type</th>
|
|
<th class="head"><tt class="docutils literal">A</tt>
|
|
required</th>
|
|
<th class="head">Condition <tt class="docutils literal">A</tt> must satisfy</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody valign="top">
|
|
<tr><td><tt class="docutils literal">K</tt></td>
|
|
<td>no</td>
|
|
<td><em>n/a</em></td>
|
|
</tr>
|
|
<tr><td><a class="reference internal" href="#optional"><tt class="docutils literal">optional</tt></a><tt class="docutils literal"><K,F></tt></td>
|
|
<td>no</td>
|
|
<td><tt class="docutils literal"><span class="pre">mpl::apply2<F,A,P>::type::value</span></tt> is
|
|
<tt class="docutils literal">true</tt>.</td>
|
|
</tr>
|
|
<tr><td><a class="reference internal" href="#required"><tt class="docutils literal">required</tt></a><tt class="docutils literal"><K,F></tt></td>
|
|
<td>yes</td>
|
|
<td><tt class="docutils literal"><span class="pre">mpl::apply2<F,A,P>::type::value</span></tt> is
|
|
<tt class="docutils literal">true</tt>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The information in a <span class="concept">ParameterSpec</span> is used to <a class="reference external" href="index.html#controlling-overload-resolution">limit</a> the arguments that
|
|
will be matched by <a class="reference external" href="index.html#forwarding-functions">forwarding functions</a>.</p>
|
|
</div>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="class-templates">
|
|
<h1><a class="toc-backref" href="#id1083">4 Class Templates</a></h1>
|
|
<div class="section" id="id5">
|
|
<span id="keyword"></span><h2><a class="toc-backref" href="#id1084">4.1 <tt class="docutils literal">keyword</tt></a></h2>
|
|
<p>The type of every <a class="reference internal" href="#keyword-object">keyword object</a> is a specialization of <tt class="docutils literal">keyword</tt>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/keyword.hpp">boost/parameter/keyword.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename Tag>
|
|
struct keyword
|
|
{
|
|
typedef Tag tag;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1135"><span class="problematic" id="id1136">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_scalar`_<T>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1137"><span class="problematic" id="id1138">`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::in_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1139"><span class="problematic" id="id1140">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>
|
|
>::type
|
|
, <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>
|
|
>::type
|
|
<a class="reference internal" href="#operator">operator=</a>(T const& value) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1141"><span class="problematic" id="id1142">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::out_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1143"><span class="problematic" id="id1144">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>::type
|
|
, boost::mpl::<a href="#id1145"><span class="problematic" id="id1146">`if_`_<
|
|
boost::`is_const`_<T>
|
|
, boost::mpl::`false_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">true_</a>
|
|
>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>::type
|
|
, <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>
|
|
>::type
|
|
<a class="reference internal" href="#operator">operator=</a>(T& value) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1147"><span class="problematic" id="id1148">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_scalar`_<T>
|
|
, boost::mpl::`false_`_</span></a>
|
|
, boost::mpl::<a href="#id1149"><span class="problematic" id="id1150">`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::in_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1151"><span class="problematic" id="id1152">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>
|
|
>::type
|
|
, <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>
|
|
>::type
|
|
<a class="reference internal" href="#operator">operator=</a>(T const&& value) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1153"><span class="problematic" id="id1154">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_scalar`_<T>
|
|
, boost::mpl::`false_`_</span></a>
|
|
, boost::mpl::<a href="#id1155"><span class="problematic" id="id1156">`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::consume_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1157"><span class="problematic" id="id1158">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>
|
|
>::type
|
|
, <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>
|
|
>::type
|
|
<a class="reference internal" href="#operator">operator=</a>(T&& value) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1159"><span class="problematic" id="id1160">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_scalar`_<T>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1161"><span class="problematic" id="id1162">`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::in_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1163"><span class="problematic" id="id1164">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>
|
|
>::type
|
|
, <em>tagged default</em>
|
|
>::type
|
|
<a class="reference internal" href="#id7">operator|</a>(T const& x) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1165"><span class="problematic" id="id1166">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::out_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1167"><span class="problematic" id="id1168">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>::type
|
|
, boost::mpl::<a href="#id1169"><span class="problematic" id="id1170">`if_`_<
|
|
boost::`is_const`_<T>
|
|
, boost::mpl::`false_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">true_</a>
|
|
>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>::type
|
|
, <em>tagged default</em>
|
|
>::type
|
|
<a class="reference internal" href="#id7">operator|</a>(T& x) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1171"><span class="problematic" id="id1172">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_scalar`_<T>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1173"><span class="problematic" id="id1174">`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::in_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1175"><span class="problematic" id="id1176">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>
|
|
>::type
|
|
, <em>tagged default</em>
|
|
>::type
|
|
<a class="reference internal" href="#id7">operator|</a>(T const&& x) const;
|
|
|
|
template <typename T>
|
|
constexpr typename boost::<a href="#id1177"><span class="problematic" id="id1178">`enable_if`_<
|
|
typename boost::mpl::`eval_if_`_<
|
|
boost::`is_scalar`_<T>
|
|
, boost::mpl::`false_`_</span></a>
|
|
, boost::mpl::<a href="#id1179"><span class="problematic" id="id1180">`eval_if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::consume_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a href="#id1181"><span class="problematic" id="id1182">`if_`_<
|
|
boost::`is_same`_<
|
|
typename Tag::qualifier
|
|
, boost::parameter::forward_reference
|
|
>
|
|
, boost::mpl::`true_`_</span></a>
|
|
, boost::mpl::<a class="reference external" href="../../../mpl/doc/refmanual/bool.html">false_</a>
|
|
>
|
|
>
|
|
>::type
|
|
, <em>tagged default</em>
|
|
>::type constexpr
|
|
<a class="reference internal" href="#id7">operator|</a>(T&& value) const;
|
|
|
|
template <typename F>
|
|
constexpr <em>tagged lazy default</em> <a class="reference internal" href="#id8">operator||</a>(F const&) const;
|
|
|
|
template <typename F>
|
|
constexpr <em>tagged lazy default</em> <a class="reference internal" href="#id8">operator||</a>(F&) const;
|
|
|
|
static keyword<Tag> const& instance;
|
|
|
|
static keyword<Tag>& <a class="reference internal" href="#get">get</a>();
|
|
};
|
|
</pre>
|
|
<p id="operator"><tt class="docutils literal">operator=</tt>
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
template <typename T>
|
|
constexpr |ArgumentPack|_ operator=(T const& value) const;
|
|
|
|
template <typename T>
|
|
constexpr |ArgumentPack|_ operator=(T& value) const;
|
|
|
|
template <typename T>
|
|
constexpr |ArgumentPack|_ operator=(T const&& value) const;
|
|
|
|
template <typename T>
|
|
constexpr |ArgumentPack|_ operator=(T&& value) const;
|
|
</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">Requires:</th><td class="field-body">one of the following:</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>*. The nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">forward_reference</tt>.</p>
|
|
<p>*. To use the <tt class="docutils literal">const</tt> lvalue reference overload, <tt class="docutils literal">T</tt> must be scalar, or
|
|
the nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">in_reference</tt>.</p>
|
|
<p>*. To use the mutable lvalue reference overload, the nested <tt class="docutils literal">qualifier</tt>
|
|
type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">out_reference</tt> or <tt class="docutils literal">in_out_reference</tt>, and <tt class="docutils literal">T</tt>
|
|
must not be <tt class="docutils literal">const</tt>-qualified.</p>
|
|
<p>*. To use the <tt class="docutils literal">const</tt> rvalue reference overload for non-scalar <tt class="docutils literal">T</tt>, the
|
|
nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">in_reference</tt>.</p>
|
|
<p>*. To use the mutable rvalue reference overload for non-scalar <tt class="docutils literal">T</tt>, the
|
|
nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">consume_reference</tt> or
|
|
<tt class="docutils literal">move_from_reference</tt>.</p>
|
|
<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">Returns:</th><td class="field-body">an <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> containing a single <a class="reference internal" href="#tagged-reference">tagged reference</a> to</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 576)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">value</tt> with <a class="reference internal" href="#kw">keyword</a> <tt class="docutils literal">Tag</tt></p>
|
|
<p id="id7"><tt class="docutils literal">operator|</tt>
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
template <typename T>
|
|
constexpr *tagged default* operator|(T const& x) const;
|
|
|
|
template <typename T>
|
|
constexpr *tagged default* operator|(T& x) const;
|
|
|
|
template <typename T>
|
|
constexpr *tagged default* operator|(T const&& x) const;
|
|
|
|
template <typename T>
|
|
constexpr *tagged default* operator|(T&& x) const;
|
|
</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">Requires:</th><td class="field-body">one of the following:</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>*. The nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">forward_reference</tt>.</p>
|
|
<p>*. To use the <tt class="docutils literal">const</tt> lvalue reference overload, <tt class="docutils literal">T</tt> must be scalar, or
|
|
the nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">in_reference</tt>.</p>
|
|
<p>*. To use the mutable lvalue reference overload, the nested <tt class="docutils literal">qualifier</tt>
|
|
type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">out_reference</tt> or <tt class="docutils literal">in_out_reference</tt>, and <tt class="docutils literal">T</tt>
|
|
must not be <tt class="docutils literal">const</tt>-qualified.</p>
|
|
<p>*. To use the <tt class="docutils literal">const</tt> rvalue reference overload for non-scalar <tt class="docutils literal">T</tt>, the
|
|
nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">in_reference</tt>.</p>
|
|
<p>*. To use the mutable rvalue reference overload for non-scalar <tt class="docutils literal">T</tt>, the
|
|
nested <tt class="docutils literal">qualifier</tt> type of <tt class="docutils literal">Tag</tt> must be <tt class="docutils literal">consume_reference</tt> or
|
|
<tt class="docutils literal">move_from_reference</tt>.</p>
|
|
<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">Returns:</th><td class="field-body">a <a class="reference internal" href="#tagged-default">tagged default</a> with <em>value</em> <tt class="docutils literal">x</tt> and <a class="reference internal" href="#kw">keyword</a> <tt class="docutils literal">Tag</tt>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p id="id8"><tt class="docutils literal">operator||</tt>
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
template <typename F>
|
|
constexpr *tagged lazy default* operator||(F const& g) const;
|
|
|
|
template <typename F>
|
|
constexpr *tagged lazy default* operator||(F& g) const;
|
|
</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">Requires:</th><td class="field-body"><tt class="docutils literal">g()</tt> must be valid, with type <tt class="docutils literal">boost::</tt><a class="reference external" href="../../../utility/utility.htm#result_of"><tt class="docutils literal">result_of</tt></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 627)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal"><span class="pre"><F()>::type</span></tt>.<a class="footnote-reference" href="#no-result-of" id="id9"><sup>2</sup></a></p>
|
|
<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">Returns:</th><td class="field-body">a <a class="reference internal" href="#tagged-lazy-default">tagged lazy default</a> with <em>value</em> <tt class="docutils literal">g</tt> and <a class="reference internal" href="#kw">keyword</a> <tt class="docutils literal">Tag</tt>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p id="instance"><tt class="docutils literal">instance</tt>
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
static keyword<Tag> const& instance;
|
|
</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">Returns:</th><td class="field-body">a “singleton instance”: the same object will be returned on each</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 639)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>invocation of <tt class="docutils literal">instance</tt>.</p>
|
|
<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">Thread Safety:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 642)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">instance</tt> can be accessed from multiple threads simultaneously.</p>
|
|
<p id="get"><tt class="docutils literal">get</tt>
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
static keyword<Tag>& get\();
|
|
</pre>
|
|
<div class="admonition-deprecated admonition">
|
|
<p class="first admonition-title">Deprecated</p>
|
|
<p class="last">This function has been deprecated in favor of <tt class="docutils literal">instance</tt>.</p>
|
|
</div>
|
|
<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">Returns:</th><td class="field-body">a “singleton instance”: the same object will be returned on each</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 656)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>invocation of <tt class="docutils literal">get()</tt>.</p>
|
|
<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">Thread Safety:</th><td class="field-body"><tt class="docutils literal">get()</tt> can be called from multiple threads simultaneously.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="id10">
|
|
<span id="template-keyword"></span><h2><a class="toc-backref" href="#id1085">4.2 <tt class="docutils literal">template_keyword</tt></a></h2>
|
|
<p>This class template encapsulates a named template parameter. Every type
|
|
generated by the <a href="#id1000"><span class="problematic" id="id1001">|BOOST_PARAMETER_TEMPLATE_KEYWORD|</span></a> macro is a specialization
|
|
of <tt class="docutils literal">template_keyword</tt>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/template_keyword.hpp">boost/parameter/template_keyword.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename Tag, typename T>
|
|
struct template_keyword
|
|
{
|
|
typedef Tag key_type;
|
|
typedef T value_type;
|
|
typedef <em>implementation defined</em> reference;
|
|
};
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/ntp.cpp">test/ntp.cpp</a> test program demonstrates proper usage of this class template.</p>
|
|
</div>
|
|
<div class="section" id="parameters">
|
|
<h2><a class="toc-backref" href="#id1086">4.3 <tt class="docutils literal">parameters</tt></a></h2>
|
|
<p>Provides an interface for assembling the actual arguments to a <cite>forwarding
|
|
function</cite> into an <span class="concept">ArgumentPack</span>, in which any <a class="reference internal" href="#positional">positional</a> arguments will be
|
|
tagged according to the corresponding template argument to <tt class="docutils literal">parameters</tt>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/parameters.hpp">boost/parameter/parameters.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename ...PSpec>
|
|
struct parameters
|
|
{
|
|
template <typename ...Args>
|
|
struct <a class="reference internal" href="#match">match</a>
|
|
{
|
|
typedef … type;
|
|
};
|
|
|
|
template <typename ...Args>
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> <a class="reference internal" href="#id13">operator()</a>(Args&&... args) const;
|
|
};
|
|
</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">Requires:</th><td class="field-body">Each element in the <tt class="docutils literal">PSpec</tt> parameter pack must be a model of</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 718)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><a class="reference internal" href="#parameterspec"><span class="concept">ParameterSpec</span></a>.</p>
|
|
<div class="note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p>In this section, <tt class="docutils literal">R</tt> ## <em>i</em> and <tt class="docutils literal">K</tt> ## <em>i</em> are defined as
|
|
follows, for any argument type <tt class="docutils literal">A</tt> ## <em>i</em>:</p>
|
|
<div class="last line-block">
|
|
<div class="line">let <tt class="docutils literal">D0</tt> the set [d0, …, d ## <em>j</em>] of all <strong>deduced</strong></div>
|
|
<div class="line"><em>parameter specs</em> in the <tt class="docutils literal">PSpec</tt> parameter pack</div>
|
|
<div class="line"><tt class="docutils literal">R</tt> ## <em>i</em> is the <a class="reference internal" href="#intended-argument-type">intended argument type</a> of <tt class="docutils literal">A</tt> ## <em>i</em></div>
|
|
<div class="line"><br /></div>
|
|
<div class="line">if <tt class="docutils literal">A</tt> ## <em>i</em> is a result type of <tt class="docutils literal"><span class="pre">keyword<T>::</span></tt> <a class="reference internal" href="#operator"><tt class="docutils literal">operator=</tt></a></div>
|
|
<div class="line">then</div>
|
|
<div class="line-block">
|
|
<div class="line"><tt class="docutils literal">K</tt> ## <em>i</em> is <tt class="docutils literal">T</tt></div>
|
|
</div>
|
|
<div class="line">else</div>
|
|
<div class="line-block">
|
|
<div class="line">if some <tt class="docutils literal">A</tt> ## <em>j</em> where <em>j</em> ≤ <em>i</em> is a result type of</div>
|
|
<div class="line"><tt class="docutils literal"><span class="pre">keyword<T>::</span></tt> <a class="reference internal" href="#operator"><tt class="docutils literal">operator=</tt></a></div>
|
|
<div class="line"><em>or</em> some <tt class="docutils literal">P</tt> ## <em>j</em> in <em>j</em> ≤ <em>i</em> is <strong>deduced</strong></div>
|
|
<div class="line">then</div>
|
|
<div class="line-block">
|
|
<div class="line">if some <em>parameter spec</em> <tt class="docutils literal">d</tt> ## <em>j</em> in <tt class="docutils literal">D</tt> ## <em>i</em></div>
|
|
<div class="line">matches <tt class="docutils literal">A</tt> ## <em>i</em></div>
|
|
<div class="line">then</div>
|
|
<div class="line-block">
|
|
<div class="line"><tt class="docutils literal">K</tt> ## <em>i</em> is the <a class="reference internal" href="#keyword-tag-type">keyword tag type</a> of <tt class="docutils literal">d</tt> ## <em>j</em>.</div>
|
|
<div class="line"><tt class="docutils literal">D</tt><sub>i+1</sub> is <tt class="docutils literal">D</tt> ## <em>i</em> - [ <tt class="docutils literal">d</tt> ## <em>j</em>]</div>
|
|
</div>
|
|
</div>
|
|
<div class="line">else</div>
|
|
<div class="line-block">
|
|
<div class="line"><tt class="docutils literal">K</tt> ## <em>i</em> is the <a class="reference internal" href="#keyword-tag-type">keyword tag type</a> of <tt class="docutils literal">P</tt> ## <em>i</em>.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<dl class="docutils" id="match">
|
|
<dt><tt class="docutils literal">match</tt></dt>
|
|
<dd>A <a href="#id1183"><span class="problematic" id="id1184">|Metafunction|_</span></a> used to remove a <a class="reference external" href="index.html#forwarding-functions">forwarding function</a> from overload
|
|
resolution.</dd>
|
|
</dl>
|
|
<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">Returns:</th><td class="field-body">if all elements in <tt class="docutils literal"><span class="pre">Params...</span></tt> are <em>satisfied</em> (see below), then</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 752)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal"><span class="pre">parameters<Params...></span></tt>. Otherwise, <tt class="docutils literal"><span class="pre">match<Args...>::type</span></tt> is not
|
|
defined.</p>
|
|
<p>Each element <tt class="docutils literal">P</tt> in <tt class="docutils literal"><span class="pre">Params...</span></tt> is <strong>satisfied</strong> if either:</p>
|
|
<ul>
|
|
<li><p class="first"><tt class="docutils literal">P</tt> is the <em>unspecified</em> default</p>
|
|
</li>
|
|
<li><p class="first"><strong>or</strong>, <tt class="docutils literal">P</tt> is a <em>keyword tag type</em></p>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><strong>or</strong>, <tt class="docutils literal">P</tt> is <a class="reference internal" href="#optional"><tt class="docutils literal">optional</tt></a> <tt class="docutils literal"><X,F></tt> and either</dt>
|
|
<dd><ul class="first last">
|
|
<li><p class="first"><tt class="docutils literal">X</tt> is not <tt class="docutils literal">K</tt> ## <em>i</em> for any <em>i</em>,</p>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><strong>or</strong> <tt class="docutils literal">X</tt> is some <tt class="docutils literal">K</tt> ## <em>i</em> and <tt class="docutils literal"><span class="pre">mpl::apply<F,R</span></tt> ## <em>i</em></dt>
|
|
<dd><p class="first last"><tt class="docutils literal"><span class="pre">>::type::value</span></tt> is <tt class="docutils literal">true</tt></p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><strong>or</strong>, <tt class="docutils literal">P</tt> is <a class="reference internal" href="#required"><tt class="docutils literal">required</tt></a> <tt class="docutils literal"><X,F></tt>, and</dt>
|
|
<dd><ul class="first last simple">
|
|
<li><tt class="docutils literal">X</tt> is some <tt class="docutils literal">K</tt> ## <em>i</em>, <strong>and</strong></li>
|
|
<li><tt class="docutils literal"><span class="pre">mpl::apply<F,R</span></tt> ## <em>i</em> <tt class="docutils literal"><span class="pre">>::type::value</span></tt> is <tt class="docutils literal">true</tt></li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<p id="id13"><tt class="docutils literal">operator()</tt></p>
|
|
<pre class="literal-block">
|
|
template <typename ...Args>
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> operator()(Args&&... args) const;
|
|
</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">Returns:</th><td class="field-body"><p class="first">An <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> containing, for each <tt class="docutils literal">a</tt> ## <em>i</em>,</p>
|
|
<ul class="last">
|
|
<li><p class="first">if <tt class="docutils literal">a</tt> ## <em>i</em> is a single-element <span class="concept">ArgumentPack</span>, its element</p>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt>Otherwise, a <a class="reference internal" href="#tagged-reference">tagged reference</a> with <a class="reference internal" href="#kw">keyword</a> <tt class="docutils literal">K</tt> ## <em>i</em> and <em>value</em></dt>
|
|
<dd><p class="first last"><tt class="docutils literal">a</tt> ## <em>i</em></p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="optional-required">
|
|
<span id="required"></span><span id="optional"></span><h2><a class="toc-backref" href="#id1087">4.4 <tt class="docutils literal">optional</tt>, <tt class="docutils literal">required</tt></a></h2>
|
|
<p>These templates describe the requirements on a function parameter.</p>
|
|
<p><tt class="docutils literal">optional</tt> is defined in: <a class="reference external" href="../../../../boost/parameter/optional.hpp">boost/parameter/optional.hpp</a></p>
|
|
<p><tt class="docutils literal">required</tt> is defined in: <a class="reference external" href="../../../../boost/parameter/required.hpp">boost/parameter/required.hpp</a></p>
|
|
<p>Both headers are included by: <a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></p>
|
|
<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" colspan="2">Specializations model:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"><a class="reference internal" href="#parameterspec"><span class="concept">ParameterSpec</span></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename Tag, typename Predicate = <em>unspecified</em>>
|
|
struct optional;
|
|
|
|
template <typename Tag, typename Predicate = <em>unspecified</em>>
|
|
struct required;
|
|
</pre>
|
|
<p>The default value of <tt class="docutils literal">Predicate</tt> is an unspecified <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction
|
|
Class</a> that returns <tt class="docutils literal"><span class="pre">mpl::true_</span></tt> for any argument. If
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> is defined, then the default value of
|
|
<tt class="docutils literal">Predicate</tt> is also a <cite>Boost.MP11</cite>-style quoted metafunction that returns
|
|
<tt class="docutils literal"><span class="pre">mp11::mp_true</span></tt> for any argument.</p>
|
|
</div>
|
|
<div class="section" id="deduced">
|
|
<h2><a class="toc-backref" href="#id1088">4.5 <tt class="docutils literal">deduced</tt></a></h2>
|
|
<p>This template is used to wrap the <em>keyword tag</em> argument to
|
|
<tt class="docutils literal">optional</tt> or <tt class="docutils literal">required</tt>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/deduced.hpp">boost/parameter/deduced.hpp</a></td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Included by:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 836)</p>
|
|
Duplicate substitution definition name: "preprocessor_header".</div>
|
|
<pre class="literal-block">
|
|
template <typename Tag>
|
|
struct deduced;
|
|
</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">Requires:</th><td class="field-body">nothing</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="metafunctions">
|
|
<h1><a class="toc-backref" href="#id1089">5 Metafunctions</a></h1>
|
|
<p>A <a href="#id1185"><span class="problematic" id="id1186">|Metafunction|_</span></a> is conceptually a function that operates on, and returns,
|
|
C++ types.</p>
|
|
<div class="section" id="binding">
|
|
<h2><a class="toc-backref" href="#id1090">5.1 <tt class="docutils literal">binding</tt></a></h2>
|
|
<p>Returns the result type of indexing an argument pack with a
|
|
<a class="reference internal" href="#keyword-tag-type">keyword tag type</a> or with a <a class="reference internal" href="#tagged-default">tagged default</a>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/binding.hpp">boost/parameter/binding.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename A, typename K, typename D = void_>
|
|
struct binding
|
|
{
|
|
typedef … type;
|
|
};
|
|
</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">Requires:</th><td class="field-body"><tt class="docutils literal">A</tt> must be a model of <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>.</td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the reference type of the <a class="reference internal" href="#tagged-reference">tagged reference</a> in <tt class="docutils literal">A</tt> having</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 875)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><a class="reference internal" href="#keyword-tag-type">keyword tag type</a> <tt class="docutils literal">K</tt>, if any. If no such <a class="reference internal" href="#tagged-reference">tagged reference</a> exists,
|
|
returns <tt class="docutils literal">D</tt>.</p>
|
|
</div>
|
|
<div class="section" id="lazy-binding">
|
|
<h2><a class="toc-backref" href="#id1091">5.2 <tt class="docutils literal">lazy_binding</tt></a></h2>
|
|
<p>Returns the result type of indexing an argument pack with a
|
|
<a class="reference internal" href="#tagged-lazy-default">tagged lazy default</a>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/binding.hpp">boost/parameter/binding.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename A, typename K, typename F>
|
|
struct lazy_binding
|
|
{
|
|
typedef … type;
|
|
};
|
|
</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">Requires:</th><td class="field-body"><tt class="docutils literal">A</tt> must be a model of <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>.</td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the reference type of the <a class="reference internal" href="#tagged-reference">tagged reference</a> in <tt class="docutils literal">A</tt> having</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 899)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><a class="reference internal" href="#keyword-tag-type">keyword tag type</a> <tt class="docutils literal">K</tt>, if any. If no such <a class="reference internal" href="#tagged-reference">tagged reference</a> exists,
|
|
returns <tt class="docutils literal">boost::</tt><a class="reference external" href="../../../utility/utility.htm#result_of"><tt class="docutils literal">result_of</tt></a><tt class="docutils literal"><span class="pre"><F()>::type</span></tt>.<a class="footnote-reference" href="#no-result-of" id="id19"><sup>2</sup></a></p>
|
|
</div>
|
|
<div class="section" id="value-type">
|
|
<h2><a class="toc-backref" href="#id1092">5.3 <tt class="docutils literal">value_type</tt></a></h2>
|
|
<p>Returns the result type of indexing an argument pack with a
|
|
<a class="reference internal" href="#keyword-tag-type">keyword tag type</a> or with a <a class="reference internal" href="#tagged-default">tagged default</a>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/value_type.hpp">boost/parameter/value_type.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename A, typename K, typename D = void_>
|
|
struct value_type
|
|
{
|
|
typedef … type;
|
|
};
|
|
</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">Requires:</th><td class="field-body"><tt class="docutils literal">A</tt> must be a model of <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>.</td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the (possibly const-qualified) type of the <a class="reference internal" href="#tagged-reference">tagged reference</a> in</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 923)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">A</tt> having <a class="reference internal" href="#keyword-tag-type">keyword tag type</a> <tt class="docutils literal">K</tt>, if any. If no such <a class="reference internal" href="#tagged-reference">tagged reference</a>
|
|
exists, returns <tt class="docutils literal">D</tt>. Equivalent to:</p>
|
|
<pre class="literal-block">
|
|
typename boost::`remove_reference`_<
|
|
typename |binding|_<A, K, D>::type
|
|
>::type
|
|
</pre>
|
|
<p>… when <tt class="docutils literal">D</tt> is not a reference type.</p>
|
|
</div>
|
|
<div class="section" id="lazy-value-type">
|
|
<h2><a class="toc-backref" href="#id1093">5.4 <tt class="docutils literal">lazy_value_type</tt></a></h2>
|
|
<p>Returns the result type of indexing an argument pack with a
|
|
<a class="reference internal" href="#tagged-lazy-default">tagged lazy default</a>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/value_type.hpp">boost/parameter/value_type.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename A, typename K, typename F>
|
|
struct lazy_value_type
|
|
{
|
|
typedef … type;
|
|
};
|
|
</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">Requires:</th><td class="field-body"><tt class="docutils literal">A</tt> must be a model of <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>.</td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the (possibly const-qualified) type of the <a class="reference internal" href="#tagged-reference">tagged reference</a> in</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 955)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">A</tt> having <a class="reference internal" href="#keyword-tag-type">keyword tag type</a> <tt class="docutils literal">K</tt>, if any. If no such <a class="reference internal" href="#tagged-reference">tagged reference</a>
|
|
exists, returns <tt class="docutils literal">boost::</tt><a class="reference external" href="../../../utility/utility.htm#result_of"><tt class="docutils literal">result_of</tt></a><tt class="docutils literal"><span class="pre"><F()>::type</span></tt>.<a class="footnote-reference" href="#no-result-of" id="id22"><sup>2</sup></a></p>
|
|
</div>
|
|
<div class="section" id="are-tagged-arguments">
|
|
<h2><a class="toc-backref" href="#id1094">5.5 <tt class="docutils literal">are_tagged_arguments</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/are_tagged_arguments.hpp">boost/parameter/are_tagged_arguments.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename T0, typename ...Pack>
|
|
struct are_tagged_arguments // : mpl::<a href="#id1187"><span class="problematic" id="id1188">true_</span></a> or mpl::<a href="#id1189"><span class="problematic" id="id1190">false_</span></a>
|
|
{
|
|
};
|
|
</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">Returns:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 973)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal"><span class="pre">mpl::true_</span></tt> if <tt class="docutils literal">T0</tt> and all elements in parameter pack <tt class="docutils literal">Pack</tt> are
|
|
<a class="reference internal" href="#tagged-reference">tagged reference</a> types, <tt class="docutils literal"><span class="pre">mpl::false_</span></tt> otherwise.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 977)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>When implementing a Boost.Parameter-enabled constructor for a container that
|
|
conforms to the C++ standard, one needs to remember that the standard requires
|
|
the presence of other constructors that are typically defined as templates,
|
|
such as range constructors. To avoid overload ambiguities between the two
|
|
constructors, use this metafunction in conjunction with <tt class="docutils literal">disable_if</tt> to
|
|
define the range constructor.</p>
|
|
<pre class="literal-block">
|
|
template <typename B>
|
|
class frontend : public B
|
|
{
|
|
struct _enabler
|
|
{
|
|
};
|
|
|
|
public:
|
|
<a href="#id24"><span class="problematic" id="id25">|</span></a>BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|_(frontend, (B))
|
|
|
|
template <typename Iterator>
|
|
frontend(
|
|
Iterator itr
|
|
, Iterator itr_end
|
|
, typename boost::<a href="#id26"><span class="problematic" id="id27">`</span></a>disable_if`_<
|
|
are_tagged_arguments<Iterator>
|
|
, _enabler
|
|
>::type = _enabler()
|
|
) : B(itr, itr_end)
|
|
{
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id24">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 984); <em><a href="#id25">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id26">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 984); <em><a href="#id27">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="is-argument-pack">
|
|
<h2><a class="toc-backref" href="#id1095">5.6 <tt class="docutils literal">is_argument_pack</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/is_argument_pack.hpp">boost/parameter/is_argument_pack.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename T>
|
|
struct is_argument_pack // : mpl::<a href="#id1191"><span class="problematic" id="id1192">true_</span></a> or mpl::<a href="#id1193"><span class="problematic" id="id1194">false_</span></a>
|
|
{
|
|
};
|
|
</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">Returns:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1026)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal"><span class="pre">mpl::true_</span></tt> if <tt class="docutils literal">T</tt> is a model of <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, <tt class="docutils literal"><span class="pre">mpl::false_</span></tt>
|
|
otherwise.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1030)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>To avoid overload ambiguities between a constructor that takes in an
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> and a templated conversion constructor, use this metafunction
|
|
in conjunction with <tt class="docutils literal">enable_if</tt>.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id29"><span class="problematic" id="id30">|</span></a>BOOST_PARAMETER_NAME|_(a0)
|
|
|
|
template <typename T>
|
|
class backend0
|
|
{
|
|
struct _enabler
|
|
{
|
|
};
|
|
|
|
T a0;
|
|
|
|
public:
|
|
template <typename ArgPack>
|
|
explicit backend0(
|
|
ArgPack const& args
|
|
, typename boost::<a href="#id31"><span class="problematic" id="id32">`</span></a>enable_if`_<
|
|
is_argument_pack<ArgPack>
|
|
, _enabler
|
|
>::type = _enabler()
|
|
) : a0(args[_a0])
|
|
{
|
|
}
|
|
|
|
template <typename U>
|
|
backend0(
|
|
backend0<U> const& copy
|
|
, typename boost::<a href="#id33"><span class="problematic" id="id34">`</span></a>enable_if`_<
|
|
boost::<a href="#id35"><span class="problematic" id="id36">`</span></a>is_convertible`_<U,T>
|
|
, _enabler
|
|
>::type = _enabler()
|
|
) : a0(copy.get_a0())
|
|
{
|
|
}
|
|
|
|
T const& get_a0() const
|
|
{
|
|
return this->a0;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id29">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1034); <em><a href="#id30">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id31">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1034); <em><a href="#id32">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id33">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1034); <em><a href="#id34">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id35">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1034); <em><a href="#id36">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="result-of-compose">
|
|
<h2><a class="toc-backref" href="#id1096">5.7 <tt class="docutils literal"><span class="pre">result_of::compose</span></tt></a></h2>
|
|
<p>Returns the result type of the <a class="reference internal" href="#compose"><a href="#id1006"><span class="problematic" id="id1007">|compose|_</span></a></a> function.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/compose.hpp">boost/parameter/compose.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename ...TaggedArgs>
|
|
struct compose
|
|
: boost::<a href="#id38"><span class="problematic" id="id39">`</span></a>enable_if`_<
|
|
<a href="#id1195"><span class="problematic" id="id1196">|are_tagged_arguments|_<T0,Pack...>
|
|
, |ArgumentPack|_</span></a>
|
|
>
|
|
{
|
|
};
|
|
|
|
template <>
|
|
struct compose<>
|
|
{
|
|
typedef <em>empty</em> <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type;
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id38">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1087); <em><a href="#id39">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<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">Requires:</th><td class="field-body">All elements in <tt class="docutils literal">TaggedArgs</tt> must be <a class="reference internal" href="#tagged-reference">tagged reference</a> types, if</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1105)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>specified.</p>
|
|
<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">Returns:</th><td class="field-body">the result type of the <a class="reference internal" href="#compose"><a href="#id1010"><span class="problematic" id="id1011">|compose|_</span></a></a> function.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="function-templates">
|
|
<h1><a class="toc-backref" href="#id1097">6 Function Templates</a></h1>
|
|
<div class="section" id="compose">
|
|
<h2><a class="toc-backref" href="#id1098">6.1 <tt class="docutils literal">compose</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/compose.hpp">boost/parameter/compose.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
template <typename ...Pack>
|
|
constexpr typename <a href="#id41"><span class="problematic" id="id42">|</span></a>result_of::compose|_<Pack...>::type
|
|
compose(Pack const&... args);
|
|
</pre>
|
|
<div class="system-message" id="id41">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1121); <em><a href="#id42">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>This function facilitates easier variadic argument composition. It is used by
|
|
the <a href="#id1012"><span class="problematic" id="id1013">|BOOST_PARAMETER_NO_SPEC_FUNCTION|</span></a>,
|
|
<a href="#id1014"><span class="problematic" id="id1015">|BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION|</span></a>,
|
|
<a href="#id1016"><span class="problematic" id="id1017">|BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION|</span></a>,
|
|
<a href="#id1018"><span class="problematic" id="id1019">|BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR|</span></a>,
|
|
<a href="#id1020"><span class="problematic" id="id1021">|BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR|</span></a>,
|
|
<a href="#id1022"><span class="problematic" id="id1023">|BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|</span></a>, and
|
|
<a href="#id1024"><span class="problematic" id="id1025">|BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR|</span></a> code generation macros. You can
|
|
use it to write your own code generation macros if the ones provided by this
|
|
library do not suffice.</p>
|
|
<p>Unlike the <a class="reference internal" href="#tagged-reference">tagged reference</a> comma operator, the <tt class="docutils literal">compose()</tt> function is
|
|
variadic, as mentioned before. However, the <a class="reference internal" href="#tagged-reference">tagged reference</a> comma operator
|
|
can be invoked indefinitely and therefore does not limit the size of the
|
|
resulting <span class="concept">ArgumentPack</span>, while the <tt class="docutils literal">compose()</tt> function cannot take in more
|
|
than <a href="#id1026"><span class="problematic" id="id1027">|BOOST_PARAMETER_COMPOSE_MAX_ARITY|</span></a> arguments for compilers that do not
|
|
support perfect forwarding.</p>
|
|
<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">Requires:</th><td class="field-body">All elements in <tt class="docutils literal">args</tt> must be <a class="reference internal" href="#tagged-reference">tagged reference</a> objects, if</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1146)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>specified.</p>
|
|
<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">Returns:</th><td class="field-body">an <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> containing all elements in <tt class="docutils literal">args</tt>, if</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1149)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>specified; an empty <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> otherwise.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1152)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
BOOST_PARAMETER_NAME(index)
|
|
BOOST_PARAMETER_NAME(name)
|
|
|
|
template <typename ArgumentPack>
|
|
int print_name_and_index(ArgumentPack const& args)
|
|
{
|
|
std::cout << "index = " << args[_index];
|
|
std::cout << "name = " << args[_name];
|
|
std::cout << "; " << std::endl;
|
|
return 0;
|
|
}
|
|
|
|
int y = print_name_and_index(compose(_index = 3, _name = "jones"));
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/compose.cpp">compose.cpp</a> test program shows more examples using this function.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1170)</p>
|
|
Duplicate substitution definition name: "compose_cpp".</div>
|
|
</div>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="code-generation-macros">
|
|
<h1><a class="toc-backref" href="#id1099">7 Code Generation Macros</a></h1>
|
|
<p>Macros in this section can be used to ease the writing of code
|
|
using the Parameter library by eliminating repetitive boilerplate.</p>
|
|
<div class="section" id="boost-parameter-function-result-name-tag-namespace-arguments">
|
|
<h2><a class="toc-backref" href="#id1100">7.1 <tt class="docutils literal">BOOST_PARAMETER_FUNCTION(result, name, tag_namespace, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1192)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id45"><span class="problematic" id="id46">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id47"><span class="problematic" id="id48">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id49"><span class="problematic" id="id50">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id51"><span class="problematic" id="id52">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id53"><span class="problematic" id="id54">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id55"><span class="problematic" id="id56">`</span></a>bitset`_<N + 1> lset = std::<a href="#id57"><span class="problematic" id="id58">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id59"><span class="problematic" id="id60">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id61"><span class="problematic" id="id62">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id63"><span class="problematic" id="id64">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id45">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id46">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id47">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id48">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id49">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id50">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id51">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id52">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id53">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id54">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id55">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id56">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id57">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id58">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id59">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id60">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id61">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id62">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id63">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1195); <em><a href="#id64">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id65"><span class="problematic" id="id66">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id67"><span class="problematic" id="id68">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id69"><span class="problematic" id="id70">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id71"><span class="problematic" id="id72">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id65">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1228); <em><a href="#id66">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id67">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1228); <em><a href="#id68">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id69">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1228); <em><a href="#id70">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id71">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1228); <em><a href="#id72">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id73"><span class="problematic" id="id74">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id75"><span class="problematic" id="id76">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id77"><span class="problematic" id="id78">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id79"><span class="problematic" id="id80">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id73">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1272); <em><a href="#id74">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id75">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1272); <em><a href="#id76">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id77">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1272); <em><a href="#id78">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id79">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1272); <em><a href="#id80">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal function header. Enclose the
|
|
return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter, also enclose the
|
|
expected value type in parentheses. Since the value types are mutually
|
|
exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. Also, just as with a normal
|
|
function, optional parameters have default values, whereas required parameters
|
|
do not. Within the function body, either simply use the parameter name or
|
|
pass the matching identifier with the leading underscore to the bracket
|
|
operator of <tt class="docutils literal">args</tt> to extract the corresponding argument. Note that the
|
|
second method doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
BOOST_PARAMETER_FUNCTION((bool), evaluate, kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id81"><span class="problematic" id="id82">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id83"><span class="problematic" id="id84">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id85"><span class="problematic" id="id86">`</span></a>bitset`_<3>), rvalue_const_bitset<2>())
|
|
(rr, (std::<a href="#id87"><span class="problematic" id="id88">`</span></a>bitset`_<4>), rvalue_bitset<3>())
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(lrc)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(lr)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(std::<a href="#id89"><span class="problematic" id="id90">`</span></a>forward`_<rrc0_type>(rrc0))
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(args[_rr0])
|
|
);
|
|
|
|
return true;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id81">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1291); <em><a href="#id82">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id83">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1291); <em><a href="#id84">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id85">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1291); <em><a href="#id86">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id87">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1291); <em><a href="#id88">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id89">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1291); <em><a href="#id90">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
evaluate(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
evaluate( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
evaluate( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
evaluate( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
evaluate( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a>, <a class="reference external" href="../../test/preprocessor_deduced.cpp">preprocessor_deduced.cpp</a>, and <a class="reference external" href="../../test/preprocessor_eval_category.cpp">preprocessor_eval_category.cpp</a>
|
|
test programs demonstrate proper usage of this macro.</p>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1385)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated forwarding functions.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1394)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>optional-specifier</em> {<em>optional-specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>required-specifier</em> {<em>required-specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
optional-specifier ::=
|
|
'<strong>(</strong>'
|
|
<em>argument-name</em> '<strong>,</strong>' <em>restriction</em> '<strong>,</strong>' <em>default-value</em>
|
|
')'
|
|
|
|
required-specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal"><span class="pre">default-value</span></tt> is any valid C++ expression; if necessary, user code can
|
|
compute it in terms of <tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>, where <tt class="docutils literal"><span class="pre">previous-name</span></tt> is
|
|
the <tt class="docutils literal"><span class="pre">argument-name</span></tt> in a previous <tt class="docutils literal"><span class="pre">specifier-group0</span></tt> or
|
|
<tt class="docutils literal"><span class="pre">specifier-group1</span></tt>. <em>This expression will be invoked exactly once.</em>
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>. If
|
|
<tt class="docutils literal">restriction</tt> uses this form, then the type of the generated name
|
|
<tt class="docutils literal"><span class="pre">argument-name</span> ## _type</tt> will be computed in terms of the <strong>target type</strong>,
|
|
and the generated reference <tt class="docutils literal"><span class="pre">argument-name</span></tt> (but not its corresponding entry
|
|
in <tt class="docutils literal">args</tt>) will be cast to that type.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_ ## __LINE__ ## <strong>name</strong> = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_ ## __LINE__ ## <strong>name</strong>
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
: <a href="#id92"><span class="problematic" id="id93">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>;
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_ ## __LINE__ ## <strong>name</strong><Args>::type
|
|
boost_param_impl ## __LINE__ ## <strong>name</strong>(Args const&);
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return boost_param_impl ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return boost_param_impl ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **m**>(a ## **m**)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename *argument name* ## **0** ## _type
|
|
, …
|
|
, typename *argument name* ## **n** ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost_ ## __LINE__ ## **name**(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, *argument name* ## **0** ## _type&& *argument name* ## **0**
|
|
, …
|
|
, *argument name* ## **n** ## _type&& *argument name* ## **m**
|
|
);
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename <em>argument name</em> ## <strong>0</strong> ## _type
|
|
, …
|
|
, typename <em>argument name</em> ## <strong>m</strong> ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost_ ## __LINE__ ## <strong>name</strong>(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, <em>argument name</em> ## <strong>0</strong> ## _type&& <em>argument name</em> ## <strong>0</strong>
|
|
, …
|
|
, <em>argument name</em> ## <strong>m</strong> ## _type&& <em>argument name</em> ## <strong>m</strong>
|
|
);
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_ ## __LINE__ ## <strong>name</strong><Args>::type
|
|
boost_param_impl ## __LINE__ ## <strong>name</strong>(Args const& args)
|
|
{
|
|
return boost_param_dispatch_0boost_ ## __LINE__ ## <strong>name</strong>(
|
|
static_cast<
|
|
typename boost_param_result_ ## __LINE__ ## <strong>name</strong><
|
|
Args
|
|
>::type(*)()
|
|
>(<a class="reference external" href="http://en.cppreference.com/w/cpp/language/nullptr">nullptr</a>)
|
|
, args
|
|
, std::<a href="#id1197"><span class="problematic" id="id1198">`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **0**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **0**])
|
|
, …
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **n**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **n**])
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename *argument name* ## **0** ## _type
|
|
, …
|
|
, typename *argument name* ## **n** ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
, *argument name* ## **0** ## _type&& *argument name* ## **0**
|
|
, …
|
|
, *argument name* ## **n** ## _type&& *argument name* ## **n**
|
|
)
|
|
{
|
|
return boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
|
|
static_cast<ResultType(\*)()>(`nullptr`_</span></a>)
|
|
, (args, <em>keyword object of optional parameter</em> ## <strong>n + 1</strong> =
|
|
<em>default value of optional parameter</em> ## <strong>n + 1</strong>
|
|
)
|
|
, std::<cite>forward`_<*argument name* ## **0** ## _type>(
|
|
*argument name* ## **0**
|
|
)
|
|
, …
|
|
, std::`forward`_<*argument name* ## **n** ## _type>(
|
|
*argument name* ## **n**
|
|
)
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of optional parameter* ## **n + 1**
|
|
>::type
|
|
>(*default value of optional parameter* ## **n + 1**)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename <em>argument name</em> ## <strong>0</strong> ## _type
|
|
, …
|
|
, typename <em>argument name</em> ## <strong>m</strong> ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost_ ## __LINE__ ## <strong>name</strong>(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, <em>argument name</em> ## <strong>0</strong> ## _type&& <em>argument name</em> ## <strong>0</strong>
|
|
, …
|
|
, <em>argument name</em> ## <strong>m</strong> ## _type&& <em>argument name</em> ## <strong>m</strong>
|
|
)
|
|
</pre>
|
|
<div class="system-message" id="id92">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1459); <em><a href="#id93">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-member-function-result-name-tag-namespace-arguments">
|
|
<h2><a class="toc-backref" href="#id1101">7.2 <tt class="docutils literal">BOOST_PARAMETER_MEMBER_FUNCTION(result, name, tag_namespace, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a member function that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1663)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id97"><span class="problematic" id="id98">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id99"><span class="problematic" id="id100">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id101"><span class="problematic" id="id102">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id103"><span class="problematic" id="id104">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id105"><span class="problematic" id="id106">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id107"><span class="problematic" id="id108">`</span></a>bitset`_<N + 1> lset = std::<a href="#id109"><span class="problematic" id="id110">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id111"><span class="problematic" id="id112">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id113"><span class="problematic" id="id114">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id115"><span class="problematic" id="id116">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id97">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id98">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id99">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id100">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id101">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id102">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id103">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id104">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id105">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id106">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id107">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id108">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id109">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id110">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id111">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id112">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id113">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id114">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id115">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1666); <em><a href="#id116">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id117"><span class="problematic" id="id118">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id119"><span class="problematic" id="id120">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id121"><span class="problematic" id="id122">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id123"><span class="problematic" id="id124">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id117">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1699); <em><a href="#id118">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id119">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1699); <em><a href="#id120">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id121">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1699); <em><a href="#id122">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id123">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1699); <em><a href="#id124">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id125"><span class="problematic" id="id126">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id127"><span class="problematic" id="id128">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id129"><span class="problematic" id="id130">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id131"><span class="problematic" id="id132">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id125">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1743); <em><a href="#id126">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id127">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1743); <em><a href="#id128">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id129">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1743); <em><a href="#id130">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id131">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1743); <em><a href="#id132">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal <tt class="docutils literal">static</tt> member function
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter,
|
|
also enclose the expected value type in parentheses. Since the value types
|
|
are mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. Also, just as with a normal
|
|
function, optional parameters have default values, whereas required parameters
|
|
do not. Within the function body, either simply use the parameter name or
|
|
pass the matching identifier with the leading underscore to the bracket
|
|
operator of <tt class="docutils literal">args</tt> to extract the corresponding argument. Note that the
|
|
second method doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
struct B
|
|
{
|
|
BOOST_PARAMETER_MEMBER_FUNCTION((bool), static evaluate, kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id133"><span class="problematic" id="id134">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id135"><span class="problematic" id="id136">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id137"><span class="problematic" id="id138">`</span></a>bitset`_<3>), rvalue_const_bitset<2>())
|
|
(rr, (std::<a href="#id139"><span class="problematic" id="id140">`</span></a>bitset`_<4>), rvalue_bitset<3>())
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(lrc)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(lr)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(std::<a href="#id141"><span class="problematic" id="id142">`</span></a>forward`_<rrc0_type>(rrc0))
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(args[_rr0])
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id133">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1762); <em><a href="#id134">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id135">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1762); <em><a href="#id136">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id137">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1762); <em><a href="#id138">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id139">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1762); <em><a href="#id140">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id141">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1762); <em><a href="#id142">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
B::evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
B::evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
B::evaluate(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
B::evaluate( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
B::evaluate( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
B::evaluate( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
B::evaluate( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> and <a class="reference external" href="../../test/preprocessor_eval_category.cpp">preprocessor_eval_category.cpp</a> test programs demonstrate
|
|
proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1851)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1853)</p>
|
|
Duplicate substitution definition name: "preprocessor_eval_cat".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1857)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated forwarding functions. <tt class="docutils literal">name</tt> may be qualified by the <tt class="docutils literal">static</tt>
|
|
keyword to declare the member function and its helpers as not associated with
|
|
any object of the enclosing type.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1868)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>optional-specifier</em> {<em>optional-specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>required-specifier</em> {<em>required-specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
optional-specifier ::=
|
|
'<strong>(</strong>'
|
|
<em>argument-name</em> '<strong>,</strong>' <em>restriction</em> '<strong>,</strong>' <em>default-value</em>
|
|
')'
|
|
|
|
required-specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal"><span class="pre">default-value</span></tt> is any valid C++ expression; if necessary, user code can
|
|
compute it in terms of <tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>, where <tt class="docutils literal"><span class="pre">previous-name</span></tt> is
|
|
the <tt class="docutils literal"><span class="pre">argument-name</span></tt> in a previous <tt class="docutils literal"><span class="pre">specifier-group0</span></tt> or
|
|
<tt class="docutils literal"><span class="pre">specifier-group1</span></tt>. <em>This expression will be invoked exactly once.</em>
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>. If
|
|
<tt class="docutils literal">restriction</tt> uses this form, then the type of the generated name
|
|
<tt class="docutils literal"><span class="pre">argument-name</span> ## _type</tt> will be computed in terms of the <strong>target type</strong>,
|
|
and the generated reference <tt class="docutils literal"><span class="pre">argument-name</span></tt> (but not its corresponding entry
|
|
in <tt class="docutils literal">args</tt>) will be cast to that type.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_ ## __LINE__ ## <strong>name</strong> = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_ ## __LINE__ ## <strong>name</strong>
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
: <a href="#id150"><span class="problematic" id="id151">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<a href="#id1199"><span class="problematic" id="id1200">`forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **m**>(a ## **m**)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result\_ ## __LINE__ ## **name**\ <Args>::type
|
|
boost_param_impl ## __LINE__ ## **name**\ (Args const& args)
|
|
{
|
|
return this->boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
|
|
static_cast<
|
|
typename boost_param_result\_ ## __LINE__ ## **name**\ <
|
|
Args
|
|
>::type(\*)()
|
|
>(`nullptr`_</span></a>)
|
|
, args
|
|
, std::<a href="#id1201"><span class="problematic" id="id1202">`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **0**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **0**])
|
|
, …
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **n**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **n**])
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename *argument name* ## **0** ## _type
|
|
, …
|
|
, typename *argument name* ## **n** ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
, *argument name* ## **0** ## _type&& *argument name* ## **0**
|
|
, …
|
|
, *argument name* ## **n** ## _type&& *argument name* ## **n**
|
|
)
|
|
{
|
|
return this->boost_param_dispatch_0boost\_ ## __LINE__ ## **name**\ (
|
|
static_cast<ResultType(\*)()>(`nullptr`_</span></a>)
|
|
, (args, <em>keyword object of optional parameter</em> ## <strong>n + 1</strong> =
|
|
<em>default value of optional parameter</em> ## <strong>n + 1</strong>
|
|
)
|
|
, std::<cite>forward`_<*argument name* ## **0** ## _type>(
|
|
*argument name* ## **0**
|
|
)
|
|
, …
|
|
, std::`forward`_<*argument name* ## **n** ## _type>(
|
|
*argument name* ## **n**
|
|
)
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of optional parameter* ## **n + 1**
|
|
>::type
|
|
>(*default value of optional parameter* ## **n + 1**)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename <em>argument name</em> ## <strong>0</strong> ## _type
|
|
, …
|
|
, typename <em>argument name</em> ## <strong>m</strong> ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost_ ## __LINE__ ## <strong>name</strong>(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, <em>argument name</em> ## <strong>0</strong> ## _type&& <em>argument name</em> ## <strong>0</strong>
|
|
, …
|
|
, <em>argument name</em> ## <strong>m</strong> ## _type&& <em>argument name</em> ## <strong>m</strong>
|
|
)
|
|
</pre>
|
|
<div class="system-message" id="id150">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1933); <em><a href="#id151">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-const-member-function-result-name-tag-ns-arguments">
|
|
<h2><a class="toc-backref" href="#id1102">7.3 <tt class="docutils literal">BOOST_PARAMETER_CONST_MEMBER_FUNCTION(result, name, tag_ns, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a member function that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2099)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id164"><span class="problematic" id="id165">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id166"><span class="problematic" id="id167">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id168"><span class="problematic" id="id169">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id170"><span class="problematic" id="id171">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id172"><span class="problematic" id="id173">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id174"><span class="problematic" id="id175">`</span></a>bitset`_<N + 1> lset = std::<a href="#id176"><span class="problematic" id="id177">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id178"><span class="problematic" id="id179">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id180"><span class="problematic" id="id181">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id182"><span class="problematic" id="id183">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id164">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id165">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id166">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id167">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id168">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id169">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id170">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id171">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id172">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id173">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id174">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id175">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id176">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id177">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id178">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id179">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id180">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id181">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id182">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2102); <em><a href="#id183">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id184"><span class="problematic" id="id185">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id186"><span class="problematic" id="id187">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id188"><span class="problematic" id="id189">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id190"><span class="problematic" id="id191">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id184">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2135); <em><a href="#id185">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id186">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2135); <em><a href="#id187">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id188">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2135); <em><a href="#id189">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id190">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2135); <em><a href="#id191">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id192"><span class="problematic" id="id193">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id194"><span class="problematic" id="id195">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id196"><span class="problematic" id="id197">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id198"><span class="problematic" id="id199">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id192">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2179); <em><a href="#id193">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id194">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2179); <em><a href="#id195">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id196">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2179); <em><a href="#id197">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id198">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2179); <em><a href="#id199">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal <tt class="docutils literal">const</tt> member function
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter,
|
|
also enclose the expected value type in parentheses. Since the value types
|
|
are mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. Also, just as with a normal
|
|
function, optional parameters have default values, whereas required parameters
|
|
do not. Within the function body, either simply use the parameter name or
|
|
pass the matching identifier with the leading underscore to the bracket
|
|
operator of <tt class="docutils literal">args</tt> to extract the corresponding argument. Note that the
|
|
second method doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
struct B
|
|
{
|
|
B()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_CONST_MEMBER_FUNCTION((bool), evaluate, kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id200"><span class="problematic" id="id201">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id202"><span class="problematic" id="id203">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id204"><span class="problematic" id="id205">`</span></a>bitset`_<3>), rvalue_const_bitset<2>())
|
|
(rr, (std::<a href="#id206"><span class="problematic" id="id207">`</span></a>bitset`_<4>), rvalue_bitset<3>())
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(lrc)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(lr)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(std::<a href="#id208"><span class="problematic" id="id209">`</span></a>forward`_<rrc0_type>(rrc0))
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(args[_rr0])
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id200">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2198); <em><a href="#id201">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id202">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2198); <em><a href="#id203">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id204">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2198); <em><a href="#id205">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id206">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2198); <em><a href="#id207">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id208">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2198); <em><a href="#id209">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
B const b = B();
|
|
b.evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
b.evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
b.evaluate(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
b.evaluate( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
b.evaluate( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
b.evaluate( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
b.evaluate( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> test program demonstrates proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2291)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2295)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated forwarding functions.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2304)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>optional-specifier</em> {<em>optional-specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>required-specifier</em> {<em>required-specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
optional-specifier ::=
|
|
'<strong>(</strong>'
|
|
<em>argument-name</em> '<strong>,</strong>' <em>restriction</em> '<strong>,</strong>' <em>default-value</em>
|
|
')'
|
|
|
|
required-specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal"><span class="pre">default-value</span></tt> is any valid C++ expression; if necessary, user code can
|
|
compute it in terms of <tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>, where <tt class="docutils literal"><span class="pre">previous-name</span></tt> is
|
|
the <tt class="docutils literal"><span class="pre">argument-name</span></tt> in a previous <tt class="docutils literal"><span class="pre">specifier-group0</span></tt> or
|
|
<tt class="docutils literal"><span class="pre">specifier-group1</span></tt>. <em>This expression will be invoked exactly once.</em>
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>. If
|
|
<tt class="docutils literal">restriction</tt> uses this form, then the type of the generated name
|
|
<tt class="docutils literal"><span class="pre">argument-name</span> ## _type</tt> will be computed in terms of the <strong>target type</strong>,
|
|
and the generated reference <tt class="docutils literal"><span class="pre">argument-name</span></tt> (but not its corresponding entry
|
|
in <tt class="docutils literal">args</tt>) will be cast to that type.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_const_ ## __LINE__ ## <strong>name</strong> = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_const_ ## __LINE__ ## <strong>name</strong>
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_const_ ## __LINE__ ## <strong>name</strong>
|
|
: <a href="#id216"><span class="problematic" id="id217">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_const_ ## __LINE__ ## <strong>name</strong>
|
|
boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<a href="#id1203"><span class="problematic" id="id1204">`forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **m**>(a ## **m**)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_const\_ ## __LINE__ ## **name**\ <Args>::type
|
|
boost_param_impl_const ## __LINE__ ## **name**\ (Args const& args) const
|
|
{
|
|
return this->
|
|
boost_param_dispatch_const_0boost\_ ## __LINE__ ## **name**\ (
|
|
static_cast<
|
|
typename boost_param_result_const\_ ## __LINE__ ## **name**\ <
|
|
Args
|
|
>::type(\*)()
|
|
>(`nullptr`_</span></a>)
|
|
, args
|
|
, std::<a href="#id1205"><span class="problematic" id="id1206">`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **0**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **0**])
|
|
, …
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **n**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **n**])
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename *argument name* ## **0** ## _type
|
|
, …
|
|
, typename *argument name* ## **n** ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_const_0boost\_ ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
, *argument name* ## **0** ## _type&& *argument name* ## **0**
|
|
, …
|
|
, *argument name* ## **n** ## _type&& *argument name* ## **n**
|
|
) const
|
|
{
|
|
return this->
|
|
boost_param_dispatch_const_0boost\_ ## __LINE__ ## **name**\ (
|
|
static_cast<ResultType(\*)()>(`nullptr`_</span></a>)
|
|
, (args, <em>keyword object of optional parameter</em> ## <strong>n + 1</strong> =
|
|
<em>default value of optional parameter</em> ## <strong>n + 1</strong>
|
|
)
|
|
, std::<cite>forward`_<*argument name* ## **0** ## _type>(
|
|
*argument name* ## **0**
|
|
)
|
|
, …
|
|
, std::`forward`_<*argument name* ## **n** ## _type>(
|
|
*argument name* ## **n**
|
|
)
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of optional parameter* ## **n + 1**
|
|
>::type
|
|
>(*default value of optional parameter* ## **n + 1**)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename <em>argument name</em> ## <strong>0</strong> ## _type
|
|
, …
|
|
, typename <em>argument name</em> ## <strong>m</strong> ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_const_0boost_ ## __LINE__ ## <strong>name</strong>(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, <em>argument name</em> ## <strong>0</strong> ## _type&& <em>argument name</em> ## <strong>0</strong>
|
|
, …
|
|
, <em>argument name</em> ## <strong>m</strong> ## _type&& <em>argument name</em> ## <strong>m</strong>
|
|
) const
|
|
</pre>
|
|
<div class="system-message" id="id216">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2369); <em><a href="#id217">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-function-call-operator-result-tag-namespace-arguments">
|
|
<h2><a class="toc-backref" href="#id1103">7.4 <tt class="docutils literal">BOOST_PARAMETER_FUNCTION_CALL_OPERATOR(result, tag_namespace, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function call operator that can take in positional arguments,
|
|
composed arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2537)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">tag</tt> by default.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id230"><span class="problematic" id="id231">|</span></a>BOOST_PARAMETER_NAME|_(y)
|
|
<a href="#id232"><span class="problematic" id="id233">|</span></a>BOOST_PARAMETER_NAME|_(z)
|
|
</pre>
|
|
<div class="system-message" id="id230">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2541); <em><a href="#id231">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id232">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2541); <em><a href="#id233">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal function call operator
|
|
header. Enclose the return type in parentheses. For each parameter, also
|
|
enclose the expected value type in parentheses. Since the value types are
|
|
mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. This is especially useful when implementing multiple
|
|
Boost.Parameter-enabled function call operator overloads.</p>
|
|
<pre class="literal-block">
|
|
class char_reader
|
|
{
|
|
int index;
|
|
char const* key;
|
|
|
|
public:
|
|
explicit char_reader(char const* k) : index(0), key(k)
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_FUNCTION_CALL_OPERATOR((void), tag,
|
|
(deduced
|
|
(required
|
|
(y, (int))
|
|
(z, (char const*))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
this->index = y;
|
|
this->key = z;
|
|
}
|
|
|
|
<a href="#id234"><span class="problematic" id="id235">|</span></a>BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR|_((char), tag,
|
|
(deduced
|
|
(required
|
|
(y, (bool))
|
|
(z, (std::<a href="#id1207"><span class="problematic" id="id1208">`map`_<char const\*,std::`string`_</span></a>>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
return y ? (
|
|
(z.find(this->key)->second)[this->index]
|
|
) : this->key[this->index];
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id234">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2553); <em><a href="#id235">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>As with regular argument-dependent lookup, the value types of the arguments
|
|
passed in determine which function call operator overload gets invoked.</p>
|
|
<pre class="literal-block">
|
|
char const* keys[] = {"foo", "bar", "baz"};
|
|
std::<a href="#id1209"><span class="problematic" id="id1210">`map`_<char const\*,std::`string`_</span></a>> k2s;
|
|
k2s[keys[0]] = std::<a href="#id236"><span class="problematic" id="id237">`</span></a>string`_("qux");
|
|
k2s[keys[1]] = std::<a href="#id238"><span class="problematic" id="id239">`</span></a>string`_("wmb");
|
|
k2s[keys[2]] = std::<a href="#id240"><span class="problematic" id="id241">`</span></a>string`_("zxc");
|
|
char_reader r(keys[0]);
|
|
|
|
// positional arguments
|
|
BOOST_TEST_EQ('q', (r(true, k2s)));
|
|
BOOST_TEST_EQ('f', (r(false, k2s)));
|
|
|
|
// named arguments
|
|
r(_z = keys[1], _y = 1);
|
|
BOOST_TEST_EQ('m', (r(_z = k2s, _y = true)));
|
|
BOOST_TEST_EQ('a', (r(_z = k2s, _y = false)));
|
|
|
|
// deduced arguments
|
|
r(keys[2], 2);
|
|
BOOST_TEST_EQ('c', (r(k2s, true)));
|
|
BOOST_TEST_EQ('z', (r(k2s, false)));
|
|
</pre>
|
|
<div class="system-message" id="id236">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2596); <em><a href="#id237">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id238">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2596); <em><a href="#id239">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id240">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2596); <em><a href="#id241">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> and <a class="reference external" href="../../test/preprocessor_deduced.cpp">preprocessor_deduced.cpp</a> test programs demonstrate
|
|
proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2624)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2626)</p>
|
|
Duplicate substitution definition name: "preprocessor_deduced".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2630)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function call operator.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function call operator resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2637)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>optional-specifier</em> {<em>optional-specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>required-specifier</em> {<em>required-specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
optional-specifier ::=
|
|
'<strong>(</strong>'
|
|
<em>argument-name</em> '<strong>,</strong>' <em>restriction</em> '<strong>,</strong>' <em>default-value</em>
|
|
')'
|
|
|
|
required-specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal"><span class="pre">default-value</span></tt> is any valid C++ expression; if necessary, user code can
|
|
compute it in terms of <tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>, where <tt class="docutils literal"><span class="pre">previous-name</span></tt> is
|
|
the <tt class="docutils literal"><span class="pre">argument-name</span></tt> in a previous <tt class="docutils literal"><span class="pre">specifier-group0</span></tt> or
|
|
<tt class="docutils literal"><span class="pre">specifier-group1</span></tt>. <em>This expression will be invoked exactly once.</em>
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>. If
|
|
<tt class="docutils literal">restriction</tt> uses this form, then the type of the generated name
|
|
<tt class="docutils literal"><span class="pre">argument-name</span> ## _type</tt> will be computed in terms of the <strong>target type</strong>,
|
|
and the generated reference <tt class="docutils literal"><span class="pre">argument-name</span></tt> (but not its corresponding entry
|
|
in <tt class="docutils literal">args</tt>) will be cast to that type.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_ ## __LINE__ ## operator = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_ ## __LINE__ ## operator
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_ ## __LINE__ ## operator
|
|
: <a href="#id248"><span class="problematic" id="id249">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## operator
|
|
boost_param_parameters_ ## __LINE__ ## operator;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## operator::match<
|
|
A0, …, A ## <strong>n</strong>
|
|
>::type = boost_param_parameters_ ## __LINE__ ## operator()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## __LINE__ ## operator(
|
|
boost_param_parameters_ ## __LINE__ ## operator()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## operator::match<
|
|
A0, …, A ## <strong>m</strong>
|
|
>::type = boost_param_parameters_ ## __LINE__ ## operator()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## __LINE__ ## operator(
|
|
boost_param_parameters_ ## __LINE__ ## operator()(
|
|
std::<a href="#id1211"><span class="problematic" id="id1212">`forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **m**>(a ## **m**)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result\_ ## __LINE__ ## operator<Args>::type
|
|
boost_param_impl ## __LINE__ ## operator(Args const& args)
|
|
{
|
|
return this->boost_param_dispatch_0boost\_ ## __LINE__ ## operator(
|
|
static_cast<
|
|
typename boost_param_result\_ ## __LINE__ ## operator<
|
|
Args
|
|
>::type(\*)()
|
|
>(`nullptr`_</span></a>)
|
|
, args
|
|
, std::<a href="#id1213"><span class="problematic" id="id1214">`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **0**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **0**])
|
|
, …
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **n**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **n**])
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename *argument name* ## **0** ## _type
|
|
, …
|
|
, typename *argument name* ## **n** ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost\_ ## __LINE__ ## operator(
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
, *argument name* ## **0** ## _type&& *argument name* ## **0**
|
|
, …
|
|
, *argument name* ## **n** ## _type&& *argument name* ## **n**
|
|
)
|
|
{
|
|
return this->boost_param_dispatch_0boost\_ ## __LINE__ ## operator(
|
|
static_cast<ResultType(\*)()>(`nullptr`_</span></a>)
|
|
, (args, <em>keyword object of optional parameter</em> ## <strong>n + 1</strong> =
|
|
<em>default value of optional parameter</em> ## <strong>n + 1</strong>
|
|
)
|
|
, std::<cite>forward`_<*argument name* ## **0** ## _type>(
|
|
*argument name* ## **0**
|
|
)
|
|
, …
|
|
, std::`forward`_<*argument name* ## **n** ## _type>(
|
|
*argument name* ## **n**
|
|
)
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of optional parameter* ## **n + 1**
|
|
>::type
|
|
>(*default value of optional parameter* ## **n + 1**)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename <em>argument name</em> ## <strong>0</strong> ## _type
|
|
, …
|
|
, typename <em>argument name</em> ## <strong>m</strong> ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_0boost_ ## __LINE__ ## operator(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, <em>argument name</em> ## <strong>0</strong> ## _type&& <em>argument name</em> ## <strong>0</strong>
|
|
, …
|
|
, <em>argument name</em> ## <strong>m</strong> ## _type&& <em>argument name</em> ## <strong>m</strong>
|
|
)
|
|
</pre>
|
|
<div class="system-message" id="id248">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2702); <em><a href="#id249">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-const-function-call-operator-result-tag-ns-arguments">
|
|
<h2><a class="toc-backref" href="#id1104">7.5 <tt class="docutils literal">BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function call operator that can take in positional arguments,
|
|
composed arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2868)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id262"><span class="problematic" id="id263">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id264"><span class="problematic" id="id265">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id266"><span class="problematic" id="id267">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id268"><span class="problematic" id="id269">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id270"><span class="problematic" id="id271">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id272"><span class="problematic" id="id273">`</span></a>bitset`_<N + 1> lset = std::<a href="#id274"><span class="problematic" id="id275">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id276"><span class="problematic" id="id277">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id278"><span class="problematic" id="id279">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id280"><span class="problematic" id="id281">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id262">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id263">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id264">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id265">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id266">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id267">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id268">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id269">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id270">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id271">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id272">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id273">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id274">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id275">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id276">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id277">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id278">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id279">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id280">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2871); <em><a href="#id281">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id282"><span class="problematic" id="id283">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id284"><span class="problematic" id="id285">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id286"><span class="problematic" id="id287">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id288"><span class="problematic" id="id289">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id282">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2904); <em><a href="#id283">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id284">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2904); <em><a href="#id285">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id286">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2904); <em><a href="#id287">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id288">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2904); <em><a href="#id289">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id290"><span class="problematic" id="id291">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id292"><span class="problematic" id="id293">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id294"><span class="problematic" id="id295">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id296"><span class="problematic" id="id297">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id290">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2948); <em><a href="#id291">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id292">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2948); <em><a href="#id293">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id294">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2948); <em><a href="#id295">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id296">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2948); <em><a href="#id297">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal <tt class="docutils literal">const</tt> function call operator
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter,
|
|
also enclose the expected value type in parentheses. Since the value types
|
|
are mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. Also, just as with a normal
|
|
function, optional parameters have default values, whereas required parameters
|
|
do not. Within the function body, either simply use the parameter name or
|
|
pass the matching identifier with the leading underscore to the bracket
|
|
operator of <tt class="docutils literal">args</tt> to extract the corresponding argument. Note that the
|
|
second method doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
struct B
|
|
{
|
|
B()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR((bool), kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id298"><span class="problematic" id="id299">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id300"><span class="problematic" id="id301">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id302"><span class="problematic" id="id303">`</span></a>bitset`_<3>), rvalue_const_bitset<2>())
|
|
(rr, (std::<a href="#id304"><span class="problematic" id="id305">`</span></a>bitset`_<4>), rvalue_bitset<3>())
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(lrc)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(lr)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(std::<a href="#id306"><span class="problematic" id="id307">`</span></a>forward`_<rrc0_type>(rrc0))
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(args[_rr0])
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id298">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2967); <em><a href="#id299">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id300">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2967); <em><a href="#id301">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id302">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2967); <em><a href="#id303">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id304">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2967); <em><a href="#id305">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id306">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2967); <em><a href="#id307">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
B const b = B();
|
|
b( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
b( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
b(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
b( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
b( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
b( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
b( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a>, <a class="reference external" href="../../test/preprocessor_deduced.cpp">preprocessor_deduced.cpp</a>, and <a class="reference external" href="../../test/preprocessor_eval_cat_8.cpp">preprocessor_eval_cat_8.cpp</a>
|
|
test programs demonstrate proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3062)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3064)</p>
|
|
Duplicate substitution definition name: "preprocessor_deduced".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3070)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function call operator.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function call operator resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3077)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>optional-specifier</em> {<em>optional-specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>required-specifier</em> {<em>required-specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
optional-specifier ::=
|
|
'<strong>(</strong>'
|
|
<em>argument-name</em> '<strong>,</strong>' <em>restriction</em> '<strong>,</strong>' <em>default-value</em>
|
|
')'
|
|
|
|
required-specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal"><span class="pre">default-value</span></tt> is any valid C++ expression; if necessary, user code can
|
|
compute it in terms of <tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>, where <tt class="docutils literal"><span class="pre">previous-name</span></tt> is
|
|
the <tt class="docutils literal"><span class="pre">argument-name</span></tt> in a previous <tt class="docutils literal"><span class="pre">specifier-group0</span></tt> or
|
|
<tt class="docutils literal"><span class="pre">specifier-group1</span></tt>. <em>This expression will be invoked exactly once.</em>
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>. If
|
|
<tt class="docutils literal">restriction</tt> uses this form, then the type of the generated name
|
|
<tt class="docutils literal"><span class="pre">argument-name</span> ## _type</tt> will be computed in terms of the <strong>target type</strong>,
|
|
and the generated reference <tt class="docutils literal"><span class="pre">argument-name</span></tt> (but not its corresponding entry
|
|
in <tt class="docutils literal">args</tt>) will be cast to that type.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_const_ ## __LINE__ ## operator = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_const_ ## __LINE__ ## operator
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_const_ ## __LINE__ ## operator
|
|
: <a href="#id316"><span class="problematic" id="id317">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_const_ ## __LINE__ ## operator
|
|
boost_param_parameters_const_ ## __LINE__ ## operator;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## operator
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## operator()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## operator(
|
|
boost_param_parameters_const_ ## __LINE__ ## operator()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## operator
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## operator()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## operator(
|
|
boost_param_parameters_const_ ## __LINE__ ## operator()(
|
|
std::<a href="#id1215"><span class="problematic" id="id1216">`forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **m**>(a ## **m**)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_const\_ ## __LINE__ ## operator<Args>::type
|
|
boost_param_impl_const ## __LINE__ ## operator(Args const& args) const
|
|
{
|
|
return this->
|
|
boost_param_dispatch_const_0boost\_ ## __LINE__ ## operator(
|
|
static_cast<
|
|
typename boost_param_result_const\_ ## __LINE__ ## operator<
|
|
Args
|
|
>::type(\*)()
|
|
>(`nullptr`_</span></a>)
|
|
, args
|
|
, std::<a href="#id1217"><span class="problematic" id="id1218">`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **0**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **0**])
|
|
, …
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of required parameter* ## **n**
|
|
>::type
|
|
>(args[ *keyword object of required parameter* ## **n**])
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename *argument name* ## **0** ## _type
|
|
, …
|
|
, typename *argument name* ## **n** ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_const_0boost\_ ## __LINE__ ## operator(
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
, *argument name* ## **0** ## _type&& *argument name* ## **0**
|
|
, …
|
|
, *argument name* ## **n** ## _type&& *argument name* ## **n**
|
|
) const
|
|
{
|
|
return this->
|
|
boost_param_dispatch_const_0boost\_ ## __LINE__ ## operator(
|
|
static_cast<ResultType(\*)()>(`nullptr`_</span></a>)
|
|
, (args, <em>keyword object of optional parameter</em> ## <strong>n + 1</strong> =
|
|
<em>default value of optional parameter</em> ## <strong>n + 1</strong>
|
|
)
|
|
, std::<cite>forward`_<*argument name* ## **0** ## _type>(
|
|
*argument name* ## **0**
|
|
)
|
|
, …
|
|
, std::`forward`_<*argument name* ## **n** ## _type>(
|
|
*argument name* ## **n**
|
|
)
|
|
, std::`forward`_<
|
|
typename |value_type|_<
|
|
Args
|
|
, *keyword tag type of optional parameter* ## **n + 1**
|
|
>::type
|
|
>(*default value of optional parameter* ## **n + 1**)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <
|
|
typename ResultType
|
|
, typename Args
|
|
, typename <em>argument name</em> ## <strong>0</strong> ## _type
|
|
, …
|
|
, typename <em>argument name</em> ## <strong>m</strong> ## _type
|
|
>
|
|
ResultType
|
|
boost_param_dispatch_const_0boost_ ## __LINE__ ## operator(
|
|
(ResultType(*)())
|
|
, Args const& args
|
|
, <em>argument name</em> ## <strong>0</strong> ## _type&& <em>argument name</em> ## <strong>0</strong>
|
|
, …
|
|
, <em>argument name</em> ## <strong>m</strong> ## _type&& <em>argument name</em> ## <strong>m</strong>
|
|
) const
|
|
</pre>
|
|
<div class="system-message" id="id316">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3142); <em><a href="#id317">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-constructor-cls-impl-tag-namespace-arguments">
|
|
<h2><a class="toc-backref" href="#id1105">7.6 <tt class="docutils literal">BOOST_PARAMETER_CONSTRUCTOR(cls, impl, tag_namespace, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a constructor that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3310)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">tag</tt> by default.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id330"><span class="problematic" id="id331">|</span></a>BOOST_PARAMETER_NAME|_(y)
|
|
<a href="#id332"><span class="problematic" id="id333">|</span></a>BOOST_PARAMETER_NAME|_(z)
|
|
</pre>
|
|
<div class="system-message" id="id330">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3314); <em><a href="#id331">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id332">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3314); <em><a href="#id333">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>In the base class, implement a delegate constructor template that takes in an
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>. You must pass the identifiers with leading underscores to
|
|
<tt class="docutils literal">args</tt> in order to extract the corresponding arguments.</p>
|
|
<pre class="literal-block">
|
|
class char_read_base
|
|
{
|
|
int index;
|
|
char const* key;
|
|
|
|
public:
|
|
template <typename Args>
|
|
explicit char_read_base(Args const& args)
|
|
: index(args[_y]), key(args[_z])
|
|
{
|
|
}
|
|
|
|
<a href="#id334"><span class="problematic" id="id335">|</span></a>BOOST_PARAMETER_CONST_FUNCTION_CALL_OPERATOR|_((char), tag,
|
|
(deduced
|
|
(required
|
|
(y, (bool))
|
|
(z, (std::<a href="#id1219"><span class="problematic" id="id1220">`map`_<char const\*,std::`string`_</span></a>>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
return y ? (
|
|
(z.find(this->key)->second)[this->index]
|
|
) : this->key[this->index];
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id334">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3323); <em><a href="#id335">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal constructor definition. Note the
|
|
lack of an explicit body. Enclose the base type in parentheses. For each
|
|
parameter, also enclose the expected value type in parentheses. Since the
|
|
value types are mutually exclusive, you can wrap the parameters in a
|
|
<tt class="docutils literal">(deduced …)</tt> clause.</p>
|
|
<pre class="literal-block">
|
|
struct char_reader : public char_read_base
|
|
{
|
|
BOOST_PARAMETER_CONSTRUCTOR(char_reader, (char_read_base), tag,
|
|
(deduced
|
|
(required
|
|
(y, (int))
|
|
(z, (char const*))
|
|
)
|
|
)
|
|
)
|
|
};
|
|
</pre>
|
|
<p>The following <tt class="docutils literal">char_reader</tt> constructor calls are legal.</p>
|
|
<pre class="literal-block">
|
|
char const* keys[] = {"foo", "bar", "baz"};
|
|
std::<a href="#id1221"><span class="problematic" id="id1222">`map`_<char const\*,std::`string`_</span></a>> k2s;
|
|
k2s[keys[0]] = std::<a href="#id336"><span class="problematic" id="id337">`</span></a>string`_("qux");
|
|
k2s[keys[1]] = std::<a href="#id338"><span class="problematic" id="id339">`</span></a>string`_("wmb");
|
|
k2s[keys[2]] = std::<a href="#id340"><span class="problematic" id="id341">`</span></a>string`_("zxc");
|
|
|
|
// positional arguments
|
|
char_reader r0(0, keys[0]);
|
|
BOOST_TEST_EQ('q', (r0(true, k2s)));
|
|
BOOST_TEST_EQ('f', (r0(false, k2s)));
|
|
|
|
// named arguments
|
|
char_reader r1(_z = keys[1], _y = 1);
|
|
BOOST_TEST_EQ('m', (r1(_z = k2s, _y = true)));
|
|
BOOST_TEST_EQ('a', (r1(_z = k2s, _y = false)));
|
|
|
|
// deduced arguments
|
|
char_reader r2(keys[2], 2);
|
|
BOOST_TEST_EQ('c', (r2(k2s, true)));
|
|
BOOST_TEST_EQ('z', (r2(k2s, false)));
|
|
</pre>
|
|
<div class="system-message" id="id336">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3374); <em><a href="#id337">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id338">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3374); <em><a href="#id339">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id340">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3374); <em><a href="#id341">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> and <a class="reference external" href="../../test/preprocessor_deduced.cpp">preprocessor_deduced.cpp</a> test programs demonstrate
|
|
proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3402)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3404)</p>
|
|
Duplicate substitution definition name: "preprocessor_deduced".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3406)</p>
|
|
Duplicate substitution definition name: "preprocessor_eval_cat".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3410)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">cls</tt> is the name of the enclosing class.
|
|
*. <tt class="docutils literal">impl</tt> is the parenthesized implementation base class for <tt class="docutils literal">cls</tt>.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
constructor resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a list of <em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3417)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>.</p>
|
|
<p>Note that <em>specifier</em> does not include <em>default-value</em>. It is up to the
|
|
delegate constructor in <tt class="docutils literal">impl</tt> to determine the default value of all
|
|
optional arguments.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
struct boost_param_params_ ## __LINE__ ## ctor
|
|
: <a href="#id351"><span class="problematic" id="id352">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## ctor
|
|
constructor_parameters ## __LINE__;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>cls</strong>(A0&& a0, …, A ## <strong>n</strong> && a ## <strong>n</strong>)
|
|
: <strong>impl</strong>(
|
|
constructor_parameters ## __LINE__(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
)
|
|
{
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>cls</strong>(A0&& a0, …, A ## <strong>m</strong> && a ## <strong>m</strong>)
|
|
: <strong>impl</strong>(
|
|
constructor_parameters ## __LINE__(
|
|
std::<a href="#id353"><span class="problematic" id="id354">`</span></a>forward`_<A0>(a0)
|
|
, …
|
|
, std::<a href="#id355"><span class="problematic" id="id356">`</span></a>forward`_<A ## <strong>m</strong>>(a ## <strong>m</strong>)
|
|
)
|
|
)
|
|
{
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id351">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3473); <em><a href="#id352">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id353">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3473); <em><a href="#id354">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id355">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3473); <em><a href="#id356">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-basic-function-result-name-tag-namespace-arguments">
|
|
<h2><a class="toc-backref" href="#id1106">7.7 <tt class="docutils literal">BOOST_PARAMETER_BASIC_FUNCTION(result, name, tag_namespace, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3524)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id359"><span class="problematic" id="id360">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id361"><span class="problematic" id="id362">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id363"><span class="problematic" id="id364">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id365"><span class="problematic" id="id366">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id367"><span class="problematic" id="id368">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id369"><span class="problematic" id="id370">`</span></a>bitset`_<N + 1> lset = std::<a href="#id371"><span class="problematic" id="id372">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id373"><span class="problematic" id="id374">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id375"><span class="problematic" id="id376">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id377"><span class="problematic" id="id378">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id359">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id360">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id361">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id362">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id363">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id364">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id365">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id366">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id367">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id368">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id369">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id370">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id371">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id372">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id373">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id374">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id375">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id376">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id377">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3527); <em><a href="#id378">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id379"><span class="problematic" id="id380">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id381"><span class="problematic" id="id382">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id383"><span class="problematic" id="id384">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id385"><span class="problematic" id="id386">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id379">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3560); <em><a href="#id380">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id381">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3560); <em><a href="#id382">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id383">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3560); <em><a href="#id384">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id385">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3560); <em><a href="#id386">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id387"><span class="problematic" id="id388">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id389"><span class="problematic" id="id390">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id391"><span class="problematic" id="id392">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id393"><span class="problematic" id="id394">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id387">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3604); <em><a href="#id388">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id389">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3604); <em><a href="#id390">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id391">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3604); <em><a href="#id392">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id393">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3604); <em><a href="#id394">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal function header. Enclose the
|
|
return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter, also enclose the
|
|
expected value type in parentheses. Since the value types are mutually
|
|
exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. However, unlike a normal
|
|
function, default values must be specified within the function body. Also
|
|
within the function body, you must pass the matching identifier with the
|
|
leading underscore to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
corresponding argument, but at least this doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to
|
|
preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
BOOST_PARAMETER_BASIC_FUNCTION((bool), evaluate, kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id395"><span class="problematic" id="id396">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id397"><span class="problematic" id="id398">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id399"><span class="problematic" id="id400">`</span></a>bitset`_<3>))
|
|
(rr, (std::<a href="#id401"><span class="problematic" id="id402">`</span></a>bitset`_<4>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc0 | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(args[_rr0 | rvalue_bitset<3>()])
|
|
);
|
|
|
|
return true;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id395">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3623); <em><a href="#id396">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id397">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3623); <em><a href="#id398">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id399">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3623); <em><a href="#id400">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id401">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3623); <em><a href="#id402">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
evaluate(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
evaluate( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
evaluate( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
evaluate( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
evaluate( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> test program demonstrates proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3710)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3714)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated forwarding functions.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3723)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>.</p>
|
|
<p>Note that <em>specifier</em> does not include <em>default-value</em>. It is up to the
|
|
function body to determine the default value of all optional arguments.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_ ## __LINE__ ## <strong>name</strong> = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_ ## __LINE__ ## <strong>name</strong>
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
: <a href="#id409"><span class="problematic" id="id410">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>;
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_ ## __LINE__ ## <strong>name</strong><Args>::type
|
|
boost_param_impl ## <strong>name</strong>(Args const&);
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return boost_param_impl ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return boost_param_impl ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<a href="#id411"><span class="problematic" id="id412">`</span></a>forward`_<A0>(a0)
|
|
, …
|
|
, std::<a href="#id413"><span class="problematic" id="id414">`</span></a>forward`_<A ## <strong>m</strong>>(a ## <strong>m</strong>)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_ ## __LINE__ ## <strong>name</strong><Args>::type
|
|
boost_param_impl ## __LINE__ ## <strong>name</strong>(Args const& args)
|
|
</pre>
|
|
<div class="system-message" id="id409">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3778); <em><a href="#id410">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id411">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3778); <em><a href="#id412">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id413">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3778); <em><a href="#id414">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-basic-member-function-result-name-tag-ns-arguments">
|
|
<h2><a class="toc-backref" href="#id1107">7.8 <tt class="docutils literal">BOOST_PARAMETER_BASIC_MEMBER_FUNCTION(result, name, tag_ns, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a member function that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3872)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id426"><span class="problematic" id="id427">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id428"><span class="problematic" id="id429">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id430"><span class="problematic" id="id431">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id432"><span class="problematic" id="id433">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id434"><span class="problematic" id="id435">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id436"><span class="problematic" id="id437">`</span></a>bitset`_<N + 1> lset = std::<a href="#id438"><span class="problematic" id="id439">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id440"><span class="problematic" id="id441">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id442"><span class="problematic" id="id443">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id444"><span class="problematic" id="id445">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id426">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id427">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id428">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id429">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id430">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id431">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id432">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id433">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id434">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id435">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id436">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id437">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id438">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id439">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id440">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id441">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id442">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id443">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id444">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3875); <em><a href="#id445">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id446"><span class="problematic" id="id447">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id448"><span class="problematic" id="id449">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id450"><span class="problematic" id="id451">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id452"><span class="problematic" id="id453">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id446">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3908); <em><a href="#id447">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id448">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3908); <em><a href="#id449">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id450">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3908); <em><a href="#id451">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id452">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3908); <em><a href="#id453">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id454"><span class="problematic" id="id455">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id456"><span class="problematic" id="id457">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id458"><span class="problematic" id="id459">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id460"><span class="problematic" id="id461">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id454">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3952); <em><a href="#id455">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id456">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3952); <em><a href="#id457">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id458">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3952); <em><a href="#id459">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id460">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3952); <em><a href="#id461">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal <tt class="docutils literal">static</tt> member function
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter,
|
|
also enclose the expected value type in parentheses. Since the value types
|
|
are mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. However, unlike a normal
|
|
function, default values must be specified within the function body. Also
|
|
within the function body, you must pass the matching identifier with the
|
|
leading underscore to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
corresponding argument, but at least this doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to
|
|
preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
struct B
|
|
{
|
|
BOOST_PARAMETER_BASIC_MEMBER_FUNCTION((bool), static evaluate, kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id462"><span class="problematic" id="id463">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id464"><span class="problematic" id="id465">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id466"><span class="problematic" id="id467">`</span></a>bitset`_<3>))
|
|
(rr, (std::<a href="#id468"><span class="problematic" id="id469">`</span></a>bitset`_<4>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc0 | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(
|
|
args[_rr0 | rvalue_bitset<3>()]
|
|
)
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id462">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3971); <em><a href="#id463">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id464">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3971); <em><a href="#id465">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id466">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3971); <em><a href="#id467">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id468">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3971); <em><a href="#id469">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
B::evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
B::evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
B::evaluate(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
B::evaluate( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
B::evaluate( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
B::evaluate( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
B::evaluate( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> test program demonstrates proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4064)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4068)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated forwarding functions. <tt class="docutils literal">name</tt> may be qualified by the <tt class="docutils literal">static</tt>
|
|
keyword to declare the member function and its helpers as not associated with
|
|
any object of the enclosing type.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4079)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>.</p>
|
|
<p>Note that <em>specifier</em> does not include <em>default-value</em>. It is up to the
|
|
function body to determine the default value of all optional arguments.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_ ## __LINE__ ## <strong>name</strong> = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_ ## __LINE__ ## <strong>name</strong>
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
: <a href="#id477"><span class="problematic" id="id478">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## <strong>name</strong>
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## <strong>name</strong>(
|
|
boost_param_parameters_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<a href="#id479"><span class="problematic" id="id480">`</span></a>forward`_<A0>(a0)
|
|
, …
|
|
, std::<a href="#id481"><span class="problematic" id="id482">`</span></a>forward`_<A ## <strong>m</strong>>(a ## <strong>m</strong>)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_ ## __LINE__ ## <strong>name</strong><Args>::type
|
|
boost_param_impl ## <strong>name</strong>(Args const& args)
|
|
</pre>
|
|
<div class="system-message" id="id477">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4134); <em><a href="#id478">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id479">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4134); <em><a href="#id480">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id481">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4134); <em><a href="#id482">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-basic-const-member-function-result-name-tag-ns-args">
|
|
<h2><a class="toc-backref" href="#id1108">7.9 <tt class="docutils literal">BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION(result, name, tag_ns, args)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a member function that can take in positional arguments, composed
|
|
arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4224)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id494"><span class="problematic" id="id495">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id496"><span class="problematic" id="id497">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id498"><span class="problematic" id="id499">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id500"><span class="problematic" id="id501">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id502"><span class="problematic" id="id503">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id504"><span class="problematic" id="id505">`</span></a>bitset`_<N + 1> lset = std::<a href="#id506"><span class="problematic" id="id507">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id508"><span class="problematic" id="id509">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id510"><span class="problematic" id="id511">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id512"><span class="problematic" id="id513">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id494">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id495">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id496">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id497">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id498">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id499">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id500">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id501">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id502">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id503">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id504">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id505">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id506">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id507">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id508">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id509">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id510">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id511">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id512">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4227); <em><a href="#id513">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id514"><span class="problematic" id="id515">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id516"><span class="problematic" id="id517">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id518"><span class="problematic" id="id519">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id520"><span class="problematic" id="id521">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id514">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4260); <em><a href="#id515">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id516">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4260); <em><a href="#id517">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id518">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4260); <em><a href="#id519">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id520">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4260); <em><a href="#id521">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id522"><span class="problematic" id="id523">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id524"><span class="problematic" id="id525">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id526"><span class="problematic" id="id527">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id528"><span class="problematic" id="id529">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id522">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4304); <em><a href="#id523">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id524">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4304); <em><a href="#id525">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id526">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4304); <em><a href="#id527">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id528">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4304); <em><a href="#id529">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal <tt class="docutils literal">const</tt> member function
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter,
|
|
also enclose the expected value type in parentheses. Since the value types
|
|
are mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. However, unlike a normal
|
|
function, default values must be specified within the function body. Also
|
|
within the function body, you must pass the matching identifier with the
|
|
leading underscore to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
corresponding argument, but at least this doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to
|
|
preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
struct B
|
|
{
|
|
B()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION((bool), evaluate, kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id530"><span class="problematic" id="id531">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id532"><span class="problematic" id="id533">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id534"><span class="problematic" id="id535">`</span></a>bitset`_<3>))
|
|
(rr, (std::<a href="#id536"><span class="problematic" id="id537">`</span></a>bitset`_<4>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc0 | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(
|
|
args[_rr0 | rvalue_bitset<3>()]
|
|
)
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id530">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4323); <em><a href="#id531">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id532">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4323); <em><a href="#id533">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id534">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4323); <em><a href="#id535">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id536">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4323); <em><a href="#id537">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
B const b = B();
|
|
b.evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
b.evaluate( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
b.evaluate(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
b.evaluate( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
b.evaluate( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
b.evaluate( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
b.evaluate( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> test program demonstrates proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4421)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4425)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated forwarding functions.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4434)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>.</p>
|
|
<p>Note that <em>specifier</em> does not include <em>default-value</em>. It is up to the
|
|
function body to determine the default value of all optional arguments.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_const_ ## __LINE__ ## <strong>name</strong> = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_const_ ## __LINE__ ## <strong>name</strong>
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_const_ ## __LINE__ ## <strong>name</strong>
|
|
: <a href="#id545"><span class="problematic" id="id546">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_const_ ## __LINE__ ## <strong>name</strong>
|
|
boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> <strong>name</strong>(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## <strong>name</strong>(
|
|
boost_param_parameters_const_ ## __LINE__ ## <strong>name</strong>()(
|
|
std::<a href="#id547"><span class="problematic" id="id548">`</span></a>forward`_<A0>(a0)
|
|
, …
|
|
, std::<a href="#id549"><span class="problematic" id="id550">`</span></a>forward`_<A ## <strong>m</strong>>(a ## <strong>m</strong>)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_const_ ## __LINE__ ## <strong>name</strong><Args>::type
|
|
boost_param_impl_const ## __LINE__ ## <strong>name</strong>(Args const& args) const
|
|
</pre>
|
|
<div class="system-message" id="id545">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4489); <em><a href="#id546">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id547">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4489); <em><a href="#id548">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id549">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4489); <em><a href="#id550">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-basic-function-call-operator-result-tag-ns-arguments">
|
|
<h2><a class="toc-backref" href="#id1109">7.10 <tt class="docutils literal">BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR(result, tag_ns, arguments)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function call operator that can take in positional arguments,
|
|
composed arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4579)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">tag</tt> by default.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id562"><span class="problematic" id="id563">|</span></a>BOOST_PARAMETER_NAME|_(y)
|
|
<a href="#id564"><span class="problematic" id="id565">|</span></a>BOOST_PARAMETER_NAME|_(z)
|
|
</pre>
|
|
<div class="system-message" id="id562">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4583); <em><a href="#id563">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id564">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4583); <em><a href="#id565">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal function call operator
|
|
header. Enclose the return type in parentheses. For each parameter, also
|
|
enclose the expected value type in parentheses. Since the value types are
|
|
mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. This is especially useful when implementing multiple
|
|
Boost.Parameter-enabled function call operator overloads.</p>
|
|
<pre class="literal-block">
|
|
class char_reader
|
|
{
|
|
int index;
|
|
char const* key;
|
|
|
|
public:
|
|
explicit char_reader(char const* k) : index(0), key(k)
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_BASIC_FUNCTION_CALL_OPERATOR((void), tag,
|
|
(deduced
|
|
(required
|
|
(y, (int))
|
|
(z, (char const*))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
this->index = args[_y];
|
|
this->key = args[_z];
|
|
}
|
|
|
|
<a href="#id566"><span class="problematic" id="id567">|</span></a>BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR|_((char), tag,
|
|
(deduced
|
|
(required
|
|
(y, (bool))
|
|
(z, (std::<a href="#id1223"><span class="problematic" id="id1224">`map`_<char const*,std::`string`_</span></a>>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
return args[_y] ? (
|
|
(args[_z].find(this->key)->second)[this->index]
|
|
) : this->key[this->index];
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id566">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4595); <em><a href="#id567">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>As with regular argument-dependent lookup, the value types of the arguments
|
|
passed in determine which function call operator overload gets invoked.</p>
|
|
<pre class="literal-block">
|
|
char const* keys[] = {"foo", "bar", "baz"};
|
|
std::<a href="#id1225"><span class="problematic" id="id1226">`map`_<char const*,std::`string`_</span></a>> k2s;
|
|
k2s[keys[0]] = std::<a href="#id568"><span class="problematic" id="id569">`</span></a>string`_("qux");
|
|
k2s[keys[1]] = std::<a href="#id570"><span class="problematic" id="id571">`</span></a>string`_("wmb");
|
|
k2s[keys[2]] = std::<a href="#id572"><span class="problematic" id="id573">`</span></a>string`_("zxc");
|
|
char_reader r(keys[0]);
|
|
|
|
// positional arguments
|
|
BOOST_TEST_EQ('q', (r(true, k2s)));
|
|
BOOST_TEST_EQ('f', (r(false, k2s)));
|
|
|
|
// named arguments
|
|
r(_z = keys[1], _y = 1);
|
|
BOOST_TEST_EQ('m', (r(_z = k2s, _y = true)));
|
|
BOOST_TEST_EQ('a', (r(_z = k2s, _y = false)));
|
|
|
|
// deduced arguments
|
|
r(keys[2], 2);
|
|
BOOST_TEST_EQ('c', (r(k2s, true)));
|
|
BOOST_TEST_EQ('z', (r(k2s, false)));
|
|
</pre>
|
|
<div class="system-message" id="id568">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4638); <em><a href="#id569">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id570">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4638); <em><a href="#id571">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id572">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4638); <em><a href="#id573">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> test program demonstrates proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4665)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4669)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function call operator.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function call operator resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4676)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>.</p>
|
|
<p>Note that <em>specifier</em> does not include <em>default-value</em>. It is up to the
|
|
function body to determine the default value of all optional arguments.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_ ## __LINE__ ## operator = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_ ## __LINE__ ## operator
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_ ## __LINE__ ## operator
|
|
: <a href="#id581"><span class="problematic" id="id582">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_ ## __LINE__ ## operator
|
|
boost_param_parameters_ ## __LINE__ ## operator;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## operator::match<
|
|
A0, …, A ## <strong>n</strong>
|
|
>::type = boost_param_parameters_ ## __LINE__ ## operator()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## __LINE__ ## operator(
|
|
boost_param_parameters_ ## __LINE__ ## operator()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_ ## __LINE__ ## operator::match<
|
|
A0, …, A ## <strong>m</strong>
|
|
>::type = boost_param_parameters_ ## __LINE__ ## operator()
|
|
)
|
|
{
|
|
return this->boost_param_impl ## __LINE__ ## operator(
|
|
boost_param_parameters_ ## __LINE__ ## operator()(
|
|
std::<a href="#id583"><span class="problematic" id="id584">`</span></a>forward`_<A0>(a0)
|
|
, …
|
|
, std::<a href="#id585"><span class="problematic" id="id586">`</span></a>forward`_<A ## <strong>m</strong>>(a ## <strong>m</strong>)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_ ## __LINE__ ## operator<Args>::type
|
|
boost_param_impl ## __LINE__ ## operator(Args const& args)
|
|
</pre>
|
|
<div class="system-message" id="id581">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4731); <em><a href="#id582">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id583">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4731); <em><a href="#id584">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id585">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4731); <em><a href="#id586">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function call operator body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-basic-const-function-call-operator-result-tag-ns-args">
|
|
<h2><a class="toc-backref" href="#id1110">7.11 <tt class="docutils literal">BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR(result, tag_ns, args)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor.hpp">boost/parameter/preprocessor.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function call operator that can take in positional arguments,
|
|
composed arguments, named arguments, and deduced arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4821)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id598"><span class="problematic" id="id599">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id600"><span class="problematic" id="id601">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id602"><span class="problematic" id="id603">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id604"><span class="problematic" id="id605">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id606"><span class="problematic" id="id607">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id608"><span class="problematic" id="id609">`</span></a>bitset`_<N + 1> lset = std::<a href="#id610"><span class="problematic" id="id611">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id612"><span class="problematic" id="id613">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id614"><span class="problematic" id="id615">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id616"><span class="problematic" id="id617">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id598">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id599">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id600">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id601">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id602">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id603">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id604">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id605">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id606">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id607">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id608">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id609">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id610">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id611">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id612">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id613">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id614">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id615">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id616">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4824); <em><a href="#id617">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id618"><span class="problematic" id="id619">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id620"><span class="problematic" id="id621">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id622"><span class="problematic" id="id623">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id624"><span class="problematic" id="id625">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id618">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4857); <em><a href="#id619">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id620">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4857); <em><a href="#id621">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id622">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4857); <em><a href="#id623">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id624">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4857); <em><a href="#id625">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Define the named parameters that will comprise the argument specification that
|
|
this macro will use. Ensure that all their tag types are in the same
|
|
namespace, which is <tt class="docutils literal">kw</tt> in this case. The identifiers with leading
|
|
underscores can be passed to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
same argument to which the corresponding named parameter (without underscores)
|
|
is bound, as will be shown later.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id626"><span class="problematic" id="id627">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw) in(lrc))
|
|
<a href="#id628"><span class="problematic" id="id629">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw) in_out(lr))
|
|
<a href="#id630"><span class="problematic" id="id631">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw) in(rrc))
|
|
<a href="#id632"><span class="problematic" id="id633">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id626">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4901); <em><a href="#id627">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id628">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4901); <em><a href="#id629">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id630">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4901); <em><a href="#id631">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id632">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4901); <em><a href="#id633">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a normal <tt class="docutils literal">const</tt> function call operator
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. For each parameter,
|
|
also enclose the expected value type in parentheses. Since the value types
|
|
are mutually exclusive, you can wrap the parameters in a <tt class="docutils literal">(deduced …)</tt>
|
|
clause. Otherwise, just as with a normal function, the order in which you
|
|
specify the parameters determines their position. However, unlike a normal
|
|
function, default values must be specified within the function body. Also
|
|
within the function body, you must pass the matching identifier with the
|
|
leading underscore to the bracket operator of <tt class="docutils literal">args</tt> to extract the
|
|
corresponding argument, but at least this doesn't require <tt class="docutils literal"><span class="pre">std::forward</span></tt> to
|
|
preserve value categories.</p>
|
|
<pre class="literal-block">
|
|
struct B
|
|
{
|
|
B()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_BASIC_CONST_FUNCTION_CALL_OPERATOR((bool), kw,
|
|
(deduced
|
|
(required
|
|
(lrc, (std::<a href="#id634"><span class="problematic" id="id635">`</span></a>bitset`_<1>))
|
|
(lr, (std::<a href="#id636"><span class="problematic" id="id637">`</span></a>bitset`_<2>))
|
|
)
|
|
(optional
|
|
(rrc, (std::<a href="#id638"><span class="problematic" id="id639">`</span></a>bitset`_<3>))
|
|
(rr, (std::<a href="#id640"><span class="problematic" id="id641">`</span></a>bitset`_<4>))
|
|
)
|
|
)
|
|
)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc0 | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(
|
|
args[_rr0 | rvalue_bitset<3>()]
|
|
)
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id634">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4920); <em><a href="#id635">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id636">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4920); <em><a href="#id637">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id638">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4920); <em><a href="#id639">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id640">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4920); <em><a href="#id641">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The following function calls are legal.</p>
|
|
<pre class="literal-block">
|
|
B const b = B();
|
|
b( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
, rvalue_bitset<3>()
|
|
);
|
|
b( // positional arguments
|
|
lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
);
|
|
b(( // composed arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
));
|
|
b( // named arguments
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
b( // named arguments
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>Because the parameters were wrapped in a <tt class="docutils literal">(deduced …)</tt> clause, the following
|
|
function calls are also legal.</p>
|
|
<pre class="literal-block">
|
|
b( // deduced arguments
|
|
rvalue_bitset<3>()
|
|
, lvalue_const_bitset<0>()
|
|
, lvalue_bitset<1>()
|
|
, rvalue_const_bitset<2>()
|
|
);
|
|
b( // deduced arguments
|
|
lvalue_bitset<1>()
|
|
, lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor.cpp">preprocessor.cpp</a> test program demonstrates proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5017)</p>
|
|
Duplicate substitution definition name: "preprocessor".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5021)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function call operator.
|
|
*. <tt class="docutils literal">tag_namespace</tt> is the namespace in which the keywords used by the
|
|
function call operator resides.
|
|
*. <tt class="docutils literal">arguments</tt> is a <a class="reference external" href="../../../preprocessor/doc/index.html">Boost.Preprocessor</a> <a class="reference external" href="../../../preprocessor/doc/data/sequences.html">sequence</a> of
|
|
<em>argument-specifiers</em>, as defined below.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5028)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<pre class="literal-block">
|
|
argument-specifiers ::= <em>specifier-group0</em> {<em>specifier-group0</em>}
|
|
|
|
specifier-group0 ::= <em>specifier-group1</em> |
|
|
(
|
|
'<strong>(</strong>' '<strong>deduced</strong>'
|
|
<em>specifier-group1</em> {<em>specifier-group1</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier-group1 ::=
|
|
(
|
|
'<strong>(</strong>' '<strong>optional</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
) | (
|
|
'<strong>(</strong>' '<strong>required</strong>'
|
|
<em>specifier</em> {<em>specifier</em>}
|
|
'<strong>)</strong>'
|
|
)
|
|
|
|
specifier ::=
|
|
'<strong>(</strong>' <em>argument-name</em> '<strong>,</strong>' <em>restriction</em> ')'
|
|
|
|
restriction ::=
|
|
( '<strong>*</strong>' '<strong>(</strong>' <em>mfc</em> '<strong>)</strong>' ) |
|
|
( '<strong>(</strong>' <em>type-name</em> '<strong>)</strong>' ) |
|
|
'<strong>*</strong>'
|
|
</pre>
|
|
<p>*. <tt class="docutils literal"><span class="pre">argument-name</span></tt> is any valid C++ identifier.
|
|
*. <tt class="docutils literal">mfc</tt> is an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary Metafunction Class</a> whose first argument will
|
|
be the type of the corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will
|
|
be the entire <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is a <a class="reference external" href="../../../mpl/doc/refmanual/integral-constant.html">Boolean Integral
|
|
Constant</a>; however, user code <em>cannot</em> compute <tt class="docutils literal">mfc</tt> in terms of
|
|
<tt class="docutils literal"><span class="pre">previous-name</span> ## _type</tt>.
|
|
*. <tt class="docutils literal"><span class="pre">type-name</span></tt> is either the name of a <strong>target type</strong> or an <a class="reference external" href="../../../mpl/doc/refmanual/metafunction-class.html">MPL Binary
|
|
Metafunction Class</a> whose first argument will be the type of the
|
|
corresponding <tt class="docutils literal"><span class="pre">argument-name</span></tt>, whose second argument will be the entire
|
|
<a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>, and whose return type is the <strong>target type</strong>.</p>
|
|
<p>Note that <em>specifier</em> does not include <em>default-value</em>. It is up to the
|
|
function body to determine the default value of all optional arguments.</p>
|
|
<p>Approximate expansion:
|
|
<strong>Where</strong>:</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal">n</tt> denotes the <em>minimum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
<li><tt class="docutils literal">m</tt> denotes the <em>maximum</em> arity, as determined from <tt class="docutils literal">arguments</tt>.</li>
|
|
</ul>
|
|
<pre class="literal-block">
|
|
// If <strong>result</strong> is a template instantiation of <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">enable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_enable_if_c</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">disable_if_c</a>,
|
|
// <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if</a>, <a class="reference external" href="../../../core/doc/html/core/enable_if.html">lazy_disable_if_c</a>, or <a class="reference external" href="http://en.cppreference.com/w/cpp/types/enable_if">std_enable_if</a>:
|
|
template <typename Args>
|
|
using boost_param_result_const_ ## __LINE__ ## operator = <strong>result</strong>;
|
|
|
|
// If <strong>result</strong> is a simple return type:
|
|
template <typename Args>
|
|
struct boost_param_result_const_ ## __LINE__ ## operator
|
|
{
|
|
typedef <strong>result</strong> type;
|
|
};
|
|
|
|
struct boost_param_params_const_ ## __LINE__ ## operator
|
|
: <a href="#id648"><span class="problematic" id="id649">|</span></a>parameters|_<
|
|
<em>list of parameter specifications, based on arguments</em>
|
|
>
|
|
{
|
|
};
|
|
|
|
typedef boost_param_params_const_ ## __LINE__ ## operator
|
|
boost_param_parameters_const_ ## __LINE__ ## operator;
|
|
|
|
template <typename A0, …, typename A ## <strong>n</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>n</strong>&& a ## <strong>n</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## operator
|
|
::match<A0, …, A ## <strong>n</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## operator()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## operator(
|
|
boost_param_parameters_const_ ## __LINE__ ## operator()(
|
|
std::<cite>forward`_<A0>(a0)
|
|
, …
|
|
, std::`forward`_<A ## **n**>(a ## **n**)
|
|
)
|
|
);
|
|
}
|
|
|
|
:vellipsis:`⋮</cite>
|
|
|
|
template <typename A0, …, typename A ## <strong>m</strong>>
|
|
<strong>result</strong> operator()(
|
|
A0&& a0, …, A ## <strong>m</strong>&& a ## <strong>m</strong>
|
|
, typename boost_param_parameters_const_ ## __LINE__ ## operator
|
|
::match<A0, …, A ## <strong>m</strong>>::type
|
|
= boost_param_parameters_const_ ## __LINE__ ## operator()
|
|
) const
|
|
{
|
|
return this->boost_param_impl_const ## __LINE__ ## operator(
|
|
boost_param_parameters_const_ ## __LINE__ ## operator()(
|
|
std::<a href="#id650"><span class="problematic" id="id651">`</span></a>forward`_<A0>(a0)
|
|
, …
|
|
, std::<a href="#id652"><span class="problematic" id="id653">`</span></a>forward`_<A ## <strong>m</strong>>(a ## <strong>m</strong>)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <typename Args>
|
|
typename boost_param_result_const_ ## __LINE__ ## operator<Args>::type
|
|
boost_param_impl_const ## __LINE__ ## operator(Args const& args) const
|
|
</pre>
|
|
<div class="system-message" id="id648">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5083); <em><a href="#id649">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id650">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5083); <em><a href="#id651">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id652">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5083); <em><a href="#id653">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function call operator body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-function-result-name">
|
|
<h2><a class="toc-backref" href="#id1111">7.12 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_FUNCTION(result, name)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5172)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id665"><span class="problematic" id="id666">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id667"><span class="problematic" id="id668">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id669"><span class="problematic" id="id670">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id671"><span class="problematic" id="id672">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id673"><span class="problematic" id="id674">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id675"><span class="problematic" id="id676">`</span></a>bitset`_<N + 1> lset = std::<a href="#id677"><span class="problematic" id="id678">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id679"><span class="problematic" id="id680">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id681"><span class="problematic" id="id682">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id683"><span class="problematic" id="id684">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id665">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id666">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id667">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id668">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id669">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id670">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id671">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id672">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id673">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id674">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id675">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id676">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id677">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id678">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id679">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id680">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id681">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id682">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id683">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5175); <em><a href="#id684">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id685"><span class="problematic" id="id686">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id687"><span class="problematic" id="id688">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id689"><span class="problematic" id="id690">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id691"><span class="problematic" id="id692">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id685">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5208); <em><a href="#id686">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id687">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5208); <em><a href="#id688">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id689">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5208); <em><a href="#id690">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id691">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5208); <em><a href="#id692">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Named parameters are required when invoking the function; however, none of
|
|
their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id693"><span class="problematic" id="id694">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|
|
<a href="#id695"><span class="problematic" id="id696">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|
|
<a href="#id697"><span class="problematic" id="id698">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|
|
<a href="#id699"><span class="problematic" id="id700">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id693">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5248); <em><a href="#id694">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id695">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5248); <em><a href="#id696">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id697">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5248); <em><a href="#id698">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id699">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5248); <em><a href="#id700">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a variadic function header. Enclose the
|
|
return type <tt class="docutils literal">bool</tt> in parentheses.</p>
|
|
<pre class="literal-block">
|
|
BOOST_PARAMETER_NO_SPEC_FUNCTION((bool), evaluate)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(args[_rr | rvalue_bitset<3>()])
|
|
);
|
|
|
|
return true;
|
|
}
|
|
</pre>
|
|
<p>To invoke the function, bind all its arguments to named parameters.</p>
|
|
<pre class="literal-block">
|
|
evaluate(
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
evaluate(
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test program demonstrates proper usage of
|
|
this macro.</p>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5307)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated implementation function.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5312)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
|
|
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
|
|
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
using boost_param_no_spec_result\_ ## __LINE__ ## **name** = **result**;
|
|
|
|
// If **result** is a simple return type:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
struct boost_param_no_spec_result\_ ## __LINE__ ## **name**
|
|
{
|
|
typedef **result** type;
|
|
};
|
|
|
|
template <typename ResultType, typename Args>
|
|
ResultType
|
|
boost_param_no_spec_impl ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
);
|
|
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
inline typename boost::`lazy_enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
, boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>
|
|
>::type
|
|
**name**\ (TaggedArg0 const& arg0, TaggedArgs const&... args)
|
|
{
|
|
return boost_param_no_spec_impl ## __LINE__ ## **name**\ (
|
|
static_cast<
|
|
typename
|
|
boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>::type(\*)()
|
|
>(`nullptr`_)
|
|
, |compose|_(arg0, args...)
|
|
);
|
|
}
|
|
|
|
template <typename ResultType, typename Args>
|
|
ResultType
|
|
boost_param_no_spec_impl ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
)
|
|
</pre>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-member-function-result-name">
|
|
<h2><a class="toc-backref" href="#id1112">7.13 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION(result, name)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a member function that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5390)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>When designing a front-end class template whose back-end is configurable via
|
|
parameterized inheritance, it can be useful to omit argument specifiers from
|
|
a named-parameter member function so that the delegate member functions of the
|
|
back-end classes can enforce their own specifications.</p>
|
|
<pre class="literal-block">
|
|
template <typename B>
|
|
struct frontend : B
|
|
{
|
|
frontend() : B()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION((void), initialize)
|
|
{
|
|
this->initialize_impl(args);
|
|
}
|
|
};
|
|
</pre>
|
|
<p>Named parameters are required when invoking the member function; however, none
|
|
of their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id713"><span class="problematic" id="id714">|</span></a>BOOST_PARAMETER_NAME|_(a0)
|
|
<a href="#id715"><span class="problematic" id="id716">|</span></a>BOOST_PARAMETER_NAME|_(a1)
|
|
<a href="#id717"><span class="problematic" id="id718">|</span></a>BOOST_PARAMETER_NAME|_(a2)
|
|
</pre>
|
|
<div class="system-message" id="id713">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5413); <em><a href="#id714">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id715">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5413); <em><a href="#id716">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id717">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5413); <em><a href="#id718">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>For this example, each of the back-end class templates requires its own
|
|
parameter to be present in the argument pack. In practice, such parameters
|
|
should be optional, with default values.</p>
|
|
<pre class="literal-block">
|
|
template <typename T>
|
|
class backend0
|
|
{
|
|
T a0;
|
|
|
|
public:
|
|
backend0() : a0()
|
|
{
|
|
}
|
|
|
|
T const& get_a0() const
|
|
{
|
|
return this->a0;
|
|
}
|
|
|
|
protected:
|
|
template <typename ArgPack>
|
|
void initialize_impl(ArgPack const& args)
|
|
{
|
|
this->a0 = args[_a0];
|
|
}
|
|
};
|
|
|
|
template <typename B, typename T>
|
|
class backend1 : public B
|
|
{
|
|
T a1;
|
|
|
|
public:
|
|
backend1() : B(), a1()
|
|
{
|
|
}
|
|
|
|
T const& get_a1() const
|
|
{
|
|
return this->a1;
|
|
}
|
|
|
|
protected:
|
|
template <typename ArgPack>
|
|
void initialize_impl(ArgPack const& args)
|
|
{
|
|
B::initialize_impl(args);
|
|
this->a1 = args[_a1];
|
|
}
|
|
};
|
|
|
|
template <typename B, typename T>
|
|
class backend2 : public B
|
|
{
|
|
T a2;
|
|
|
|
public:
|
|
backend2() : B(), a2()
|
|
{
|
|
}
|
|
|
|
T const& get_a2() const
|
|
{
|
|
return this->a2;
|
|
}
|
|
|
|
protected:
|
|
template <typename ArgPack>
|
|
void initialize_impl(ArgPack const& args)
|
|
{
|
|
B::initialize_impl(args);
|
|
this->a2 = args[_a2];
|
|
}
|
|
};
|
|
</pre>
|
|
<p>This example shows that while <tt class="docutils literal">backend0</tt> must always be the root base class
|
|
template and that <tt class="docutils literal">frontend</tt> must always be the most derived class template,
|
|
the other back-ends can be chained together in different orders.</p>
|
|
<pre class="literal-block">
|
|
char const* p = "foo";
|
|
frontend<
|
|
backend2<backend1<backend0<char const*>, char>, int>
|
|
> composed_obj0;
|
|
frontend<
|
|
backend1<backend2<backend0<char const*>, int>, char>
|
|
> composed_obj1;
|
|
composed_obj0.initialize(_a2 = 4, _a1 = ' ', _a0 = p);
|
|
composed_obj1.initialize(_a0 = p, _a1 = ' ', _a2 = 4);
|
|
BOOST_TEST_EQ(composed_obj0.get_a0(), composed_obj1.get_a0());
|
|
BOOST_TEST_EQ(composed_obj0.get_a1(), composed_obj1.get_a1());
|
|
BOOST_TEST_EQ(composed_obj0.get_a2(), composed_obj1.get_a2());
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/parameterized_inheritance.cpp">parameterized_inheritance.cpp</a> and <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test programs
|
|
demonstrate proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5520)</p>
|
|
Duplicate substitution definition name: "preproc_eval_cat_no_spec".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5524)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated implementation function. <tt class="docutils literal">name</tt> may be qualified by the
|
|
<tt class="docutils literal">static</tt> keyword to declare the member function and its helpers as not
|
|
associated with any object of the enclosing type.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5531)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
|
|
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
|
|
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
using boost_param_no_spec_result\_ ## __LINE__ ## **name** = **result**;
|
|
|
|
// If **result** is a simple return type:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
struct boost_param_no_spec_result\_ ## __LINE__ ## **name**
|
|
{
|
|
typedef **result** type;
|
|
};
|
|
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
inline typename boost::`lazy_enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
, boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>
|
|
>::type
|
|
**name**\ (TaggedArg0 const& arg0, TaggedArgs const&... args)
|
|
{
|
|
return this->boost_param_no_spec_impl ## __LINE__ ## **name**\ (
|
|
static_cast<
|
|
typename
|
|
boost_param_no_spec_result\_ ## __LINE__ ## **name**\ <
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>::type(\*)()
|
|
>(`nullptr`_)
|
|
, |compose|_(arg0, args...)
|
|
);
|
|
}
|
|
|
|
template <typename ResultType, typename Args>
|
|
ResultType
|
|
boost_param_no_spec_impl ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
)
|
|
</pre>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-const-member-function-result-name">
|
|
<h2><a class="toc-backref" href="#id1113">7.14 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION(result, name)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a member function that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5602)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id731"><span class="problematic" id="id732">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id733"><span class="problematic" id="id734">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id735"><span class="problematic" id="id736">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id737"><span class="problematic" id="id738">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id739"><span class="problematic" id="id740">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id741"><span class="problematic" id="id742">`</span></a>bitset`_<N + 1> lset = std::<a href="#id743"><span class="problematic" id="id744">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id745"><span class="problematic" id="id746">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id747"><span class="problematic" id="id748">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id749"><span class="problematic" id="id750">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id731">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id732">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id733">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id734">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id735">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id736">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id737">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id738">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id739">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id740">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id741">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id742">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id743">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id744">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id745">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id746">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id747">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id748">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id749">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5605); <em><a href="#id750">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id751"><span class="problematic" id="id752">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id753"><span class="problematic" id="id754">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id755"><span class="problematic" id="id756">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id757"><span class="problematic" id="id758">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id751">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5638); <em><a href="#id752">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id753">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5638); <em><a href="#id754">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id755">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5638); <em><a href="#id756">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id757">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5638); <em><a href="#id758">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Named parameters are required when invoking the member function; however, none
|
|
of their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id759"><span class="problematic" id="id760">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|
|
<a href="#id761"><span class="problematic" id="id762">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|
|
<a href="#id763"><span class="problematic" id="id764">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|
|
<a href="#id765"><span class="problematic" id="id766">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id759">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5678); <em><a href="#id760">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id761">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5678); <em><a href="#id762">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id763">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5678); <em><a href="#id764">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id765">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5678); <em><a href="#id766">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a variadic function header. Enclose the
|
|
return type <tt class="docutils literal">bool</tt> in parentheses. The macro will qualify the function with
|
|
the <tt class="docutils literal">const</tt> keyword.</p>
|
|
<pre class="literal-block">
|
|
struct D
|
|
{
|
|
D()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION((bool), evaluate_m)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(
|
|
args[_rr | rvalue_bitset<3>()]
|
|
)
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<p>To invoke the member function, bind all its arguments to named parameters.</p>
|
|
<pre class="literal-block">
|
|
D const d = D();
|
|
d.evaluate_m(
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
d.evaluate_m(
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test program demonstrates proper usage of this
|
|
macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5744)</p>
|
|
Duplicate substitution definition name: "preproc_eval_cat_no_spec".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5748)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function.
|
|
*. <tt class="docutils literal">name</tt> is the base name of the function; it determines the name of the
|
|
generated implementation function.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5753)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
|
|
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
|
|
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
using boost_param_no_spec_result_const\_ ## __LINE__ ## **name** = **result**;
|
|
|
|
// If **result** is a simple return type:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
struct boost_param_no_spec_result_const\_ ## __LINE__ ## **name**
|
|
{
|
|
typedef **result** type;
|
|
};
|
|
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
inline typename boost::`lazy_enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
, boost_param_no_spec_result_const\_ ## __LINE__ ## **name**\ <
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>
|
|
>::type
|
|
**name**\ (TaggedArg0 const& arg0, TaggedArgs const&... args) const
|
|
{
|
|
return this->boost_param_no_spec_impl_const ## __LINE__ ## **name**\ (
|
|
static_cast<
|
|
typename
|
|
boost_param_no_spec_result_const\_ ## __LINE__ ## **name**\ <
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>::type(\*)()
|
|
>(`nullptr`_)
|
|
, |compose|_(arg0, args...)
|
|
);
|
|
}
|
|
|
|
template <typename ResultType, typename Args>
|
|
ResultType
|
|
boost_param_no_spec_impl_const ## __LINE__ ## **name**\ (
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
) const
|
|
</pre>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-function-call-operator-result">
|
|
<h2><a class="toc-backref" href="#id1114">7.15 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR(result)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function call operator that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5824)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>When designing a front-end class template whose back-end is configurable via
|
|
parameterized inheritance, it can be useful to omit argument specifiers from
|
|
a named-parameter function call operator so that the delegate member functions
|
|
of the back-end classes can enforce their own specifications.</p>
|
|
<pre class="literal-block">
|
|
template <typename B>
|
|
struct frontend : B
|
|
{
|
|
frontend() : B()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR((void))
|
|
{
|
|
this->initialize_impl(args);
|
|
}
|
|
};
|
|
</pre>
|
|
<p>Named parameters are required when invoking the function call operator;
|
|
however, none of their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id780"><span class="problematic" id="id781">|</span></a>BOOST_PARAMETER_NAME|_(a0)
|
|
<a href="#id782"><span class="problematic" id="id783">|</span></a>BOOST_PARAMETER_NAME|_(a1)
|
|
<a href="#id784"><span class="problematic" id="id785">|</span></a>BOOST_PARAMETER_NAME|_(a2)
|
|
</pre>
|
|
<div class="system-message" id="id780">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5847); <em><a href="#id781">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id782">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5847); <em><a href="#id783">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id784">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5847); <em><a href="#id785">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>For this example, each of the back-end class templates requires its own
|
|
parameter to be present in the argument pack. In practice, such parameters
|
|
should be optional, with default values.</p>
|
|
<pre class="literal-block">
|
|
template <typename T>
|
|
class backend0
|
|
{
|
|
T a0;
|
|
|
|
public:
|
|
backend0() : a0()
|
|
{
|
|
}
|
|
|
|
T const& get_a0() const
|
|
{
|
|
return this->a0;
|
|
}
|
|
|
|
protected:
|
|
template <typename ArgPack>
|
|
void initialize_impl(ArgPack const& args)
|
|
{
|
|
this->a0 = args[_a0];
|
|
}
|
|
};
|
|
|
|
template <typename B, typename T>
|
|
class backend1 : public B
|
|
{
|
|
T a1;
|
|
|
|
public:
|
|
backend1() : B(), a1()
|
|
{
|
|
}
|
|
|
|
T const& get_a1() const
|
|
{
|
|
return this->a1;
|
|
}
|
|
|
|
protected:
|
|
template <typename ArgPack>
|
|
void initialize_impl(ArgPack const& args)
|
|
{
|
|
B::initialize_impl(args);
|
|
this->a1 = args[_a1];
|
|
}
|
|
};
|
|
|
|
template <typename B, typename T>
|
|
class backend2 : public B
|
|
{
|
|
T a2;
|
|
|
|
public:
|
|
backend2() : B(), a2()
|
|
{
|
|
}
|
|
|
|
T const& get_a2() const
|
|
{
|
|
return this->a2;
|
|
}
|
|
|
|
protected:
|
|
template <typename ArgPack>
|
|
void initialize_impl(ArgPack const& args)
|
|
{
|
|
B::initialize_impl(args);
|
|
this->a2 = args[_a2];
|
|
}
|
|
};
|
|
</pre>
|
|
<p>This example shows that while <tt class="docutils literal">backend0</tt> must always be the root base class
|
|
template and that <tt class="docutils literal">frontend</tt> must always be the most derived class template,
|
|
the other back-ends can be chained together in different orders.</p>
|
|
<pre class="literal-block">
|
|
char const* p = "foo";
|
|
frontend<
|
|
backend2<backend1<backend0<char const*>, char>, int>
|
|
> composed_obj0;
|
|
frontend<
|
|
backend1<backend2<backend0<char const*>, int>, char>
|
|
> composed_obj1;
|
|
composed_obj0(_a2 = 4, _a1 = ' ', _a0 = p);
|
|
composed_obj1(_a0 = p, _a1 = ' ', _a2 = 4);
|
|
BOOST_TEST_EQ(composed_obj0.get_a0(), composed_obj1.get_a0());
|
|
BOOST_TEST_EQ(composed_obj0.get_a1(), composed_obj1.get_a1());
|
|
BOOST_TEST_EQ(composed_obj0.get_a2(), composed_obj1.get_a2());
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/parameterized_inheritance.cpp">parameterized_inheritance.cpp</a> and <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test programs
|
|
demonstrate proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5952)</p>
|
|
Duplicate substitution definition name: "parameterized_inheritance".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5954)</p>
|
|
Duplicate substitution definition name: "preproc_eval_cat_no_spec".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5958)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function call operator.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 5961)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
|
|
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
|
|
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
using boost_param_no_spec_result\_ ## __LINE__ ## operator = **result**;
|
|
|
|
// If **result** is a simple return type:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
struct boost_param_no_spec_result\_ ## __LINE__ ## operator
|
|
{
|
|
typedef **result** type;
|
|
};
|
|
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
inline typename boost::`lazy_enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
, boost_param_no_spec_result\_ ## __LINE__ ## operator<
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>
|
|
>::type
|
|
operator()(TaggedArg0 const& arg0, TaggedArgs const&... args)
|
|
{
|
|
return this->boost_param_no_spec_impl ## __LINE__ ## operator(
|
|
static_cast<
|
|
typename
|
|
boost_param_no_spec_result\_ ## __LINE__ ## operator<
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>::type(\*)()
|
|
>(`nullptr`_)
|
|
, |compose|_(arg0, args...)
|
|
);
|
|
}
|
|
|
|
template <typename ResultType, typename Args>
|
|
ResultType
|
|
boost_param_no_spec_impl ## __LINE__ ## operator(
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
)
|
|
</pre>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-const-function-call-operator-result">
|
|
<h2><a class="toc-backref" href="#id1115">7.16 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR(result)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a function call operator that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6032)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id799"><span class="problematic" id="id800">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id801"><span class="problematic" id="id802">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id803"><span class="problematic" id="id804">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id805"><span class="problematic" id="id806">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id807"><span class="problematic" id="id808">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id809"><span class="problematic" id="id810">`</span></a>bitset`_<N + 1> lset = std::<a href="#id811"><span class="problematic" id="id812">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id813"><span class="problematic" id="id814">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id815"><span class="problematic" id="id816">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id817"><span class="problematic" id="id818">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id799">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id800">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id801">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id802">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id803">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id804">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id805">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id806">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id807">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id808">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id809">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id810">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id811">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id812">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id813">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id814">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id815">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id816">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id817">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6035); <em><a href="#id818">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id819"><span class="problematic" id="id820">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id821"><span class="problematic" id="id822">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id823"><span class="problematic" id="id824">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id825"><span class="problematic" id="id826">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id819">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6068); <em><a href="#id820">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id821">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6068); <em><a href="#id822">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id823">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6068); <em><a href="#id824">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id825">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6068); <em><a href="#id826">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Named parameters are required when invoking the function call operator;
|
|
however, none of their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id827"><span class="problematic" id="id828">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|
|
<a href="#id829"><span class="problematic" id="id830">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|
|
<a href="#id831"><span class="problematic" id="id832">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|
|
<a href="#id833"><span class="problematic" id="id834">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id827">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6108); <em><a href="#id828">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id829">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6108); <em><a href="#id830">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id831">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6108); <em><a href="#id832">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id833">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6108); <em><a href="#id834">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Use the macro as a substitute for a variadic function call operator
|
|
header. Enclose the return type <tt class="docutils literal">bool</tt> in parentheses. The macro will
|
|
qualify the function with the <tt class="docutils literal">const</tt> keyword.</p>
|
|
<pre class="literal-block">
|
|
struct D
|
|
{
|
|
D()
|
|
{
|
|
}
|
|
|
|
BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR((bool))
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(
|
|
args[_rr | rvalue_bitset<3>()]
|
|
)
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<p>To invoke the function call operator, bind all its arguments to named
|
|
parameters.</p>
|
|
<pre class="literal-block">
|
|
D const d = D();
|
|
d(
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
d(
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test program demonstrates proper usage of this
|
|
macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6175)</p>
|
|
Duplicate substitution definition name: "preproc_eval_cat_no_spec".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6179)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">result</tt> is the parenthesized return type of the function call operator.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6182)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
// If **result** is a template instantiation of `enable_if`_, `enable_if_c`_,
|
|
// `lazy_enable_if`_, `lazy_enable_if_c`_, `disable_if`_, `disable_if_c`_,
|
|
// `lazy_disable_if`_, `lazy_disable_if_c`_, or `std_enable_if`_:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
using boost_param_no_spec_result_const\_ ## __LINE__ ## operator = **result**;
|
|
|
|
// If **result** is a simple return type:
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
struct boost_param_no_spec_result_const\_ ## __LINE__ ## operator
|
|
{
|
|
typedef **result** type;
|
|
};
|
|
|
|
template <typename TaggedArg0, typename ...TaggedArgs>
|
|
inline typename boost::`lazy_enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
, boost_param_no_spec_result_const\_ ## __LINE__ ## operator<
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>
|
|
>::type
|
|
operator()(
|
|
TaggedArg0 const& arg0
|
|
, TaggedArgs const&... args
|
|
) const
|
|
{
|
|
return this->boost_param_no_spec_impl_const ## __LINE__ ## operator(
|
|
static_cast<
|
|
typename
|
|
boost_param_no_spec_result_const\_ ## __LINE__ ## operator<
|
|
TaggedArg0
|
|
, TaggedArgs...
|
|
>::type(\*)()
|
|
>(`nullptr`_)
|
|
, |compose|_(arg0, args...)
|
|
);
|
|
}
|
|
|
|
template <typename ResultType, typename Args>
|
|
ResultType
|
|
boost_param_no_spec_impl_const ## __LINE__ ## operator(
|
|
(ResultType(\*)())
|
|
, Args const& args
|
|
) const
|
|
</pre>
|
|
<p>Only the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> type <tt class="docutils literal">Args</tt> and its object instance <tt class="docutils literal">args</tt> are
|
|
available for use within the function body.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-constructor-cls-impl">
|
|
<h2><a class="toc-backref" href="#id1116">7.17 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR(cls, impl)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a constructor that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6256)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>When designing a front-end class template whose back-end is configurable via
|
|
parameterized inheritance, it can be useful to omit argument specifiers from
|
|
a named-parameter constructor so that the delegate constructors of the
|
|
back-end classes can enforce their own specifications.</p>
|
|
<pre class="literal-block">
|
|
template <typename B>
|
|
struct frontend : B
|
|
{
|
|
BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR(frontend, (B))
|
|
};
|
|
</pre>
|
|
<p>Named parameters are required when invoking the constructor; however, none of
|
|
their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id848"><span class="problematic" id="id849">|</span></a>BOOST_PARAMETER_NAME|_(a0)
|
|
<a href="#id850"><span class="problematic" id="id851">|</span></a>BOOST_PARAMETER_NAME|_(a1)
|
|
<a href="#id852"><span class="problematic" id="id853">|</span></a>BOOST_PARAMETER_NAME|_(a2)
|
|
</pre>
|
|
<div class="system-message" id="id848">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6272); <em><a href="#id849">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id850">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6272); <em><a href="#id851">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id852">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6272); <em><a href="#id853">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>For this example, each of the back-end class templates requires its own
|
|
parameter to be present in the argument pack. In practice, such parameters
|
|
should be optional, with default values.</p>
|
|
<pre class="literal-block">
|
|
struct _enabler
|
|
{
|
|
};
|
|
|
|
template <typename T>
|
|
class backend0
|
|
{
|
|
T a0;
|
|
|
|
public:
|
|
template <typename ArgPack>
|
|
explicit backend0(
|
|
ArgPack const& args
|
|
, typename boost::<a href="#id854"><span class="problematic" id="id855">`</span></a>enable_if`_<
|
|
<a href="#id856"><span class="problematic" id="id857">|</span></a>is_argument_pack|_<ArgPack>
|
|
, _enabler
|
|
>::type = _enabler()
|
|
) : a0(args[_a0])
|
|
{
|
|
}
|
|
|
|
T const& get_a0() const
|
|
{
|
|
return this->a0;
|
|
}
|
|
};
|
|
|
|
template <typename B, typename T>
|
|
class backend1 : public B
|
|
{
|
|
T a1;
|
|
|
|
public:
|
|
template <typename ArgPack>
|
|
explicit backend1(
|
|
ArgPack const& args
|
|
, typename boost::<a href="#id858"><span class="problematic" id="id859">`</span></a>enable_if`_<
|
|
<a href="#id860"><span class="problematic" id="id861">|</span></a>is_argument_pack|_<ArgPack>
|
|
, _enabler
|
|
>::type = _enabler()
|
|
) : B(args), a1(args[_a1])
|
|
{
|
|
}
|
|
|
|
T const& get_a1() const
|
|
{
|
|
return this->a1;
|
|
}
|
|
};
|
|
|
|
template <typename B, typename T>
|
|
class backend2 : public B
|
|
{
|
|
T a2;
|
|
|
|
public:
|
|
template <typename ArgPack>
|
|
explicit backend2(
|
|
ArgPack const& args
|
|
, typename boost::<a href="#id862"><span class="problematic" id="id863">`</span></a>enable_if`_<
|
|
<a href="#id864"><span class="problematic" id="id865">|</span></a>is_argument_pack|_<ArgPack>
|
|
, _enabler
|
|
>::type = _enabler()
|
|
) : B(args), a2(args[_a2])
|
|
{
|
|
}
|
|
|
|
T const& get_a2() const
|
|
{
|
|
return this->a2;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id854">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6282); <em><a href="#id855">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id856">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6282); <em><a href="#id857">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id858">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6282); <em><a href="#id859">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id860">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6282); <em><a href="#id861">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id862">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6282); <em><a href="#id863">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id864">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6282); <em><a href="#id865">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>This example shows that while <tt class="docutils literal">backend0</tt> must always be the root base class
|
|
template and that <tt class="docutils literal">frontend</tt> must always be the most derived class template,
|
|
the other back-ends can be chained together in different orders.</p>
|
|
<pre class="literal-block">
|
|
char const* p = "foo";
|
|
frontend<
|
|
backend2<backend1<backend0<char const*>, char>, int>
|
|
> composed_obj0(_a2 = 4, _a1 = ' ', _a0 = p);
|
|
frontend<
|
|
backend1<backend2<backend0<char const*>, int>, char>
|
|
> composed_obj1(_a0 = p, _a1 = ' ', _a2 = 4);
|
|
BOOST_TEST_EQ(composed_obj0.get_a0(), composed_obj1.get_a0());
|
|
BOOST_TEST_EQ(composed_obj0.get_a1(), composed_obj1.get_a1());
|
|
BOOST_TEST_EQ(composed_obj0.get_a2(), composed_obj1.get_a2());
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/parameterized_inheritance.cpp">parameterized_inheritance.cpp</a> and <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test programs
|
|
demonstrate proper usage of this macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6377)</p>
|
|
Duplicate substitution definition name: "parameterized_inheritance".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6379)</p>
|
|
Duplicate substitution definition name: "preproc_eval_cat_no_spec".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6383)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">cls</tt> is the name of the enclosing class.
|
|
*. <tt class="docutils literal">impl</tt> is the parenthesized implementation base class for <tt class="docutils literal">cls</tt>.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6387)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
template <
|
|
typename TaggedArg0
|
|
, typename ...TaggedArgs
|
|
, typename = typename boost::`enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
>::type
|
|
>
|
|
inline explicit **cls**\ (
|
|
TaggedArg0 const& arg0
|
|
, TaggedArgs const&... args
|
|
) : **impl**\ (|compose|_(arg0, args...))
|
|
{
|
|
}
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="boost-parameter-no-spec-no-base-constructor-cls-impl">
|
|
<h2><a class="toc-backref" href="#id1117">7.18 <tt class="docutils literal">BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR(cls, impl)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/preprocessor_no_spec.hpp">boost/parameter/preprocessor_no_spec.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Generates a constructor that can take in named arguments.</p>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6416)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>The return type of each of the following function templates falls under a
|
|
different value category.</p>
|
|
<pre class="literal-block">
|
|
template <std::size_t N>
|
|
std::<a href="#id869"><span class="problematic" id="id870">`</span></a>bitset`_<N + 1> rvalue_bitset()
|
|
{
|
|
return std::<a href="#id871"><span class="problematic" id="id872">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id873"><span class="problematic" id="id874">`</span></a>bitset`_<N + 1> const rvalue_const_bitset()
|
|
{
|
|
return std::<a href="#id875"><span class="problematic" id="id876">`</span></a>bitset`_<N + 1>();
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id877"><span class="problematic" id="id878">`</span></a>bitset`_<N + 1>& lvalue_bitset()
|
|
{
|
|
static std::<a href="#id879"><span class="problematic" id="id880">`</span></a>bitset`_<N + 1> lset = std::<a href="#id881"><span class="problematic" id="id882">`</span></a>bitset`_<N + 1>();
|
|
return lset;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
std::<a href="#id883"><span class="problematic" id="id884">`</span></a>bitset`_<N + 1> const& lvalue_const_bitset()
|
|
{
|
|
static std::<a href="#id885"><span class="problematic" id="id886">`</span></a>bitset`_<N + 1> const clset = std::<a href="#id887"><span class="problematic" id="id888">`</span></a>bitset`_<N + 1>();
|
|
return clset;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id869">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id870">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id871">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id872">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id873">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id874">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id875">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id876">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id877">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id878">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id879">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id880">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id881">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id882">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id883">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id884">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id885">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id886">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id887">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6419); <em><a href="#id888">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">U::evaluate_category</span></tt> static member function template has a simple job:
|
|
to return the correct value category when passed in an object returned by one
|
|
of the functions defined above. Assume that
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined.</p>
|
|
<pre class="literal-block">
|
|
enum invoked
|
|
{
|
|
passed_by_lvalue_reference_to_const
|
|
, passed_by_lvalue_reference
|
|
, passed_by_rvalue_reference_to_const
|
|
, passed_by_rvalue_reference
|
|
};
|
|
|
|
struct U
|
|
{
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id889"><span class="problematic" id="id890">`</span></a>bitset`_<N + 1> const&)
|
|
{
|
|
return passed_by_lvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id891"><span class="problematic" id="id892">`</span></a>bitset`_<N + 1>&)
|
|
{
|
|
return passed_by_lvalue_reference;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id893"><span class="problematic" id="id894">`</span></a>bitset`_<N + 1> const&&)
|
|
{
|
|
return passed_by_rvalue_reference_to_const;
|
|
}
|
|
|
|
template <std::size_t N>
|
|
static invoked evaluate_category(std::<a href="#id895"><span class="problematic" id="id896">`</span></a>bitset`_<N + 1>&&)
|
|
{
|
|
return passed_by_rvalue_reference;
|
|
}
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id889">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6452); <em><a href="#id890">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id891">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6452); <em><a href="#id892">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id893">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6452); <em><a href="#id894">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id895">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6452); <em><a href="#id896">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>Named parameters are required when invoking the constructor; however, none of
|
|
their tags need to be in the same namespace.</p>
|
|
<pre class="literal-block">
|
|
<a href="#id897"><span class="problematic" id="id898">|</span></a>BOOST_PARAMETER_NAME|_((_lrc, kw0) in(lrc))
|
|
<a href="#id899"><span class="problematic" id="id900">|</span></a>BOOST_PARAMETER_NAME|_((_lr, kw1) in_out(lr))
|
|
<a href="#id901"><span class="problematic" id="id902">|</span></a>BOOST_PARAMETER_NAME|_((_rrc, kw2) in(rrc))
|
|
<a href="#id903"><span class="problematic" id="id904">|</span></a>BOOST_PARAMETER_NAME|_((_rr, kw3) consume(rr))
|
|
</pre>
|
|
<div class="system-message" id="id897">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6492); <em><a href="#id898">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id899">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6492); <em><a href="#id900">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id901">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6492); <em><a href="#id902">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id903">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6492); <em><a href="#id904">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>Unlike <a href="#id1028"><span class="problematic" id="id1029">|BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|</span></a>, this macro doesn't require a
|
|
base class, only a delegate function to which the generated constructor can
|
|
pass its <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a>.</p>
|
|
<pre class="literal-block">
|
|
struct D
|
|
{
|
|
BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR(D, D::_evaluate)
|
|
|
|
private:
|
|
template <typename Args>
|
|
static bool _evaluate(Args const& args)
|
|
{
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference_to_const
|
|
, U::evaluate_category<0>(args[_lrc])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_lvalue_reference
|
|
, U::evaluate_category<1>(args[_lr])
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference_to_const
|
|
, U::evaluate_category<2>(
|
|
args[_rrc | rvalue_const_bitset<2>()]
|
|
)
|
|
);
|
|
BOOST_TEST_EQ(
|
|
passed_by_rvalue_reference
|
|
, U::evaluate_category<3>(
|
|
args[_rr | rvalue_bitset<3>()]
|
|
)
|
|
);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
</pre>
|
|
<p>To invoke the constructor, bind all its arguments to named parameters.</p>
|
|
<pre class="literal-block">
|
|
D dp0(
|
|
_rr0 = rvalue_bitset<3>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
, _lr0 = lvalue_bitset<1>()
|
|
, _rrc0 = rvalue_const_bitset<2>()
|
|
);
|
|
D dp1(
|
|
_lr0 = lvalue_bitset<1>()
|
|
, _lrc0 = lvalue_const_bitset<0>()
|
|
);
|
|
</pre>
|
|
<p>The <a class="reference external" href="../../test/preprocessor_eval_cat_no_spec.cpp">preprocessor_eval_cat_no_spec.cpp</a> test program demonstrates proper usage of this
|
|
macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6557)</p>
|
|
Duplicate substitution definition name: "preproc_eval_cat_no_spec".</div>
|
|
<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" colspan="2">Macro parameters:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6561)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>*. <tt class="docutils literal">cls</tt> is the name of the enclosing class.
|
|
*. <tt class="docutils literal">func</tt> is a function that takes in the <a class="reference internal" href="#argumentpack"><span class="concept">ArgumentPack</span></a> that the
|
|
generated constructor passes on.</p>
|
|
<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" colspan="2">Argument specifiers syntax:</th></tr>
|
|
<tr class="field"><td> </td><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6566)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>None.</p>
|
|
<p>Approximate expansion:
|
|
.. parsed-literal:</p>
|
|
<pre class="literal-block">
|
|
template <
|
|
typename TaggedArg0
|
|
, typename ...TaggedArgs
|
|
, typename = typename boost::`enable_if`_<
|
|
|are_tagged_arguments|_<TaggedArg0,TaggedArgs...>
|
|
>::type
|
|
>
|
|
inline explicit **cls**\ (
|
|
TaggedArg0 const& arg0
|
|
, TaggedArgs const&... args
|
|
)
|
|
{
|
|
**func**\ (|compose|_(arg0, args...));
|
|
}
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="boost-parameter-name-name">
|
|
<h2><a class="toc-backref" href="#id1118">7.19 <tt class="docutils literal">BOOST_PARAMETER_NAME(name)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/name.hpp">boost/parameter/name.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Declares a tag-type and keyword object.</p>
|
|
<p><strong>If</strong> <em>name</em> is of the form:</p>
|
|
<pre class="literal-block">
|
|
(<em>object-name</em>, <em>namespace-name</em>) <em>qualifier</em>(<em>tag-name</em>)
|
|
</pre>
|
|
<p><strong>then</strong></p>
|
|
<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">Requires:</th><td class="field-body"><em>qualifier</em> is either <tt class="docutils literal">in</tt>, <tt class="docutils literal">out</tt>, <tt class="docutils literal">in_out</tt>, <tt class="docutils literal">consume</tt>,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6604)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">move_from</tt>, or <tt class="docutils literal">forward</tt>.</p>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
namespace <em>namespace-name</em> {
|
|
|
|
struct <em>tag-name</em>
|
|
{
|
|
static constexpr char const* keyword_name()
|
|
{
|
|
return ## <em>tag-name</em>;
|
|
}
|
|
|
|
typedef <em>unspecified</em> _;
|
|
typedef <em>unspecified</em> _1;
|
|
typedef boost::parameter::<em>qualifier</em> ## _reference qualifier;
|
|
|
|
// The following definitions are available only when
|
|
// <a class="reference internal" href="#boost-parameter-can-use-mp11"><tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt></a> is defined.
|
|
|
|
template <typename ArgumentPack>
|
|
using binding_fn = typename <a href="#id908"><span class="problematic" id="id909">|</span></a>binding|_<
|
|
ArgumentPack
|
|
, <em>tag-name</em>
|
|
>::type;
|
|
|
|
template <typename ArgumentPack>
|
|
using fn = typename <a href="#id910"><span class="problematic" id="id911">|</span></a>value_type|_<ArgumentPack, <em>tag-name</em>>::type;
|
|
};
|
|
}
|
|
|
|
<a href="#id912"><span class="problematic" id="id913">|</span></a>keyword|_<<em>tag-namespace</em>::<em>tag-name</em>> const& <em>object-name</em>
|
|
= <a href="#id914"><span class="problematic" id="id915">|</span></a>keyword|_<<em>tag-namespace</em>::<em>tag-name</em>>::instance;
|
|
</pre>
|
|
<div class="system-message" id="id908">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6608); <em><a href="#id909">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id910">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6608); <em><a href="#id911">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id912">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6608); <em><a href="#id913">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id914">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6608); <em><a href="#id915">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p><strong>Else If</strong> <em>name</em> is of the form:</p>
|
|
<pre class="literal-block">
|
|
(<em>tag-name</em>, <em>namespace-name</em>) <em>object-name</em>
|
|
</pre>
|
|
<p><strong>then</strong></p>
|
|
<p>Treats <em>name</em> as if it were of the form:</p>
|
|
<pre class="literal-block">
|
|
(forward(<em>tag-name</em>), <em>namespace-name</em>) <em>object-name</em>
|
|
</pre>
|
|
<p><strong>Else If</strong> <em>name</em> is of the form:</p>
|
|
<pre class="literal-block">
|
|
<em>qualifier</em>(<em>tag-name</em>)
|
|
</pre>
|
|
<p><strong>then</strong></p>
|
|
<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">Requires:</th><td class="field-body"><em>qualifier</em> is either <tt class="docutils literal">in</tt>, <tt class="docutils literal">out</tt>, <tt class="docutils literal">in_out</tt>, <tt class="docutils literal">consume</tt>,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6663)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">move_from</tt>, or <tt class="docutils literal">forward</tt>.</p>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
namespace tag {
|
|
|
|
struct <em>tag-name</em>
|
|
{
|
|
static constexpr char const* keyword_name()
|
|
{
|
|
return ## <em>tag-name</em>;
|
|
}
|
|
|
|
typedef <em>unspecified</em> _;
|
|
typedef <em>unspecified</em> _1;
|
|
typedef boost::parameter::<em>qualifier</em> ## _reference qualifier;
|
|
|
|
// The following definitions are available only when
|
|
// <a class="reference internal" href="#boost-parameter-can-use-mp11"><tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt></a> is defined.
|
|
|
|
template <typename ArgumentPack>
|
|
using binding_fn = typename <a href="#id916"><span class="problematic" id="id917">|</span></a>binding|_<
|
|
ArgumentPack
|
|
, <em>tag-name</em>
|
|
>::type;
|
|
|
|
template <typename ArgumentPack>
|
|
using fn = typename <a href="#id918"><span class="problematic" id="id919">|</span></a>value_type|_<ArgumentPack, <em>tag-name</em>>::type;
|
|
};
|
|
}
|
|
|
|
<a href="#id920"><span class="problematic" id="id921">|</span></a>keyword|_<tag::<em>tag-name</em>> const& _ ## <em>tag-name</em>
|
|
= <a href="#id922"><span class="problematic" id="id923">|</span></a>keyword|_<tag::<em>tag-name</em>>::instance;
|
|
</pre>
|
|
<div class="system-message" id="id916">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6667); <em><a href="#id917">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id918">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6667); <em><a href="#id919">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id920">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6667); <em><a href="#id921">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id922">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6667); <em><a href="#id923">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p><strong>Else</strong></p>
|
|
<p>Treats <em>name</em> as if it were of the form:</p>
|
|
<pre class="literal-block">
|
|
forward(<em>tag-name</em>)
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="boost-parameter-nested-keyword-tag-namespace-name-alias">
|
|
<h2><a class="toc-backref" href="#id1119">7.20 <tt class="docutils literal">BOOST_PARAMETER_NESTED_KEYWORD(tag_namespace, name, alias)</tt></a></h2>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6708)</p>
|
|
<p>Title underline too short.</p>
|
|
<pre class="literal-block">
|
|
``BOOST_PARAMETER_NESTED_KEYWORD(tag_namespace, name, alias)``
|
|
------------------------------------------
|
|
</pre>
|
|
</div>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/nested_keyword.hpp">boost/parameter/nested_keyword.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Declares a tag-type, a keyword object, and an alias for that object nested in
|
|
the tag-type.</p>
|
|
<p><strong>If</strong> <em>name</em> is of the form:</p>
|
|
<pre class="literal-block">
|
|
<em>qualifier</em>(<em>tag-name</em>)
|
|
</pre>
|
|
<p><strong>then</strong></p>
|
|
<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">Requires:</th><td class="field-body"><em>qualifier</em> is either <tt class="docutils literal">in</tt>, <tt class="docutils literal">out</tt>, <tt class="docutils literal">in_out</tt>, <tt class="docutils literal">consume</tt>,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6726)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p><tt class="docutils literal">move_from</tt>, or <tt class="docutils literal">forward</tt>.</p>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
namespace tag {
|
|
|
|
struct <em>tag-name</em>
|
|
{
|
|
static constexpr char const* keyword_name()
|
|
{
|
|
return ## <em>tag-name</em> ## _;
|
|
}
|
|
|
|
typedef <em>unspecified</em> _;
|
|
typedef <em>unspecified</em> _1;
|
|
typedef boost::parameter::<em>qualifier</em> ## _reference qualifier;
|
|
static <a href="#id1227"><span class="problematic" id="id1228">|keyword|_<*tag-name*> const& *alias*;
|
|
|
|
// The following definitions are available only when
|
|
// |BOOST_PARAMETER_CAN_USE_MP11|_</span></a> is defined.
|
|
|
|
template <typename ArgumentPack>
|
|
using binding_fn = typename <a href="#id925"><span class="problematic" id="id926">|</span></a>binding|_<
|
|
ArgumentPack
|
|
, <em>tag-name</em>
|
|
>::type;
|
|
|
|
template <typename ArgumentPack>
|
|
using fn = typename <a href="#id927"><span class="problematic" id="id928">|</span></a>value_type|_<ArgumentPack, <em>tag-name</em>>::type;
|
|
};
|
|
|
|
<a href="#id929"><span class="problematic" id="id930">|</span></a>keyword|_<<em>tag-name</em>> const& tag::<em>tag-name</em>::<em>alias</em>
|
|
= <a href="#id931"><span class="problematic" id="id932">|</span></a>keyword|_<<em>tag-name</em>>::instance;
|
|
}
|
|
|
|
<a href="#id933"><span class="problematic" id="id934">|</span></a>keyword|_<tag::<em>tag-name</em>> const& tag::<em>tag-name</em>::<em>name</em>
|
|
= <a href="#id935"><span class="problematic" id="id936">|</span></a>keyword|_<tag::<em>tag-name</em>>::instance;
|
|
</pre>
|
|
<div class="system-message" id="id925">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6730); <em><a href="#id926">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id927">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6730); <em><a href="#id928">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id929">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6730); <em><a href="#id930">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id931">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6730); <em><a href="#id932">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id933">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6730); <em><a href="#id934">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id935">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6730); <em><a href="#id936">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p><strong>Else</strong></p>
|
|
<p>Treats <em>name</em> as if it were of the form:</p>
|
|
<pre class="literal-block">
|
|
forward(<em>tag-name</em>)
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="boost-parameter-template-keyword-name">
|
|
<h2><a class="toc-backref" href="#id1120">7.21 <tt class="docutils literal">BOOST_PARAMETER_TEMPLATE_KEYWORD(name)</tt></a></h2>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/template_keyword.hpp">boost/parameter/template_keyword.hpp</a></td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Included by:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/name.hpp">boost/parameter/name.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
namespace tag {
|
|
|
|
struct <em>name</em>;
|
|
}
|
|
|
|
template <typename T>
|
|
struct <em>name</em> : <a href="#id937"><span class="problematic" id="id938">|</span></a>template_keyword|_<tag:: <em>name</em>, T>
|
|
{
|
|
};
|
|
</pre>
|
|
<div class="system-message" id="id937">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6787); <em><a href="#id938">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<p>The <a class="reference external" href="../../test/function_type_tpl_param.cpp">function_type_tpl_param.cpp</a> test program demonstrates proper usage of
|
|
this macro.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-fun-r-n-l-h-p">
|
|
<h2><a class="toc-backref" href="#id1121">7.22 <tt class="docutils literal">BOOST_PARAMETER_FUN(r, n, l, h, p)</tt></a></h2>
|
|
<div class="admonition-deprecated admonition">
|
|
<p class="first admonition-title">Deprecated</p>
|
|
<p class="last">This macro has been deprecated in favor of
|
|
<tt class="docutils literal">BOOST_PARAMETER_FUNCTION</tt>.</p>
|
|
</div>
|
|
<p>Generates a sequence of <a class="reference external" href="index.html#forwarding-functions">forwarding function</a> templates named
|
|
<tt class="docutils literal">n</tt>, with arities ranging from <tt class="docutils literal">l</tt> to <tt class="docutils literal">h</tt>, returning <tt class="docutils literal">r</tt>,
|
|
and using <tt class="docutils literal">p</tt> to control overload resolution and assign tags to
|
|
positional arguments.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/macros.hpp">boost/parameter/macros.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<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">Requires:</th><td class="field-body"><tt class="docutils literal">l</tt> and <tt class="docutils literal">h</tt> are nonnegative integer tokens</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6823)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>such that <tt class="docutils literal">l</tt> < <tt class="docutils literal">h</tt></p>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
template <typename A1, typename A2, …, typename A ## <strong>l</strong>>
|
|
r
|
|
name(
|
|
A1 && a1, A2 && a2, …, A ## <strong>l</strong> && a ## <strong>l</strong>
|
|
, typename <strong>p</strong>::match<A1, A2, …, A ## <strong>l</strong>>::type p = <strong>p</strong>()
|
|
)
|
|
{
|
|
return <strong>name</strong>_with_named_params(
|
|
<strong>p</strong>(
|
|
std::<a href="#id1229"><span class="problematic" id="id1230">`forward`_<A1>(a1)
|
|
, std::`forward`_<A2>(a2)
|
|
, …
|
|
, std::`forward`_<A ## **l**>(a ## **l**)
|
|
)
|
|
);
|
|
}
|
|
|
|
template <
|
|
typename A1
|
|
, typename A2
|
|
, …
|
|
, typename A ## **l**
|
|
, typename A ## BOOST_PP_INC_\ (**l**)
|
|
>
|
|
r
|
|
name(
|
|
A1 && a1, A2 && a2, …, A ## **l** && a ## **l**
|
|
, A ## BOOST_PP_INC_\ (**l**) const& a ## BOOST_PP_INC_\ (**l**)
|
|
, typename **p**::match<
|
|
A1, A2, …, A ## **l**, A ## BOOST_PP_INC_\ (**l**)
|
|
>::type p = **p**\ ()
|
|
)
|
|
{
|
|
return **name**\ _with_named_params(
|
|
**p**\ (
|
|
std::`forward`_<A1>(a1)
|
|
, std::`forward`_<A2>(a2)
|
|
, …
|
|
, std::`forward`_<A ## **l**>(a ## **l**)
|
|
, std::`forward`_<A ## `BOOST_PP_INC`_</span></a>(<strong>l</strong>)>(
|
|
a ## <a class="reference external" href="../../../preprocessor/doc/ref/inc.html">BOOST_PP_INC</a>(<strong>l</strong>)
|
|
)
|
|
)
|
|
);
|
|
}
|
|
|
|
<span class="vellipsis">⋮</span>
|
|
|
|
template <typename A1, typename A2, …, typename A ## <strong>h</strong>>
|
|
r
|
|
name(
|
|
A1 && a1, A2 && a2, …, A ## <strong>h</strong> && x ## <strong>h</strong>
|
|
, typename <strong>p</strong>::match<A1, A2, …, A ## <strong>h</strong>>::type p = <strong>p</strong>()
|
|
)
|
|
{
|
|
return <strong>name</strong>_with_named_params(
|
|
<strong>p</strong>(
|
|
std::<a href="#id940"><span class="problematic" id="id941">`</span></a>forward`_<A1>(a1)
|
|
, std::<a href="#id942"><span class="problematic" id="id943">`</span></a>forward`_<A2>(a2)
|
|
, …
|
|
, std::<a href="#id944"><span class="problematic" id="id945">`</span></a>forward`_<A ## <strong>h</strong>>(a ## <strong>h</strong>)
|
|
)
|
|
);
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id940">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6827); <em><a href="#id941">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id942">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6827); <em><a href="#id943">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<div class="system-message" id="id944">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6827); <em><a href="#id945">backlink</a></em></p>
|
|
Inline interpreted text or phrase reference start-string without end-string.</div>
|
|
<p>The <a class="reference external" href="../../test/macros.cpp">macros.cpp</a> and <a class="reference external" href="../../test/macros_eval_category.cpp">macros_eval_category.cpp</a> test programs demonstrate proper
|
|
usage of this macro.</p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-keyword-n-k">
|
|
<h2><a class="toc-backref" href="#id1122">7.23 <tt class="docutils literal">BOOST_PARAMETER_KEYWORD(n, k)</tt></a></h2>
|
|
<div class="admonition-deprecated admonition">
|
|
<p class="first admonition-title">Deprecated</p>
|
|
<p class="last">This macro has been deprecated in favor of
|
|
<tt class="docutils literal">BOOST_PARAMETER_NAME</tt>.</p>
|
|
</div>
|
|
<p>Generates the declaration of a <a class="reference internal" href="#keyword-tag-type">keyword tag type</a> named <tt class="docutils literal">k</tt> in
|
|
namespace <tt class="docutils literal">n</tt> and a corresponding <a class="reference internal" href="#keyword-object">keyword object</a> definition in
|
|
the enclosing namespace.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/keyword.hpp">boost/parameter/keyword.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
namespace <strong>n</strong> {
|
|
|
|
struct <strong>k</strong>
|
|
{
|
|
static constexpr char const* keyword_name()
|
|
{
|
|
return ## <em>k</em>;
|
|
}
|
|
|
|
typedef <em>unspecified</em> _;
|
|
typedef <em>unspecified</em> _1;
|
|
typedef boost::parameter::forward_reference qualifier;
|
|
|
|
// The following definitions are available only when
|
|
// <a class="reference internal" href="#boost-parameter-can-use-mp11"><tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt></a> is defined.
|
|
|
|
template <typename ArgumentPack>
|
|
using binding_fn = typename <a href="#id948"><span class="problematic" id="id949">|</span></a>binding|_<
|
|
ArgumentPack
|
|
, <em>k</em>
|
|
>::type;
|
|
|
|
template <typename ArgumentPack>
|
|
using fn = typename <a href="#id950"><span class="problematic" id="id951">|</span></a>value_type|_<ArgumentPack, <em>k</em>>::type;
|
|
};
|
|
}
|
|
|
|
namespace {
|
|
|
|
<a href="#id952"><span class="problematic" id="id953">|</span></a>keyword|_<<em>n</em>::<strong>k</strong>> const& <strong>k</strong>
|
|
= <a href="#id954"><span class="problematic" id="id955">|</span></a>keyword|_<<em>n</em>::<strong>k</strong>>::instance;
|
|
}
|
|
</pre>
|
|
<div class="system-message" id="id948">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6922); <em><a href="#id949">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id950">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6922); <em><a href="#id951">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id952">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6922); <em><a href="#id953">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
<div class="system-message" id="id954">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6922); <em><a href="#id955">backlink</a></em></p>
|
|
Inline substitution_reference start-string without end-string.</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-match-p-a-x">
|
|
<h2><a class="toc-backref" href="#id1123">7.24 <tt class="docutils literal">BOOST_PARAMETER_MATCH(p, a, x)</tt></a></h2>
|
|
<p>Generates a defaulted parameter declaration for a <a class="reference external" href="index.html#forwarding-functions">forwarding function</a>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/match.hpp">boost/parameter/match.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<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">Requires:</th><td class="field-body"><tt class="docutils literal">a</tt> is a <a class="reference external" href="../../../preprocessor/doc/data.html">Boost.Preprocessor sequence</a> of the form</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<pre class="literal-block">
|
|
(A0)(A1)…(A ## <em>n</em>)
|
|
</pre>
|
|
<p>Expands to:</p>
|
|
<pre class="literal-block">
|
|
typename <strong>p</strong>::match<<strong>A0</strong>, <strong>A1</strong>, …, <strong>A</strong> ## <em>n</em>>::type
|
|
<strong>x</strong> = <strong>p</strong>()
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="configuration-macros">
|
|
<h1><a class="toc-backref" href="#id1124">8 Configuration Macros</a></h1>
|
|
<div class="section" id="boost-parameter-has-perfect-forwarding">
|
|
<h2><a class="toc-backref" href="#id1125">8.1 <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt></a></h2>
|
|
<p>Determines whether or not the library supports perfect forwarding, or the
|
|
preservation of parameter value categories. Users can manually disable this
|
|
macro by <tt class="docutils literal">#defining</tt> the <tt class="docutils literal">BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING</tt>
|
|
macro. Otherwise, the library will <tt class="docutils literal">#define</tt> this macro if and only if it
|
|
is not already defined, and if the configuration macros
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</tt></a>, <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_SFINAE</tt></a>,
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_RVALUE_REFERENCES</tt></a>, <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_VARIADIC_TEMPLATES</tt></a>, and
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS</tt></a> are not already defined by
|
|
<a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/config.hpp">boost/parameter/config.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="boost-parameter-disable-perfect-forwarding">
|
|
<h2><a class="toc-backref" href="#id1126">8.2 <tt class="docutils literal">BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING</tt></a></h2>
|
|
<p>It may be necessary to test user code in case perfect forwarding support is
|
|
unavailable. Users can <tt class="docutils literal">#define</tt> this macro either in their project
|
|
settings or before including any library header files. Doing so will leave
|
|
both <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> and
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> undefined.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7024)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-can-use-mp11">
|
|
<h2><a class="toc-backref" href="#id1127">8.3 <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt></a></h2>
|
|
<p>Determines whether or not the library can use <a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a>, a C++11
|
|
metaprogramming library, and therefore determines whether or not the library
|
|
defines the <a href="#id1032"><span class="problematic" id="id1033">|are_tagged_arguments_mp11|</span></a> and <a href="#id1034"><span class="problematic" id="id1035">|is_argument_pack_mp11|</span></a>
|
|
metafunctions. Users can manually disable this macro by <tt class="docutils literal">#defining</tt> the
|
|
<tt class="docutils literal">BOOST_PARAMETER_DISABLE_MP11_USAGE</tt> macro or the
|
|
<tt class="docutils literal">BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING</tt> macro. Otherwise, the library
|
|
will <tt class="docutils literal">#define</tt> this macro if and only if it is not already defined, if
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is defined, and if the configuration
|
|
macros <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_CONSTEXPR</tt></a>, <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_DECLTYPE_N3276</tt></a>,
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_AUTO_DECLARATIONS</tt></a>, <a href="#id1231"><span class="problematic" id="id1232">|BOOST_NO_CXX11_TEMPLATE_ALIASES|_</span></a>,
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_STATIC_ASSERT</tt></a>, <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_HDR_TYPE_TRAITS</tt></a>,
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_HDR_INITIALIZER_LIST</tt></a>, and <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_HDR_TUPLE</tt></a>
|
|
are not already defined by <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a>.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7044)</p>
|
|
<p>Content block expected for the "Admonition" directive; none found.</p>
|
|
<pre class="literal-block">
|
|
.. Admonition:: Usage Note
|
|
|
|
</pre>
|
|
</div>
|
|
<p><a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a> and <a class="reference external" href="../../../mpl/doc/index.html">Boost.MPL</a> are <strong>not</strong> mutually exclusive. It's perfectly
|
|
acceptable to specify deduced parameters using both quoted metafunctions and
|
|
metafunction classes, for example. See <a class="reference external" href="../../test/evaluate_category.cpp">evaluate_category.cpp</a>.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7050)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_CAN_USE_MP11".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7052)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7053)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_DISABLE_PERFECT_FORWARDING".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7060)</p>
|
|
Duplicate substitution definition name: "BOOST_NO_CXX11_AUTO_DECLARATIONS".</div>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/config.hpp">boost/parameter/config.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<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">Example usage:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7080)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>Given the following definitions:</p>
|
|
<pre class="literal-block">
|
|
|BOOST_PARAMETER_NAME|_(x)
|
|
|
|
template <typename A0>
|
|
typename boost::`enable_if`_<std::`is_same`_<int,A0>,int>::type
|
|
sfinae(A0 const& a0)
|
|
{
|
|
return 0;
|
|
}
|
|
</pre>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7091); <em><a href="#id963">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_same".</div>
|
|
<p><a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a> allows deduced parameters to be defined more succinctly:</p>
|
|
<pre class="literal-block">
|
|
template <typename T, typename Args>
|
|
using predicate = std::`is_convertible`_<T,char const\*>;
|
|
|
|
|BOOST_PARAMETER_FUNCTION|_((int), sfinae, tag,
|
|
(deduced
|
|
(optional
|
|
(x
|
|
, \*(boost::mp11::mp_quote<predicate>)
|
|
, static_cast<char const\*>(`nullptr`_)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
{
|
|
return 1;
|
|
}
|
|
</pre>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7112); <em><a href="#id964">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_convertible".</div>
|
|
<p>Without <a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a>, deduced parameter definitions tend to be more verbose:</p>
|
|
<pre class="literal-block">
|
|
struct predicate
|
|
{
|
|
template <typename T, typename Args>
|
|
struct apply
|
|
: boost::mpl::if_<
|
|
boost::`is_convertible`_<T,char const\*>
|
|
, boost::mpl::true_
|
|
, boost::mpl::false_
|
|
>
|
|
{
|
|
};
|
|
};
|
|
|
|
|BOOST_PARAMETER_FUNCTION|_((int), sfinae, tag,
|
|
(deduced
|
|
(optional
|
|
(x
|
|
, \*(predicate)
|
|
, static_cast<char const\*>(`nullptr`_)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
{
|
|
return 1;
|
|
}
|
|
</pre>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7143); <em><a href="#id965">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_convertible".</div>
|
|
<p>Either way, the following assertions will succeed:</p>
|
|
<pre class="literal-block">
|
|
assert(1 == sfinae());
|
|
assert(1 == sfinae("foo"));
|
|
assert(0 == sfinae(1));
|
|
</pre>
|
|
<p>As another example, given the following declarations and definitions:</p>
|
|
<pre class="literal-block">
|
|
|BOOST_PARAMETER_NAME|_(x)
|
|
|BOOST_PARAMETER_NAME|_(y)
|
|
|
|
template <typename E, typename Args>
|
|
void check0(E const& e, Args const& args);
|
|
|
|
template <typename P, typename E, typename ...Args>
|
|
void check(E const& e, Args const&... args)
|
|
{
|
|
check0(e, P()(args...));
|
|
}
|
|
</pre>
|
|
<p>Argument packs qualify as <a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a>-style lists containing
|
|
<a class="reference internal" href="#keyword-tag-type">keyword tag type</a>s:</p>
|
|
<pre class="literal-block">
|
|
template <typename Args>
|
|
struct some_functor
|
|
{
|
|
template <typename K>
|
|
void operator()(K&&) const
|
|
{
|
|
// K is one of tag::x, tag::y, etc.
|
|
}
|
|
};
|
|
|
|
template <typename E, typename Args>
|
|
void check0(E const& e, Args const& args)
|
|
{
|
|
boost::mp11::mp_for_each<E>(some_functor<Args>());
|
|
}
|
|
</pre>
|
|
<p>The first check determines whether or not the argument type of <tt class="docutils literal">_y</tt> is the
|
|
same as the reference type of <tt class="docutils literal">_x</tt>, while the second check determines
|
|
whether or not the argument type of <tt class="docutils literal">_y</tt> is convertible to the value type of
|
|
<tt class="docutils literal">_x</tt>. Here, it's possible to access the reference and value result types of
|
|
indexing an argument pack a little more directly:</p>
|
|
<pre class="literal-block">
|
|
// Use mp_bind on tag::x::binding_fn to access the reference type of _x.
|
|
// Here, boost::mp11::_1 will be bound to the argument type of _y.
|
|
// Regardless, boost::mp11::_2 will be bound to the argument pack type.
|
|
check<
|
|
|parameters|_<
|
|
tag::x
|
|
, |optional|_<
|
|
|deduced|_<tag::y>
|
|
, boost::mp11::mp_bind<
|
|
std::`is_same`_
|
|
, boost::mp11::_1
|
|
, boost::mp11::mp_bind<
|
|
tag::x::binding_fn
|
|
, boost::mp11::_2
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>((_x = 0, _y = 1), 0, 1);
|
|
|
|
// Use mp_bind_q on tag::x to access the value type of _x.
|
|
check<
|
|
|parameters|_<
|
|
tag::x
|
|
, |optional|_<
|
|
|deduced|_<tag::y>
|
|
, boost::mp11::mp_bind<
|
|
std::`is_convertible`_
|
|
, boost::mp11::_1
|
|
, boost::mp11::mp_bind_q<tag::x,boost::mp11::_2>
|
|
>
|
|
>
|
|
>
|
|
>((_x = 0U, _y = 1U), 0U, 1U);
|
|
</pre>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7226); <em><a href="#id967">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_convertible".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7227); <em><a href="#id968">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_same".</div>
|
|
<p>Argument packs still qualify as <a class="reference external" href="../../../mpl/doc/index.html">Boost.MPL</a>-style lists containing
|
|
<a class="reference internal" href="#keyword-tag-type">keyword tag type</a>s:</p>
|
|
<pre class="literal-block">
|
|
template <typename Args>
|
|
struct some_functor
|
|
{
|
|
template <typename K>
|
|
void operator()(K) const
|
|
{
|
|
// K is one of tag::x, tag::y, etc.
|
|
}
|
|
};
|
|
|
|
template <typename E, typename Args>
|
|
void check0(E const& e, Args const& args)
|
|
{
|
|
boost::mpl::for_each<E>(some_functor<Args>());
|
|
}
|
|
</pre>
|
|
<p>However, without <a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a>, the corresponding checks become a little more
|
|
verbose:</p>
|
|
<pre class="literal-block">
|
|
check<
|
|
|parameters|_<
|
|
tag::x
|
|
, |optional|_<
|
|
|deduced|_<tag::y>
|
|
, boost::mpl::if_<
|
|
boost::`is_same`_<
|
|
boost::`add_lvalue_reference`_<boost::mpl::_1>
|
|
, |binding|_<boost::mpl::_2,tag::x>
|
|
>
|
|
, boost::mpl::true_
|
|
, boost::mpl::false_
|
|
>
|
|
>
|
|
>
|
|
>((_x = 0, _y = 1), 0, 1);
|
|
|
|
// Use tag::x::_ or tag::x::_1 to access the value type of _x.
|
|
check<
|
|
|parameters|_<
|
|
tag::x
|
|
, |optional|_<
|
|
|deduced|_<tag::y>
|
|
, boost::mpl::if_<
|
|
boost::`is_convertible`_<boost::mpl::_1,tag::x::_1>
|
|
, boost::mpl::true_
|
|
, boost::mpl::false_
|
|
>
|
|
>
|
|
>
|
|
>((_x = 0U, _y = 1U), 0U, 1U);
|
|
</pre>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7284); <em><a href="#id969">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_convertible".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7285); <em><a href="#id970">backlink</a></em></p>
|
|
Duplicate explicit target name: "is_same".</div>
|
|
<p>The <a class="reference external" href="../../test/singular.cpp">singular.cpp</a>, <a class="reference external" href="../../test/compose.cpp">compose.cpp</a>, <a class="reference external" href="../../test/optional_deduced_sfinae.cpp">optional_deduced_sfinae.cpp</a>, and
|
|
<a class="reference external" href="../../test/deduced_dependent_predicate.cpp">deduced_dependent_predicate.cpp</a> test programs demonstrate proper usage of this
|
|
macro.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7293)</p>
|
|
Duplicate substitution definition name: "singular_cpp".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7295)</p>
|
|
Duplicate substitution definition name: "compose_cpp".</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-disable-mp11-usage">
|
|
<h2><a class="toc-backref" href="#id1128">8.4 <tt class="docutils literal">BOOST_PARAMETER_DISABLE_MP11_USAGE</tt></a></h2>
|
|
<p>It may be necessary to disable usage of <a class="reference external" href="../../../mp11/doc/html/mp11.html">Boost.MP11</a> for compilers that
|
|
cannot support it. Users can <tt class="docutils literal">#define</tt> this macro either in their project
|
|
settings or before including any library header files. Doing so will leave
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> undefined and the <a href="#id1038"><span class="problematic" id="id1039">|are_tagged_arguments_mp11|</span></a>
|
|
and <a href="#id1040"><span class="problematic" id="id1041">|is_argument_pack_mp11|</span></a> metafunctions unavailable.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7311)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_CAN_USE_MP11".</div>
|
|
</div>
|
|
<div class="section" id="boost-parameter-variadic-mpl-sequence">
|
|
<h2><a class="toc-backref" href="#id1129">8.5 <tt class="docutils literal">BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE</tt></a></h2>
|
|
<p>If <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is <tt class="docutils literal">#defined</tt>, then determines
|
|
the <a class="reference external" href="../../../mpl/doc/refmanual/variadic-sequence.html">MPL Variadic Sequence</a> underlying the nested <tt class="docutils literal">parameter_spec</tt> type of
|
|
<a href="#id1042"><span class="problematic" id="id1043">|parameters|</span></a>. If the user does not manually <tt class="docutils literal">#define</tt> this macro, then the
|
|
library will <tt class="docutils literal">#define</tt> it as <a class="reference external" href="../../../mp11/doc/html/mp11.html"><tt class="docutils literal"><span class="pre">boost\:\:mp11\:\:mp_list</span></tt></a> if
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> is defined, <a class="reference external" href="../../../fusion/doc/html/fusion/container/list.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:list</span></tt></a> if
|
|
<a class="reference external" href="../../../../boost/fusion/container/list/list_fwd.hpp"><tt class="docutils literal">BOOST_FUSION_HAS_VARIADIC_LIST</tt></a> is defined (by <a class="reference external" href="../../../fusion/doc/html/index.html">Boost.Fusion</a>),
|
|
<a class="reference external" href="../../../fusion/doc/html/fusion/container/deque.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:deque</span></tt></a> if <a class="reference external" href="../../../../boost/fusion/container/deque/deque_fwd.hpp"><tt class="docutils literal">BOOST_FUSION_HAS_VARIADIC_DEQUE</tt></a> is defined
|
|
(by <a class="reference external" href="../../../fusion/doc/html/index.html">Boost.Fusion</a>), or <a class="reference external" href="../../../mpl/doc/refmanual/vector.html"><tt class="docutils literal"><span class="pre">boost\:\:mpl\:\:vector</span></tt></a> otherwise.</p>
|
|
<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">Example:</th><td class="field-body"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7328)</p>
|
|
<p>Content block expected for the "parsed-literal" directive; none found.</p>
|
|
<pre class="literal-block">
|
|
.. parsed-literal::
|
|
|
|
</pre>
|
|
</div>
|
|
<p>#define BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE <a class="reference external" href="../../../fusion/doc/html/fusion/container/vector.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:vector</span></tt></a></p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7332)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7333)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_CAN_USE_MP11".</div>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/parameters.hpp">boost/parameter/parameters.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="boost-parameter-max-arity">
|
|
<h2><a class="toc-backref" href="#id1130">8.6 <tt class="docutils literal">BOOST_PARAMETER_MAX_ARITY</tt></a></h2>
|
|
<p>If <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is <tt class="docutils literal">#defined</tt>, then:</p>
|
|
<p>*. If the <a class="reference external" href="../../../mpl/doc/refmanual/variadic-sequence.html">MPL Variadic Sequence</a> underlying the nested <tt class="docutils literal">parameter_spec</tt>
|
|
type of <a href="#id1044"><span class="problematic" id="id1045">|parameters|</span></a> does not have a size limit--which is the case with
|
|
<a class="reference external" href="../../../mp11/doc/html/mp11.html"><tt class="docutils literal"><span class="pre">boost\:\:mp11\:\:mp_list</span></tt></a>, <a class="reference external" href="../../../fusion/doc/html/fusion/container/list.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:list</span></tt></a>, and <a class="reference external" href="../../../fusion/doc/html/fusion/container/deque.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:deque</span></tt></a>, but not
|
|
<a class="reference external" href="../../../mpl/doc/refmanual/vector.html"><tt class="docutils literal"><span class="pre">boost\:\:mpl\:\:vector</span></tt></a>--then this macro can be safely ignored. User code that
|
|
manually defines <tt class="docutils literal">BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE</tt> should also manually
|
|
define this macro to the size limit of the sequence if it has one.</p>
|
|
<p>If <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is <strong>not</strong> <tt class="docutils literal">#defined</tt>, then:</p>
|
|
<p>*. Mutable references must be wrapped by <a class="reference external" href="../../../core/doc/html/core/ref.html"><tt class="docutils literal"><span class="pre">boost\:\:ref</span></tt></a> or <a class="reference external" href="http://en.cppreference.com/w/cpp/utility/functional/ref"><tt class="docutils literal"><span class="pre">std\:\:ref</span></tt></a> if passed
|
|
by position to Boost.Parameter-enabled functions with arity greater than or
|
|
equal to <tt class="docutils literal">BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY</tt>.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7374)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7375)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7378)</p>
|
|
Duplicate substitution definition name: "boost_mp11_list".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7380)</p>
|
|
Duplicate substitution definition name: "boost_fusion_list".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7382)</p>
|
|
Duplicate substitution definition name: "boost_fusion_deque".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7384)</p>
|
|
Duplicate substitution definition name: "boost_mpl_vector".</div>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/config.hpp">boost/parameter/config.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<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">Default Value:</th><td class="field-body"><a class="reference external" href="../../../mpl/doc/refmanual/limit-vector-size.html"><tt class="docutils literal">BOOST_MPL_LIMIT_VECTOR_SIZE</tt></a> (defined by <a class="reference external" href="../../../mpl/doc/index.html">Boost.MPL</a>) if</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7396)</p>
|
|
Field list ends without a blank line; unexpected unindent.</div>
|
|
<p>perfect forwarding is supported, <tt class="docutils literal">8</tt> otherwise.
|
|
:Minimum Value: <tt class="docutils literal">2</tt>
|
|
:Maximum Value: <a href="#id1046"><span class="problematic" id="id1047">|BOOST_PARAMETER_COMPOSE_MAX_ARITY|</span></a></p>
|
|
</div>
|
|
<div class="section" id="boost-parameter-compose-max-arity">
|
|
<h2><a class="toc-backref" href="#id1131">8.7 <tt class="docutils literal">BOOST_PARAMETER_COMPOSE_MAX_ARITY</tt></a></h2>
|
|
<p>If <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is <strong>not</strong> <tt class="docutils literal">#defined</tt>, then
|
|
determines the maximum number of arguments supported by the <a href="#id1048"><span class="problematic" id="id1049">|compose|</span></a> function
|
|
and by the <a href="#id1050"><span class="problematic" id="id1051">|BOOST_PARAMETER_NO_SPEC_FUNCTION|</span></a>,
|
|
<a href="#id1052"><span class="problematic" id="id1053">|BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION|</span></a>,
|
|
<a href="#id1054"><span class="problematic" id="id1055">|BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION|</span></a>,
|
|
<a href="#id1056"><span class="problematic" id="id1057">|BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR|</span></a>,
|
|
<a href="#id1058"><span class="problematic" id="id1059">|BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR|</span></a>,
|
|
<a href="#id1060"><span class="problematic" id="id1061">|BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR|</span></a>, and
|
|
<a href="#id1062"><span class="problematic" id="id1063">|BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR|</span></a> code generation macros.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/config.hpp">boost/parameter/config.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<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">Default Value:</th><td class="field-body"><tt class="docutils literal">20</tt> for a few older compilers, <tt class="docutils literal">64</tt> otherwise</td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Minimum Value:</th><td class="field-body"><tt class="docutils literal">2</tt></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="boost-parameter-exponential-overload-threshold-arity">
|
|
<h2><a class="toc-backref" href="#id1132">8.8 <tt class="docutils literal">BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY</tt></a></h2>
|
|
<p>If this library does <strong>not</strong> support perfect forwarding, determines the number
|
|
of arguments less than which <a href="#id1064"><span class="problematic" id="id1065">|parameters|</span></a> generates an exponential number of
|
|
function call operator overloads, and greater than or equal to which
|
|
<a href="#id1066"><span class="problematic" id="id1067">|parameters|</span></a> does not. Will only be <tt class="docutils literal">#defined</tt> by the library if it is
|
|
not already <tt class="docutils literal">#defined</tt> and <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> is
|
|
<strong>not</strong> <tt class="docutils literal">#defined</tt>.</p>
|
|
<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">Defined in:</th><td class="field-body"><a class="reference external" href="../../../../boost/parameter/config.hpp">boost/parameter/config.hpp</a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<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">Default Value:</th><td class="field-body"><tt class="docutils literal">0</tt></td>
|
|
</tr>
|
|
<tr class="field"><th class="field-name">Minimum Value:</th><td class="field-body"><tt class="docutils literal">0</tt></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section" id="outside-of-this-library">
|
|
<h2><a class="toc-backref" href="#id1133">8.9 ...Outside Of This Library</a></h2>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</tt></a>, then the macros
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> and <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt>
|
|
will be left undefined; otherwise, the code generation macros would not work
|
|
correctly.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_SFINAE</tt></a>, then the macros
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> and <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt>
|
|
will be left undefined; otherwise, keyword types generated by
|
|
<tt class="docutils literal">BOOST_PARAMETER_NAME</tt> and <tt class="docutils literal">BOOST_PARAMETER_NESTED_KEYWORD</tt> would not work
|
|
correctly.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_RVALUE_REFERENCES</tt></a>,
|
|
then the macros <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> and
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_VARIADIC_TEMPLATES</tt></a>,
|
|
then the macros <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> and
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS</tt></a>, then the macros
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt> and <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt>
|
|
will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_CONSTEXPR</tt></a>, then the
|
|
macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_DECLTYPE_N3276</tt></a>, then
|
|
the macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_AUTO_DECLARATIONS</tt></a>,
|
|
then the macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a href="#id1233"><span class="problematic" id="id1234">|BOOST_NO_CXX11_TEMPLATE_ALIASES|_</span></a>,
|
|
then the macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_STATIC_ASSERT</tt></a>, then
|
|
the macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_HDR_TYPE_TRAITS</tt></a>,
|
|
then the macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro
|
|
<a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_HDR_INITIALIZER_LIST</tt></a>, then the macro
|
|
<tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../config/doc/html/index.html">Boost.Config</a> defines the macro <a class="reference external" href="../../../config/doc/html/boost_config/boost_macro_reference.html"><tt class="docutils literal">BOOST_NO_CXX11_HDR_TUPLE</tt></a>, then the
|
|
macro <tt class="docutils literal">BOOST_PARAMETER_CAN_USE_MP11</tt> will be left undefined.</p>
|
|
<p>#. If <a class="reference external" href="../../../fusion/doc/html/index.html">Boost.Fusion</a> defines the macro <a class="reference external" href="../../../../boost/fusion/container/list/list_fwd.hpp"><tt class="docutils literal">BOOST_FUSION_HAS_VARIADIC_LIST</tt></a>,
|
|
if this library defines the macro <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt>,
|
|
and if <tt class="docutils literal">BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE</tt> is left undefined, then the
|
|
<a class="reference external" href="../../../mpl/doc/refmanual/variadic-sequence.html">MPL Variadic Sequence</a> underlying the nested <tt class="docutils literal">parameter_spec</tt> type of
|
|
<a href="#id1070"><span class="problematic" id="id1071">|parameters|</span></a> will be <a class="reference external" href="../../../fusion/doc/html/fusion/container/list.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:list</span></tt></a>.</p>
|
|
<p>#. If <a class="reference external" href="../../../fusion/doc/html/index.html">Boost.Fusion</a> defines the macro <a class="reference external" href="../../../../boost/fusion/container/deque/deque_fwd.hpp"><tt class="docutils literal">BOOST_FUSION_HAS_VARIADIC_DEQUE</tt></a>,
|
|
if this library defines the macro <tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt>,
|
|
and if <tt class="docutils literal">BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE</tt> is left undefined, then the
|
|
<a class="reference external" href="../../../mpl/doc/refmanual/variadic-sequence.html">MPL Variadic Sequence</a> underlying the nested <tt class="docutils literal">parameter_spec</tt> type of
|
|
<a href="#id1072"><span class="problematic" id="id1073">|parameters|</span></a> will be <a class="reference external" href="../../../fusion/doc/html/fusion/container/deque.html"><tt class="docutils literal"><span class="pre">boost\:\:fusion\:\:deque</span></tt></a>.</p>
|
|
<p>#. The value that <a class="reference external" href="../../../mpl/doc/index.html">Boost.MPL</a> defines the macro
|
|
<a class="reference external" href="../../../mpl/doc/refmanual/limit-vector-size.html"><tt class="docutils literal">BOOST_MPL_LIMIT_VECTOR_SIZE</tt></a> as will be the value that this library defines
|
|
the macro <tt class="docutils literal">BOOST_PARAMETER_MAX_ARITY</tt> as if this library defines the macro
|
|
<tt class="docutils literal">BOOST_PARAMETER_HAS_PERFECT_FORWARDING</tt>.</p>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7513)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_HAS_PERFECT_FORWARDING".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7514)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_VARIADIC_MPL_SEQUENCE".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7515)</p>
|
|
Duplicate substitution definition name: "BOOST_PARAMETER_MAX_ARITY".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7518)</p>
|
|
Duplicate substitution definition name: "BOOST_NO_FUNCTION_TEMPLATE_ORDERING".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7520)</p>
|
|
Duplicate substitution definition name: "BOOST_NO_SFINAE".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7522)</p>
|
|
Duplicate substitution definition name: "BOOST_NO_CXX11_RVALUE_REFERENCES".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7524)</p>
|
|
Duplicate substitution definition name: "BOOST_NO_CXX11_VARIADIC_TEMPLATES".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7526)</p>
|
|
Duplicate substitution definition name: "BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7528)</p>
|
|
Duplicate substitution definition name: "BOOST_FUSION_HAS_VARIADIC_LIST".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7530)</p>
|
|
Duplicate substitution definition name: "BOOST_FUSION_HAS_VARIADIC_DEQUE".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7532)</p>
|
|
Duplicate substitution definition name: "BOOST_MPL_LIMIT_VECTOR_SIZE".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7534)</p>
|
|
Duplicate substitution definition name: "boost_fusion_list".</div>
|
|
<div class="system-message">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7536)</p>
|
|
Duplicate substitution definition name: "boost_fusion_deque".</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="tutorial">
|
|
<h1><a class="toc-backref" href="#id1134">9 Tutorial</a></h1>
|
|
<p>Follow <a class="reference external" href="index.html#tutorial">this link</a> to the Boost.Parameter tutorial documentation.</p>
|
|
<hr class="docutils" />
|
|
<table class="docutils footnote" frame="void" id="thread" rules="none">
|
|
<colgroup><col class="label" /><col /></colgroup>
|
|
<tbody valign="top">
|
|
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>References to tag objects may be initialized multiple
|
|
times. This scenario can only occur in the presence of
|
|
threading. Because the C++ standard doesn't consider threading,
|
|
it doesn't explicitly allow or forbid multiple initialization of
|
|
references. That said, it's hard to imagine an implementation
|
|
where it could make a difference.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<table class="docutils footnote" frame="void" id="no-result-of" rules="none">
|
|
<colgroup><col class="label" /><col /></colgroup>
|
|
<tbody valign="top">
|
|
<tr><td class="label">[2]</td><td><em>(<a class="fn-backref" href="#id9">1</a>, <a class="fn-backref" href="#id19">2</a>, <a class="fn-backref" href="#id22">3</a>)</em> Where <a class="reference external" href="../../../utility/utility.htm#BOOST_NO_RESULT_OF"><tt class="docutils literal">BOOST_NO_RESULT_OF</tt></a> is <tt class="docutils literal">#defined</tt>,
|
|
<tt class="docutils literal">boost::</tt><a class="reference external" href="../../../utility/utility.htm#result_of"><tt class="docutils literal">result_of</tt></a><tt class="docutils literal"><span class="pre"><F()>::type</span></tt> is replaced by
|
|
<tt class="docutils literal"><span class="pre">F::result_type</span></tt>.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="system-messages section">
|
|
<h1>Docutils System Messages</h1>
|
|
<div class="system-message" id="id1000">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 666); <em><a href="#id1001">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_TEMPLATE_KEYWORD".</div>
|
|
<div class="system-message" id="id1002">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 748); <em><a href="#id1003">backlink</a></em></p>
|
|
Undefined substitution referenced: "Metafunction".</div>
|
|
<div class="system-message" id="id1004">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 851); <em><a href="#id1005">backlink</a></em></p>
|
|
Undefined substitution referenced: "Metafunction".</div>
|
|
<div class="system-message" id="id1006">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1081); <em><a href="#id1007">backlink</a></em></p>
|
|
Undefined substitution referenced: "compose".</div>
|
|
<div class="system-message" id="id1008">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1089); <em><a href="#id1009">backlink</a></em></p>
|
|
Undefined substitution referenced: "are_tagged_arguments|_<T0,Pack...> , |ArgumentPack".</div>
|
|
<div class="system-message" id="id1010">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1107); <em><a href="#id1011">backlink</a></em></p>
|
|
Undefined substitution referenced: "compose".</div>
|
|
<div class="system-message" id="id1012">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1013">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION".</div>
|
|
<div class="system-message" id="id1014">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1015">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION".</div>
|
|
<div class="system-message" id="id1016">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1017">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION".</div>
|
|
<div class="system-message" id="id1018">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1019">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR".</div>
|
|
<div class="system-message" id="id1020">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1021">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR".</div>
|
|
<div class="system-message" id="id1022">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1023">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR".</div>
|
|
<div class="system-message" id="id1024">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1127); <em><a href="#id1025">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR".</div>
|
|
<div class="system-message" id="id1026">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1138); <em><a href="#id1027">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_COMPOSE_MAX_ARITY".</div>
|
|
<div class="system-message" id="id1028">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6499); <em><a href="#id1029">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR".</div>
|
|
<div class="system-message" id="id1030">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6732); <em><a href="#id1031">backlink</a></em></p>
|
|
Undefined substitution referenced: "keyword|_<*tag-name*> const& *alias*; // The following definitions are available only when // |BOOST_PARAMETER_CAN_USE_MP11".</div>
|
|
<div class="system-message" id="id1032">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7030); <em><a href="#id1033">backlink</a></em></p>
|
|
Undefined substitution referenced: "are_tagged_arguments_mp11".</div>
|
|
<div class="system-message" id="id1034">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7030); <em><a href="#id1035">backlink</a></em></p>
|
|
Undefined substitution referenced: "is_argument_pack_mp11".</div>
|
|
<div class="system-message" id="id1036">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7030); <em><a href="#id1037">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_NO_CXX11_TEMPLATE_ALIASES".</div>
|
|
<div class="system-message" id="id1038">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7305); <em><a href="#id1039">backlink</a></em></p>
|
|
Undefined substitution referenced: "are_tagged_arguments_mp11".</div>
|
|
<div class="system-message" id="id1040">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7305); <em><a href="#id1041">backlink</a></em></p>
|
|
Undefined substitution referenced: "is_argument_pack_mp11".</div>
|
|
<div class="system-message" id="id1042">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7317); <em><a href="#id1043">backlink</a></em></p>
|
|
Undefined substitution referenced: "parameters".</div>
|
|
<div class="system-message" id="id1044">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7361); <em><a href="#id1045">backlink</a></em></p>
|
|
Undefined substitution referenced: "parameters".</div>
|
|
<div class="system-message" id="id1046">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7396); <em><a href="#id1047">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_COMPOSE_MAX_ARITY".</div>
|
|
<div class="system-message" id="id1048">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1049">backlink</a></em></p>
|
|
Undefined substitution referenced: "compose".</div>
|
|
<div class="system-message" id="id1050">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1051">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION".</div>
|
|
<div class="system-message" id="id1052">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1053">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_MEMBER_FUNCTION".</div>
|
|
<div class="system-message" id="id1054">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1055">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_MEMBER_FUNCTION".</div>
|
|
<div class="system-message" id="id1056">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1057">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_FUNCTION_CALL_OPERATOR".</div>
|
|
<div class="system-message" id="id1058">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1059">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONST_FUNCTION_CALL_OPERATOR".</div>
|
|
<div class="system-message" id="id1060">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1061">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_CONSTRUCTOR".</div>
|
|
<div class="system-message" id="id1062">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7407); <em><a href="#id1063">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_PARAMETER_NO_SPEC_NO_BASE_CONSTRUCTOR".</div>
|
|
<div class="system-message" id="id1064">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7427); <em><a href="#id1065">backlink</a></em></p>
|
|
Undefined substitution referenced: "parameters".</div>
|
|
<div class="system-message" id="id1066">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7427); <em><a href="#id1067">backlink</a></em></p>
|
|
Undefined substitution referenced: "parameters".</div>
|
|
<div class="system-message" id="id1068">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7480); <em><a href="#id1069">backlink</a></em></p>
|
|
Undefined substitution referenced: "BOOST_NO_CXX11_TEMPLATE_ALIASES".</div>
|
|
<div class="system-message" id="id1070">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7496); <em><a href="#id1071">backlink</a></em></p>
|
|
Undefined substitution referenced: "parameters".</div>
|
|
<div class="system-message" id="id1072">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7502); <em><a href="#id1073">backlink</a></em></p>
|
|
Undefined substitution referenced: "parameters".</div>
|
|
<div class="system-message" id="id1135">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1136">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1137">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1138">backlink</a></em></p>
|
|
Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1139">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1140">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1141">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1142">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< typename boost::mpl::`eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::out_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1143">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1144">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1145">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1146">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_const`_<t> , boost::mpl::`false_".</div>
|
|
<div class="system-message" id="id1147">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1148">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`false_".</div>
|
|
<div class="system-message" id="id1149">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1150">backlink</a></em></p>
|
|
Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1151">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1152">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1153">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1154">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`false_".</div>
|
|
<div class="system-message" id="id1155">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1156">backlink</a></em></p>
|
|
Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::consume_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1157">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1158">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1159">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1160">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1161">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1162">backlink</a></em></p>
|
|
Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1163">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1164">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1165">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1166">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< typename boost::mpl::`eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::out_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1167">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1168">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1169">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1170">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_const`_<t> , boost::mpl::`false_".</div>
|
|
<div class="system-message" id="id1171">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1172">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1173">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1174">backlink</a></em></p>
|
|
Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::in_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1175">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1176">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1177">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1178">backlink</a></em></p>
|
|
Unknown target name: "enable_if`_< typename boost::mpl::`eval_if_`_< boost::`is_scalar`_<t> , boost::mpl::`false_".</div>
|
|
<div class="system-message" id="id1179">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1180">backlink</a></em></p>
|
|
Unknown target name: "eval_if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::consume_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1181">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 306); <em><a href="#id1182">backlink</a></em></p>
|
|
Unknown target name: "if_`_< boost::`is_same`_< typename tag::qualifier , boost::parameter::forward_reference > , boost::mpl::`true_".</div>
|
|
<div class="system-message" id="id1183">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 748); <em><a href="#id1184">backlink</a></em></p>
|
|
Unknown target name: "metafunction".</div>
|
|
<div class="system-message" id="id1185">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 851); <em><a href="#id1186">backlink</a></em></p>
|
|
Unknown target name: "metafunction".</div>
|
|
<div class="system-message" id="id1187">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 967); <em><a href="#id1188">backlink</a></em></p>
|
|
Unknown target name: "true".</div>
|
|
<div class="system-message" id="id1189">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 967); <em><a href="#id1190">backlink</a></em></p>
|
|
Unknown target name: "false".</div>
|
|
<div class="system-message" id="id1191">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1020); <em><a href="#id1192">backlink</a></em></p>
|
|
Unknown target name: "true".</div>
|
|
<div class="system-message" id="id1193">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1020); <em><a href="#id1194">backlink</a></em></p>
|
|
Unknown target name: "false".</div>
|
|
<div class="system-message" id="id1195">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1089); <em><a href="#id1196">backlink</a></em></p>
|
|
Unknown target name: "are_tagged_arguments|_<t0,pack...> , |argumentpack".</div>
|
|
<div class="system-message" id="id1197">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1461); <em><a href="#id1198">backlink</a></em></p>
|
|
Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_0boost_ ## __line__ ## **name**( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) { return boost_param_dispatch_0boost_ ## __line__ ## **name**( static_cast<resulttype(*)()>(`nullptr".</div>
|
|
<div class="system-message" id="id1199">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1935); <em><a href="#id1200">backlink</a></em></p>
|
|
Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_ ## __line__ ## **name**<args>::type boost_param_impl ## __line__ ## **name**(args const& args) { return this->boost_param_dispatch_0boost_ ## __line__ ## **name**( static_cast< typename boost_param_result_ ## __line__ ## **name**< args >::type(*)() >(`nullptr".</div>
|
|
<div class="system-message" id="id1201">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 1935); <em><a href="#id1202">backlink</a></em></p>
|
|
Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_0boost_ ## __line__ ## **name**( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) { return this->boost_param_dispatch_0boost_ ## __line__ ## **name**( static_cast<resulttype(*)()>(`nullptr".</div>
|
|
<div class="system-message" id="id1203">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2371); <em><a href="#id1204">backlink</a></em></p>
|
|
Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_const_ ## __line__ ## **name**<args>::type boost_param_impl_const ## __line__ ## **name**(args const& args) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## **name**( static_cast< typename boost_param_result_const_ ## __line__ ## **name**< args >::type(*)() >(`nullptr".</div>
|
|
<div class="system-message" id="id1205">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2371); <em><a href="#id1206">backlink</a></em></p>
|
|
Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_const_0boost_ ## __line__ ## **name**( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## **name**( static_cast<resulttype(*)()>(`nullptr".</div>
|
|
<div class="system-message" id="id1207">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2555); <em><a href="#id1208">backlink</a></em></p>
|
|
Unknown target name: "map`_<char const*,std::`string".</div>
|
|
<div class="system-message" id="id1209">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2598); <em><a href="#id1210">backlink</a></em></p>
|
|
Unknown target name: "map`_<char const*,std::`string".</div>
|
|
<div class="system-message" id="id1211">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2704); <em><a href="#id1212">backlink</a></em></p>
|
|
Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_ ## __line__ ## operator<args>::type boost_param_impl ## __line__ ## operator(args const& args) { return this->boost_param_dispatch_0boost_ ## __line__ ## operator( static_cast< typename boost_param_result_ ## __line__ ## operator< args >::type(*)() >(`nullptr".</div>
|
|
<div class="system-message" id="id1213">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 2704); <em><a href="#id1214">backlink</a></em></p>
|
|
Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_0boost_ ## __line__ ## operator( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) { return this->boost_param_dispatch_0boost_ ## __line__ ## operator( static_cast<resulttype(*)()>(`nullptr".</div>
|
|
<div class="system-message" id="id1215">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3144); <em><a href="#id1216">backlink</a></em></p>
|
|
Unknown target name: "forward`_<a0>(a0) , … , std::`forward`_<a ## **m**>(a ## **m**) ) ); } template <typename args> typename boost_param_result_const_ ## __line__ ## operator<args>::type boost_param_impl_const ## __line__ ## operator(args const& args) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## operator( static_cast< typename boost_param_result_const_ ## __line__ ## operator< args >::type(*)() >(`nullptr".</div>
|
|
<div class="system-message" id="id1217">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3144); <em><a href="#id1218">backlink</a></em></p>
|
|
Unknown target name: "forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **0** >::type >(args[ *keyword object of required parameter* ## **0**]) , … , std::`forward`_< typename |value_type|_< args , *keyword tag type of required parameter* ## **n** >::type >(args[ *keyword object of required parameter* ## **n**]) ); } template < typename resulttype , typename args , typename *argument name* ## **0** ## _type , … , typename *argument name* ## **n** ## _type > resulttype boost_param_dispatch_const_0boost_ ## __line__ ## operator( (resulttype(*)()) , args const& args , *argument name* ## **0** ## _type&& *argument name* ## **0** , … , *argument name* ## **n** ## _type&& *argument name* ## **n** ) const { return this-> boost_param_dispatch_const_0boost_ ## __line__ ## operator( static_cast<resulttype(*)()>(`nullptr".</div>
|
|
<div class="system-message" id="id1219">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3325); <em><a href="#id1220">backlink</a></em></p>
|
|
Unknown target name: "map`_<char const*,std::`string".</div>
|
|
<div class="system-message" id="id1221">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 3376); <em><a href="#id1222">backlink</a></em></p>
|
|
Unknown target name: "map`_<char const*,std::`string".</div>
|
|
<div class="system-message" id="id1223">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4597); <em><a href="#id1224">backlink</a></em></p>
|
|
Unknown target name: "map`_<char const*,std::`string".</div>
|
|
<div class="system-message" id="id1225">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 4640); <em><a href="#id1226">backlink</a></em></p>
|
|
Unknown target name: "map`_<char const*,std::`string".</div>
|
|
<div class="system-message" id="id1227">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6732); <em><a href="#id1228">backlink</a></em></p>
|
|
Unknown target name: "keyword|_<*tag-name*> const& *alias*; // the following definitions are available only when // |boost_parameter_can_use_mp11".</div>
|
|
<div class="system-message" id="id1229">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 6829); <em><a href="#id1230">backlink</a></em></p>
|
|
Unknown target name: "forward`_<a1>(a1) , std::`forward`_<a2>(a2) , … , std::`forward`_<a ## **l**>(a ## **l**) ) ); } template < typename a1 , typename a2 , … , typename a ## **l** , typename a ## boost_pp_inc_(**l**) > r name( a1 && a1, a2 && a2, …, a ## **l** && a ## **l** , a ## boost_pp_inc_(**l**) const& a ## boost_pp_inc_(**l**) , typename **p**::match< a1, a2, …, a ## **l**, a ## boost_pp_inc_(**l**) >::type p = **p**() ) { return **name**_with_named_params( **p**( std::`forward`_<a1>(a1) , std::`forward`_<a2>(a2) , … , std::`forward`_<a ## **l**>(a ## **l**) , std::`forward`_<a ## `boost_pp_inc".</div>
|
|
<div class="system-message" id="id1231">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7030); <em><a href="#id1232">backlink</a></em></p>
|
|
Unknown target name: "boost_no_cxx11_template_aliases".</div>
|
|
<div class="system-message" id="id1233">
|
|
<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">/root/project/libs/parameter/doc/reference.rst</tt>, line 7480); <em><a href="#id1234">backlink</a></em></p>
|
|
Unknown target name: "boost_no_cxx11_template_aliases".</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<hr class="footer" />
|
|
Generated on: 2019-08-14 12:05 UTC.
|
|
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|