forked from boostorg/utility
*** empty log message ***
[SVN r2024]
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="document" id="the-boost-namedparams-library-logo">
|
<div class="document" id="the-boost-namedparams-library-logo">
|
||||||
<h1 class="title">The Boost.NamedParams Library <a class="reference" href="../../../index.htm"><img alt="Boost" src="../../../c++boost.gif" /></a></h1>
|
<h1 class="title">The Boost.NamedParams Library <a class="reference" href="../../../index.htm"><img alt="Boost" class="boost-logo" src="../../../c++boost.gif" /></a></h1>
|
||||||
<hr />
|
<hr />
|
||||||
<table class="field-list" frame="void" rules="none">
|
<table class="field-list" frame="void" rules="none">
|
||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
@@ -365,19 +365,19 @@ we supply a macro that generates the boilerplate code.</p>
|
|||||||
<p>Synopsis:</p>
|
<p>Synopsis:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
BOOST_NAMED_PARAMS_FUN(
|
BOOST_NAMED_PARAMS_FUN(
|
||||||
return_type, function_name, keywords_type
|
return_type, function_name
|
||||||
, min_arity, max_arity
|
, min_arity, max_arity, keywords_type
|
||||||
);
|
);
|
||||||
</pre>
|
</pre>
|
||||||
<p>To generate all the forwarding functions and the implementation
|
<p>To generate all the forwarding functions and the implementation
|
||||||
function for our example, we need only apply
|
function for our example, we need only apply
|
||||||
<tt class="literal"><span class="pre">BOOST_NAMED_PARAMS_FUN</span></tt> this way:</p>
|
<tt class="literal"><span class="pre">BOOST_NAMED_PARAMS_FUN</span></tt> this way:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
BOOST_NAMED_PARAMS_FUN(void, foo, foo_keywords, 0, 2)
|
BOOST_NAMED_PARAMS_FUN(void, foo, 0, 2, foo_keywords)
|
||||||
{
|
{
|
||||||
std::cout
|
std::cout
|
||||||
<< params[name | "unnamed"] << " = "
|
<< p[name | "unnamed"] << " = "
|
||||||
<< params[value | 0] << "\n";
|
<< p[value | 0] << "\n";
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -436,7 +436,8 @@ of lack of SFINAE support.</td></tr>
|
|||||||
</div>
|
</div>
|
||||||
<hr class="footer" />
|
<hr class="footer" />
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
Generated on: 2004-01-17.
|
<a class="reference" href="named_params.rst">View document source</a>.
|
||||||
|
Generated on: 2004-03-04 10:40 UTC.
|
||||||
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user