mirror of
https://github.com/boostorg/parameter.git
synced 2026-01-22 17:32:33 +00:00
Compare commits
6 Commits
boost-1.45
...
boost-1.57
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49ab4faa2b | ||
|
|
45295c87bc | ||
|
|
b74489d477 | ||
|
|
475001a591 | ||
|
|
f9e0d1c5c3 | ||
|
|
bdcbf442bf |
0
doc/Jamfile.v2
Normal file → Executable file
0
doc/Jamfile.v2
Normal file → Executable file
@@ -37,7 +37,7 @@ can be deduced from their types.</p>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- @jam_prefix.append('''
|
||||
project test : requirements <include>. <source>/boost//headers ;''') -->
|
||||
project test : requirements <include>. <implicit-dependency>/boost//headers ;''') -->
|
||||
<!-- @example.prepend('''
|
||||
#include <boost/parameter.hpp>
|
||||
|
||||
@@ -78,14 +78,14 @@ int x = '''); -->
|
||||
<tbody valign="top">
|
||||
<tr class="field"><th class="field-name">Authors:</th><td class="field-body">David Abrahams, Daniel Wallin</td>
|
||||
</tr>
|
||||
<tr class="field"><th class="field-name">Contact:</th><td class="field-body"><a class="reference external" href="mailto:dave@boost-consulting.com">dave@boost-consulting.com</a>, <a class="reference external" href="mailto:dalwan01@student.umu.se">dalwan01@student.umu.se</a></td>
|
||||
<tr class="field"><th class="field-name">Contact:</th><td class="field-body"><a class="reference external" href="mailto:dave@boost-consulting.com">dave@boost-consulting.com</a>, <a class="reference external" href="mailto:daniel@boostpro.com">daniel@boostpro.com</a></td>
|
||||
</tr>
|
||||
<tr class="field"><th class="field-name">Organization:</th><td class="field-body"><a class="reference external" href="http://www.boost-consulting.com">Boost Consulting</a></td>
|
||||
<tr class="field"><th class="field-name">organization:</th><td class="field-body"><a class="reference external" href="http://www.boostpro.com">BoostPro Computing</a></td>
|
||||
</tr>
|
||||
<tr class="field"><th class="field-name">Date:</th><td class="field-body">$Date: 2005/07/18 20:34:31 $</td>
|
||||
<tr class="field"><th class="field-name">date:</th><td class="field-body">$Date: 2005/07/17 19:53:01 $</td>
|
||||
</tr>
|
||||
<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">Copyright David Abrahams, Daniel Wallin 2005.
|
||||
Distributed under the Boost Software License,
|
||||
<tr class="field"><th class="field-name">copyright:</th><td class="field-body">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>
|
||||
@@ -508,7 +508,7 @@ tuple:</p>
|
||||
(required <strong>(graph, *)</strong> )
|
||||
</pre>
|
||||
<p class="compound-last">Since <tt class="docutils literal"><span class="pre">depth_first_search</span></tt> doesn't require any particular type
|
||||
for its <tt class="docutils literal"><span class="pre">graph</span></tt> parameter, we use an asterix to indicate that
|
||||
for its <tt class="docutils literal"><span class="pre">graph</span></tt> parameter, we use an asterisk to indicate that
|
||||
any type is allowed. Required parameters must always precede any
|
||||
optional parameters in a signature, but if there are <em>no</em>
|
||||
required parameters, the <tt class="docutils literal"><span class="pre">(required</span> <span class="pre">…</span> <span class="pre">)</span></tt> clause can be omitted
|
||||
@@ -727,7 +727,7 @@ worse—think of the kinds of errors you get from your STL
|
||||
implementation when you make a mistake).<a class="footnote-reference" href="#conceptcpp" id="id7"><sup>4</sup></a></li>
|
||||
<li>The problems with exposing such permissive function template
|
||||
signatures have been the subject of much discussion, especially
|
||||
in the presence of <a class="reference external" href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#225">unqualified calls</a>. If all we want is to
|
||||
in the presence of <a class="reference external" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">unqualified calls</a>. If all we want is to
|
||||
avoid unintentional argument-dependent lookup (ADL), we can
|
||||
isolate <tt class="docutils literal"><span class="pre">depth_first_search</span></tt> in a namespace containing no
|
||||
types<a class="footnote-reference" href="#using" id="id8"><sup>6</sup></a>, but suppose we <em>want</em> it to found via ADL?</li>
|
||||
@@ -791,7 +791,7 @@ Metafunctions</a>. There's no space to give a complete description
|
||||
of metafunctions or of graph library details here, but we'll show
|
||||
you the complete signature with maximal checking, just to give you
|
||||
a feel for how it's done. Each predicate metafunction is enclosed
|
||||
in parentheses <em>and preceded by an asterix</em>, as follows:</p>
|
||||
in parentheses <em>and preceded by an asterisk</em>, as follows:</p>
|
||||
<pre class="literal-block">
|
||||
BOOST_PARAMETER_FUNCTION(
|
||||
(void), depth_first_search, graphs
|
||||
@@ -1026,7 +1026,7 @@ BOOST_PARAMETER_NAME(arg2)
|
||||
struct callable2
|
||||
{
|
||||
BOOST_PARAMETER_CONST_MEMBER_FUNCTION(
|
||||
(void), operator(), tag, (required (arg1,(int))(arg2,(int))))
|
||||
(void), call, tag, (required (arg1,(int))(arg2,(int))))
|
||||
{
|
||||
std::cout << arg1 << ", " << arg2 << std::endl;
|
||||
}
|
||||
@@ -1034,7 +1034,9 @@ struct callable2
|
||||
</pre>
|
||||
<!-- @example.prepend('''
|
||||
#include <boost/parameter.hpp>
|
||||
#include <iostream>''') -->
|
||||
#include <iostream>
|
||||
using namespace boost::parameter;
|
||||
''') -->
|
||||
<!-- @test('compile') -->
|
||||
<p>These macros don't directly allow a function's interface to be
|
||||
separated from its implementation, but you can always forward
|
||||
@@ -1043,7 +1045,7 @@ arguments on to a separate implementation function:</p>
|
||||
struct callable2
|
||||
{
|
||||
BOOST_PARAMETER_CONST_MEMBER_FUNCTION(
|
||||
(void), operator(), tag, (required (arg1,(int))(arg2,(int))))
|
||||
(void), call, tag, (required (arg1,(int))(arg2,(int))))
|
||||
{
|
||||
call_impl(arg1,arg2);
|
||||
}
|
||||
@@ -1055,8 +1057,33 @@ struct callable2
|
||||
#include <boost/parameter.hpp>
|
||||
|
||||
BOOST_PARAMETER_NAME(arg1)
|
||||
BOOST_PARAMETER_NAME(arg2)''') -->
|
||||
BOOST_PARAMETER_NAME(arg2)
|
||||
using namespace boost::parameter;
|
||||
''') -->
|
||||
<!-- @test('compile') -->
|
||||
<div class="section" id="static-member-functions">
|
||||
<h3>2.2.1 Static Member Functions</h3>
|
||||
<p>To expose a static member function, simply insert the keyword
|
||||
“<tt class="docutils literal"><span class="pre">static</span></tt>” before the function name:</p>
|
||||
<pre class="literal-block">
|
||||
BOOST_PARAMETER_NAME(arg1)
|
||||
|
||||
struct somebody
|
||||
{
|
||||
BOOST_PARAMETER_MEMBER_FUNCTION(
|
||||
(void), <strong>static</strong> f, tag, (optional (arg1,(int),0)))
|
||||
{
|
||||
std::cout << arg1 << std::endl;
|
||||
}
|
||||
};
|
||||
</pre>
|
||||
<!-- @example.prepend('''
|
||||
#include <boost/parameter.hpp>
|
||||
#include <iostream>
|
||||
using namespace boost::parameter;
|
||||
''') -->
|
||||
<!-- @test('compile') -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="parameter-enabled-constructors">
|
||||
<h2><a class="toc-backref" href="#id29">2.3 Parameter-Enabled Constructors</a></h2>
|
||||
@@ -1224,10 +1251,10 @@ namespace boost { namespace python {
|
||||
using boost::mpl::_;
|
||||
|
||||
typedef parameter::parameters<
|
||||
required<tag::class_type, is_class<_> >
|
||||
, optional<tag::base_list, mpl::is_sequence<_> >
|
||||
, optional<tag::held_type>
|
||||
, optional<tag::copyable>
|
||||
required<tag::class_type, boost::is_class<_> >
|
||||
, parameter::optional<tag::base_list, mpl::is_sequence<_> >
|
||||
, parameter::optional<tag::held_type>
|
||||
, parameter::optional<tag::copyable>
|
||||
> class_signature;
|
||||
|
||||
}}
|
||||
@@ -1236,6 +1263,7 @@ typedef parameter::parameters<
|
||||
#include <boost/parameter.hpp>
|
||||
#include <boost/mpl/is_sequence.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/type_traits/is_class.hpp>
|
||||
#include <memory>
|
||||
|
||||
using namespace boost::parameter;
|
||||
@@ -1255,11 +1283,13 @@ struct bases
|
||||
</div>
|
||||
<div class="section" id="argument-packs-and-parameter-extraction">
|
||||
<span id="binding-intro"></span><h4>2.4.1.4 Argument Packs and Parameter Extraction</h4>
|
||||
<p>Next, within the body of <tt class="docutils literal"><span class="pre">class_</span></tt> , we use the <span class="concept">ParameterSpec</span>'s nested <tt class="docutils literal"><span class="pre">::bind<</span> <span class="pre">…</span> <span class="pre">></span></tt> template to bundle the actual arguments
|
||||
into an <a class="reference external" href="reference.html#argumentpack"><span class="concept">ArgumentPack</span></a> type, and then use the library's <tt class="docutils literal"><span class="pre">binding<</span>
|
||||
<span class="pre">…</span> <span class="pre">></span></tt> metafunction to extract “logical parameters”. Note that
|
||||
defaults are specified by supplying an optional third argument to
|
||||
<tt class="docutils literal"><span class="pre">binding<</span> <span class="pre">…</span> <span class="pre">></span></tt>:</p>
|
||||
<p>Next, within the body of <tt class="docutils literal"><span class="pre">class_</span></tt> , we use the <span class="concept">ParameterSpec</span>'s
|
||||
nested <tt class="docutils literal"><span class="pre">::bind<</span> <span class="pre">…</span> <span class="pre">></span></tt> template to bundle the actual arguments into an
|
||||
<a class="reference external" href="reference.html#argumentpack"><span class="concept">ArgumentPack</span></a> type, and then use the library's <tt class="docutils literal"><span class="pre">value_type<</span> <span class="pre">…</span> <span class="pre">></span></tt>
|
||||
metafunction to extract “logical parameters”. <tt class="docutils literal"><span class="pre">value_type<</span> <span class="pre">…</span> <span class="pre">></span></tt> is
|
||||
a lot like <tt class="docutils literal"><span class="pre">binding<</span> <span class="pre">…</span> <span class="pre">></span></tt>, but no reference is added to the actual
|
||||
argument type. Note that defaults are specified by passing it an
|
||||
optional third argument:</p>
|
||||
<pre class="literal-block">
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -1277,16 +1307,16 @@ struct class_
|
||||
args;
|
||||
|
||||
// Extract first logical parameter.
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::class_type>::type class_type;
|
||||
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::base_list, bases<> >::type base_list;
|
||||
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::held_type, class_type>::type held_type;
|
||||
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::copyable, void>::type copyable;
|
||||
};
|
||||
|
||||
@@ -1381,12 +1411,12 @@ parameters deducible:</p>
|
||||
typedef parameter::parameters<
|
||||
required<tag::class_type, is_class<_> >
|
||||
|
||||
, optional<
|
||||
, parameter::optional<
|
||||
deduced<tag::base_list>
|
||||
, is_base_and_derived<detail::bases_base,_>
|
||||
>
|
||||
|
||||
, optional<
|
||||
, parameter::optional<
|
||||
deduced<tag::held_type>
|
||||
, mpl::not_<
|
||||
mpl::or_<
|
||||
@@ -1396,11 +1426,12 @@ typedef parameter::parameters<
|
||||
>
|
||||
>
|
||||
|
||||
, optional<deduced<tag::copyable>, is_same<noncopyable,_> >
|
||||
, parameter::optional<deduced<tag::copyable>, is_same<noncopyable,_> >
|
||||
|
||||
> class_signature;
|
||||
</pre>
|
||||
<!-- @example.prepend('''
|
||||
#include <boost/type_traits/is_class.hpp>
|
||||
namespace boost { namespace python {''') -->
|
||||
<!-- @example.append('''
|
||||
template <
|
||||
@@ -1417,16 +1448,16 @@ struct class_
|
||||
args;
|
||||
|
||||
// Extract first logical parameter.
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::class_type>::type class_type;
|
||||
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::base_list, bases<> >::type base_list;
|
||||
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::held_type, class_type>::type held_type;
|
||||
|
||||
typedef typename parameter::binding<
|
||||
typedef typename parameter::value_type<
|
||||
args, tag::copyable, void>::type copyable;
|
||||
};
|
||||
|
||||
@@ -1570,7 +1601,7 @@ using boost::mpl::_;''') -->
|
||||
int main()
|
||||
{}''') -->
|
||||
<!-- @test('run', howmany='all') -->
|
||||
<p>Note that because of the <a class="reference external" href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm">forwarding problem</a>, <tt class="docutils literal"><span class="pre">parameter::parameters::operator()</span></tt>
|
||||
<p>Note that because of the <a class="reference external" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm">forwarding problem</a>, <tt class="docutils literal"><span class="pre">parameter::parameters::operator()</span></tt>
|
||||
can't accept non-const rvalues.</p>
|
||||
</div>
|
||||
<div class="section" id="extracting-parameter-types">
|
||||
@@ -1613,15 +1644,13 @@ int main()
|
||||
<p>Occasionally one needs to deduce argument types without an extra
|
||||
layer of function call. For example, suppose we wanted to return
|
||||
twice the value of the <tt class="docutils literal"><span class="pre">index</span></tt> parameter? In that
|
||||
case we can use the <tt class="docutils literal"><span class="pre">binding<</span> <span class="pre">…</span> <span class="pre">></span></tt> metafunction introduced
|
||||
case we can use the <tt class="docutils literal"><span class="pre">value_type<</span> <span class="pre">…</span> <span class="pre">></span></tt> metafunction introduced
|
||||
<a class="reference internal" href="#binding-intro">earlier</a>:</p>
|
||||
<pre class="literal-block">
|
||||
BOOST_PARAMETER_NAME(index)
|
||||
|
||||
template <class ArgumentPack>
|
||||
typename remove_reference<
|
||||
typename parameter::binding<ArgumentPack, tag::index, int>::type
|
||||
>::type
|
||||
typename parameter::value_type<ArgumentPack, tag::index, int>::type
|
||||
twice_index(ArgumentPack const& args)
|
||||
{
|
||||
return 2 * args[_index|42];
|
||||
@@ -1635,32 +1664,16 @@ int six = twice_index(_index = 3);
|
||||
#include <cassert>
|
||||
|
||||
namespace parameter = boost::parameter;
|
||||
using boost::remove_reference;''') -->
|
||||
<p>Note that the <tt class="docutils literal"><span class="pre">remove_reference<</span> <span class="pre">…</span> <span class="pre">></span></tt> dance is necessary because
|
||||
<tt class="docutils literal"><span class="pre">binding<</span> <span class="pre">…</span> <span class="pre">></span></tt> will return a reference type when the argument
|
||||
is bound in the argument pack. If we don't strip the reference we
|
||||
end up returning a reference to the temporary created in the <tt class="docutils literal"><span class="pre">2</span> <span class="pre">*</span> <span class="pre">…</span></tt>
|
||||
expression. A convenient shortcut would be to use the <tt class="docutils literal"><span class="pre">value_type<</span> <span class="pre">…</span> <span class="pre">></span></tt>
|
||||
metafunction:</p>
|
||||
<pre class="literal-block">
|
||||
template <class ArgumentPack>
|
||||
typename <strong>parameter::value_type<ArgumentPack, tag::index, int></strong>::type
|
||||
twice_index(ArgumentPack const& args)
|
||||
{
|
||||
return 2 * args[_index|42];
|
||||
}
|
||||
</pre>
|
||||
<!-- @example.wrap('namespace with_value_type {', '''
|
||||
int six = twice_index(_index = 3);
|
||||
}''') -->
|
||||
<!-- TODO: binding<> returns a reference. We should use value_type<> here. -->
|
||||
''') -->
|
||||
<!-- @example.append('''
|
||||
int main()
|
||||
{
|
||||
assert(six == 6);
|
||||
assert(with_value_type::six == 6);
|
||||
}''') -->
|
||||
<!-- @test('run', howmany='all') -->
|
||||
<p>Note that if we had used <tt class="docutils literal"><span class="pre">binding<</span> <span class="pre">…</span> <span class="pre">></span></tt> rather than <tt class="docutils literal"><span class="pre">value_type<</span> <span class="pre">…</span>
|
||||
<span class="pre">></span></tt>, we would end up returning a reference to the temporary created in
|
||||
the <tt class="docutils literal"><span class="pre">2</span> <span class="pre">*</span> <span class="pre">…</span></tt> expression.</p>
|
||||
</div>
|
||||
<div class="section" id="lazy-default-computation">
|
||||
<h3>3.2.3 Lazy Default Computation</h3>
|
||||
|
||||
@@ -1094,7 +1094,7 @@ already <tt class="docutils literal"><span class="pre">#defined</span></tt>.</p>
|
||||
<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"><span class="pre">5</span></tt></td>
|
||||
<tr class="field"><th class="field-name">Default Value:</th><td class="field-body"><tt class="docutils literal"><span class="pre">8</span></tt></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
0
doc/html/rst.css
Normal file → Executable file
0
doc/html/rst.css
Normal file → Executable file
0
doc/html/vellipsis.gif
Normal file → Executable file
0
doc/html/vellipsis.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 62 B After Width: | Height: | Size: 62 B |
@@ -30,7 +30,7 @@ __ ../../../../index.htm
|
||||
can be deduced from their types.
|
||||
|
||||
.. @jam_prefix.append('''
|
||||
project test : requirements <include>. <source>/boost//headers ;''')
|
||||
project test : requirements <include>. <implicit-dependency>/boost//headers ;''')
|
||||
|
||||
.. @example.prepend('''
|
||||
#include <boost/parameter.hpp>
|
||||
@@ -783,7 +783,7 @@ signatures.
|
||||
isolate ``depth_first_search`` in a namespace containing no
|
||||
types [#using]_, but suppose we *want* it to found via ADL?
|
||||
|
||||
__ http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#225
|
||||
__ http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225
|
||||
|
||||
It's usually a good idea to prevent functions from being considered
|
||||
for overload resolution when the passed argument types aren't
|
||||
@@ -1767,7 +1767,7 @@ its function call operator:
|
||||
Note that because of the `forwarding problem`_, ``parameter::parameters::operator()``
|
||||
can't accept non-const rvalues.
|
||||
|
||||
.. _`forwarding problem`: http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm
|
||||
.. _`forwarding problem`: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm
|
||||
|
||||
Extracting Parameter Types
|
||||
==========================
|
||||
|
||||
@@ -970,7 +970,7 @@ already ``#defined``.
|
||||
|
||||
__ ../../../../boost/parameter/config.hpp
|
||||
|
||||
:Default Value: ``5``
|
||||
:Default Value: ``8``
|
||||
|
||||
Tutorial
|
||||
========
|
||||
|
||||
0
include/boost/parameter.hpp
Normal file → Executable file
0
include/boost/parameter.hpp
Normal file → Executable file
@@ -40,11 +40,11 @@ struct use_default_tag {};
|
||||
// X(something, *(predicate))
|
||||
// X(something, (int))
|
||||
|
||||
template <class T>
|
||||
template <class T, class Args>
|
||||
struct cast;
|
||||
|
||||
template <>
|
||||
struct cast<void*>
|
||||
template <class Args>
|
||||
struct cast<void*, Args>
|
||||
{
|
||||
static use_default_tag execute(use_default_tag)
|
||||
{
|
||||
@@ -73,27 +73,39 @@ struct cast<void*>
|
||||
|
||||
typedef void* voidstar;
|
||||
|
||||
template <class T>
|
||||
struct cast<voidstar(T)>
|
||||
: cast<void*>
|
||||
template <class T, class Args>
|
||||
struct cast<voidstar(T), Args>
|
||||
: cast<void*, Args>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <class T>
|
||||
struct cast<void*(T)>
|
||||
: cast<void*>
|
||||
template <class T, class Args>
|
||||
struct cast<void*(T), Args>
|
||||
: cast<void*, Args>
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
struct cast<void(T)>
|
||||
// This is a hack used in cast<> to turn the user supplied type,
|
||||
// which may or may not be a placeholder expression into one, so
|
||||
// that it will be properly evaluated by mpl::apply.
|
||||
template <class T, class Dummy = mpl::_1>
|
||||
struct as_placeholder_expr
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T, class Args>
|
||||
struct cast<void(T), Args>
|
||||
{
|
||||
typedef typename mpl::apply2<
|
||||
as_placeholder_expr<T>, Args, Args>::type type0;
|
||||
|
||||
typedef typename boost::add_reference<
|
||||
typename boost::remove_const<T>::type
|
||||
typename boost::remove_const<type0>::type
|
||||
>::type reference;
|
||||
|
||||
static use_default_tag execute(use_default_tag)
|
||||
@@ -106,7 +118,7 @@ struct cast<void(T)>
|
||||
return use_default_tag();
|
||||
}
|
||||
|
||||
static T execute(T value)
|
||||
static type0 execute(type0 value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
@@ -118,9 +130,9 @@ struct cast<void(T)>
|
||||
}
|
||||
};
|
||||
|
||||
# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate) \
|
||||
boost::parameter::aux::cast<void predicate>::remove_const( \
|
||||
boost::parameter::aux::cast<void predicate>::execute(value) \
|
||||
# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate, args) \
|
||||
boost::parameter::aux::cast<void predicate, args>::remove_const( \
|
||||
boost::parameter::aux::cast<void predicate, args>::execute(value) \
|
||||
)
|
||||
|
||||
# endif
|
||||
|
||||
0
include/boost/parameter/aux_/overloads.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/overloads.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/parameter_requirements.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/parameter_requirements.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/parenthesized_type.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/parenthesized_type.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/preprocessor/flatten.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/preprocessor/flatten.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/preprocessor/for_each.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/preprocessor/for_each.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/python/invoker_iterate.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/python/invoker_iterate.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/result_of0.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/result_of0.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/tag.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/tag.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/template_keyword.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/template_keyword.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/unwrap_cv_reference.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/unwrap_cv_reference.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/void.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/void.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/yesno.hpp
Normal file → Executable file
0
include/boost/parameter/aux_/yesno.hpp
Normal file → Executable file
0
include/boost/parameter/binding.hpp
Normal file → Executable file
0
include/boost/parameter/binding.hpp
Normal file → Executable file
@@ -7,7 +7,7 @@
|
||||
#define BOOST_PARAMETER_CONFIG_050403_HPP
|
||||
|
||||
#ifndef BOOST_PARAMETER_MAX_ARITY
|
||||
# define BOOST_PARAMETER_MAX_ARITY 5
|
||||
# define BOOST_PARAMETER_MAX_ARITY 8
|
||||
#endif
|
||||
|
||||
#endif // BOOST_PARAMETER_CONFIG_050403_HPP
|
||||
|
||||
0
include/boost/parameter/keyword.hpp
Normal file → Executable file
0
include/boost/parameter/keyword.hpp
Normal file → Executable file
0
include/boost/parameter/match.hpp
Normal file → Executable file
0
include/boost/parameter/match.hpp
Normal file → Executable file
@@ -27,7 +27,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
// Tag type passed to MPL lambda.
|
||||
struct lambda_tag;
|
||||
|
||||
struct name_tag_base
|
||||
struct name_tag_base
|
||||
{};
|
||||
|
||||
template <class Tag>
|
||||
@@ -46,7 +46,7 @@ namespace boost { namespace mpl {
|
||||
template <class T>
|
||||
struct lambda<
|
||||
T
|
||||
, typename enable_if<
|
||||
, typename boost::enable_if<
|
||||
parameter::aux::is_name_tag<T>, parameter::aux::lambda_tag
|
||||
>::type
|
||||
>
|
||||
|
||||
0
include/boost/parameter/parameters.hpp
Normal file → Executable file
0
include/boost/parameter/parameters.hpp
Normal file → Executable file
@@ -701,6 +701,7 @@ struct funptr_predicate<void**>
|
||||
) \
|
||||
] \
|
||||
, BOOST_PARAMETER_FN_ARG_PRED(arg) \
|
||||
, Args \
|
||||
)
|
||||
|
||||
# define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY(name, n, split_args, tag_namespace) \
|
||||
@@ -728,6 +729,7 @@ struct funptr_predicate<void**>
|
||||
BOOST_PARAMETER_FUNCTION_CAST( \
|
||||
boost::parameter::aux::as_lvalue(BOOST_PARAMETER_FN_ARG_DEFAULT(arg), 0L) \
|
||||
, BOOST_PARAMETER_FN_ARG_PRED(arg) \
|
||||
, Args \
|
||||
)
|
||||
|
||||
# define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT_BODY(name, n, split_args, tag_ns, const_) \
|
||||
@@ -843,6 +845,7 @@ struct funptr_predicate<void**>
|
||||
boost::parameter::keyword<tag_ns::BOOST_PARAMETER_FN_ARG_KEYWORD(arg)>::instance \
|
||||
] \
|
||||
, BOOST_PARAMETER_FN_ARG_PRED(arg) \
|
||||
, Args \
|
||||
)
|
||||
|
||||
// Generates the function template that recives a ArgumentPack, and then
|
||||
|
||||
0
include/boost/parameter/python.hpp
Normal file → Executable file
0
include/boost/parameter/python.hpp
Normal file → Executable file
0
include/boost/parameter/value_type.hpp
Normal file → Executable file
0
include/boost/parameter/value_type.hpp
Normal file → Executable file
0
index.html
Normal file → Executable file
0
index.html
Normal file → Executable file
0
test/basics.cpp
Normal file → Executable file
0
test/basics.cpp
Normal file → Executable file
0
test/basics.hpp
Normal file → Executable file
0
test/basics.hpp
Normal file → Executable file
0
test/deduced.cpp
Normal file → Executable file
0
test/deduced.cpp
Normal file → Executable file
0
test/deduced.hpp
Normal file → Executable file
0
test/deduced.hpp
Normal file → Executable file
0
test/deduced_dependent_predicate.cpp
Normal file → Executable file
0
test/deduced_dependent_predicate.cpp
Normal file → Executable file
0
test/deduced_unmatched_arg.cpp
Normal file → Executable file
0
test/deduced_unmatched_arg.cpp
Normal file → Executable file
0
test/duplicates.cpp
Normal file → Executable file
0
test/duplicates.cpp
Normal file → Executable file
0
test/earwicker.cpp
Normal file → Executable file
0
test/earwicker.cpp
Normal file → Executable file
0
test/efficiency.cpp
Normal file → Executable file
0
test/efficiency.cpp
Normal file → Executable file
0
test/macros.cpp
Normal file → Executable file
0
test/macros.cpp
Normal file → Executable file
0
test/maybe.cpp
Normal file → Executable file
0
test/maybe.cpp
Normal file → Executable file
0
test/mpl.cpp
Normal file → Executable file
0
test/mpl.cpp
Normal file → Executable file
0
test/normalized_argument_types.cpp
Normal file → Executable file
0
test/normalized_argument_types.cpp
Normal file → Executable file
0
test/ntp.cpp
Normal file → Executable file
0
test/ntp.cpp
Normal file → Executable file
0
test/optional_deduced_sfinae.cpp
Normal file → Executable file
0
test/optional_deduced_sfinae.cpp
Normal file → Executable file
0
test/preprocessor.cpp
Normal file → Executable file
0
test/preprocessor.cpp
Normal file → Executable file
0
test/preprocessor_deduced.cpp
Normal file → Executable file
0
test/preprocessor_deduced.cpp
Normal file → Executable file
0
test/python_test.cpp
Normal file → Executable file
0
test/python_test.cpp
Normal file → Executable file
0
test/sfinae.cpp
Normal file → Executable file
0
test/sfinae.cpp
Normal file → Executable file
0
test/singular.cpp
Normal file → Executable file
0
test/singular.cpp
Normal file → Executable file
0
test/timings.txt
Normal file → Executable file
0
test/timings.txt
Normal file → Executable file
0
test/tutorial.cpp
Normal file → Executable file
0
test/tutorial.cpp
Normal file → Executable file
0
test/unwrap_cv_reference.cpp
Normal file → Executable file
0
test/unwrap_cv_reference.cpp
Normal file → Executable file
Reference in New Issue
Block a user