mirror of
https://github.com/boostorg/parameter.git
synced 2026-01-22 05:22:31 +00:00
Compare commits
1 Commits
boost-1.56
...
boost-1.48
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb8b274206 |
0
doc/Jamfile.v2
Executable file → Normal file
0
doc/Jamfile.v2
Executable file → Normal file
@@ -37,7 +37,7 @@ can be deduced from their types.</p>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- @jam_prefix.append('''
|
||||
project test : requirements <include>. <implicit-dependency>/boost//headers ;''') -->
|
||||
project test : requirements <include>. <source>/boost//headers ;''') -->
|
||||
<!-- @example.prepend('''
|
||||
#include <boost/parameter.hpp>
|
||||
|
||||
@@ -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://www.open-std.org/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://anubis.dkuug.dk/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>
|
||||
@@ -1601,7 +1601,7 @@ using boost::mpl::_;''') -->
|
||||
int main()
|
||||
{}''') -->
|
||||
<!-- @test('run', howmany='all') -->
|
||||
<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>
|
||||
<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>
|
||||
can't accept non-const rvalues.</p>
|
||||
</div>
|
||||
<div class="section" id="extracting-parameter-types">
|
||||
|
||||
@@ -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">8</span></tt></td>
|
||||
<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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
0
doc/html/rst.css
Executable file → Normal file
0
doc/html/rst.css
Executable file → Normal file
0
doc/html/vellipsis.gif
Executable file → Normal file
0
doc/html/vellipsis.gif
Executable file → Normal 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>. <implicit-dependency>/boost//headers ;''')
|
||||
project test : requirements <include>. <source>/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://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225
|
||||
__ http://anubis.dkuug.dk/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://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm
|
||||
.. _`forwarding problem`: http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm
|
||||
|
||||
Extracting Parameter Types
|
||||
==========================
|
||||
|
||||
@@ -970,7 +970,7 @@ already ``#defined``.
|
||||
|
||||
__ ../../../../boost/parameter/config.hpp
|
||||
|
||||
:Default Value: ``8``
|
||||
:Default Value: ``5``
|
||||
|
||||
Tutorial
|
||||
========
|
||||
|
||||
0
include/boost/parameter.hpp
Executable file → Normal file
0
include/boost/parameter.hpp
Executable file → Normal file
@@ -40,11 +40,11 @@ struct use_default_tag {};
|
||||
// X(something, *(predicate))
|
||||
// X(something, (int))
|
||||
|
||||
template <class T, class Args>
|
||||
template <class T>
|
||||
struct cast;
|
||||
|
||||
template <class Args>
|
||||
struct cast<void*, Args>
|
||||
template <>
|
||||
struct cast<void*>
|
||||
{
|
||||
static use_default_tag execute(use_default_tag)
|
||||
{
|
||||
@@ -73,39 +73,27 @@ struct cast<void*, Args>
|
||||
|
||||
typedef void* voidstar;
|
||||
|
||||
template <class T, class Args>
|
||||
struct cast<voidstar(T), Args>
|
||||
: cast<void*, Args>
|
||||
template <class T>
|
||||
struct cast<voidstar(T)>
|
||||
: cast<void*>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <class T, class Args>
|
||||
struct cast<void*(T), Args>
|
||||
: cast<void*, Args>
|
||||
template <class T>
|
||||
struct cast<void*(T)>
|
||||
: cast<void*>
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 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
|
||||
template <class T>
|
||||
struct cast<void(T)>
|
||||
{
|
||||
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<type0>::type
|
||||
typename boost::remove_const<T>::type
|
||||
>::type reference;
|
||||
|
||||
static use_default_tag execute(use_default_tag)
|
||||
@@ -118,7 +106,7 @@ struct cast<void(T), Args>
|
||||
return use_default_tag();
|
||||
}
|
||||
|
||||
static type0 execute(type0 value)
|
||||
static T execute(T value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
@@ -130,9 +118,9 @@ struct cast<void(T), Args>
|
||||
}
|
||||
};
|
||||
|
||||
# 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) \
|
||||
# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate) \
|
||||
boost::parameter::aux::cast<void predicate>::remove_const( \
|
||||
boost::parameter::aux::cast<void predicate>::execute(value) \
|
||||
)
|
||||
|
||||
# endif
|
||||
|
||||
0
include/boost/parameter/aux_/overloads.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/overloads.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/parameter_requirements.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/parameter_requirements.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/parenthesized_type.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/parenthesized_type.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/preprocessor/flatten.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/preprocessor/flatten.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/preprocessor/for_each.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/preprocessor/for_each.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/python/invoker_iterate.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/python/invoker_iterate.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/result_of0.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/result_of0.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/tag.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/tag.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/template_keyword.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/template_keyword.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/unwrap_cv_reference.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/unwrap_cv_reference.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/void.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/void.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/yesno.hpp
Executable file → Normal file
0
include/boost/parameter/aux_/yesno.hpp
Executable file → Normal file
0
include/boost/parameter/binding.hpp
Executable file → Normal file
0
include/boost/parameter/binding.hpp
Executable file → Normal file
@@ -7,7 +7,7 @@
|
||||
#define BOOST_PARAMETER_CONFIG_050403_HPP
|
||||
|
||||
#ifndef BOOST_PARAMETER_MAX_ARITY
|
||||
# define BOOST_PARAMETER_MAX_ARITY 8
|
||||
# define BOOST_PARAMETER_MAX_ARITY 5
|
||||
#endif
|
||||
|
||||
#endif // BOOST_PARAMETER_CONFIG_050403_HPP
|
||||
|
||||
0
include/boost/parameter/keyword.hpp
Executable file → Normal file
0
include/boost/parameter/keyword.hpp
Executable file → Normal file
0
include/boost/parameter/match.hpp
Executable file → Normal file
0
include/boost/parameter/match.hpp
Executable file → Normal 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 boost::enable_if<
|
||||
, typename enable_if<
|
||||
parameter::aux::is_name_tag<T>, parameter::aux::lambda_tag
|
||||
>::type
|
||||
>
|
||||
|
||||
0
include/boost/parameter/parameters.hpp
Executable file → Normal file
0
include/boost/parameter/parameters.hpp
Executable file → Normal file
@@ -701,7 +701,6 @@ struct funptr_predicate<void**>
|
||||
) \
|
||||
] \
|
||||
, BOOST_PARAMETER_FN_ARG_PRED(arg) \
|
||||
, Args \
|
||||
)
|
||||
|
||||
# define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY(name, n, split_args, tag_namespace) \
|
||||
@@ -729,7 +728,6 @@ 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_) \
|
||||
@@ -845,7 +843,6 @@ 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
Executable file → Normal file
0
include/boost/parameter/python.hpp
Executable file → Normal file
0
include/boost/parameter/value_type.hpp
Executable file → Normal file
0
include/boost/parameter/value_type.hpp
Executable file → Normal file
0
index.html
Executable file → Normal file
0
index.html
Executable file → Normal file
0
test/basics.cpp
Executable file → Normal file
0
test/basics.cpp
Executable file → Normal file
0
test/basics.hpp
Executable file → Normal file
0
test/basics.hpp
Executable file → Normal file
0
test/deduced.cpp
Executable file → Normal file
0
test/deduced.cpp
Executable file → Normal file
0
test/deduced.hpp
Executable file → Normal file
0
test/deduced.hpp
Executable file → Normal file
0
test/deduced_dependent_predicate.cpp
Executable file → Normal file
0
test/deduced_dependent_predicate.cpp
Executable file → Normal file
0
test/deduced_unmatched_arg.cpp
Executable file → Normal file
0
test/deduced_unmatched_arg.cpp
Executable file → Normal file
0
test/duplicates.cpp
Executable file → Normal file
0
test/duplicates.cpp
Executable file → Normal file
0
test/earwicker.cpp
Executable file → Normal file
0
test/earwicker.cpp
Executable file → Normal file
0
test/efficiency.cpp
Executable file → Normal file
0
test/efficiency.cpp
Executable file → Normal file
0
test/macros.cpp
Executable file → Normal file
0
test/macros.cpp
Executable file → Normal file
0
test/maybe.cpp
Executable file → Normal file
0
test/maybe.cpp
Executable file → Normal file
0
test/mpl.cpp
Executable file → Normal file
0
test/mpl.cpp
Executable file → Normal file
0
test/normalized_argument_types.cpp
Executable file → Normal file
0
test/normalized_argument_types.cpp
Executable file → Normal file
0
test/ntp.cpp
Executable file → Normal file
0
test/ntp.cpp
Executable file → Normal file
0
test/optional_deduced_sfinae.cpp
Executable file → Normal file
0
test/optional_deduced_sfinae.cpp
Executable file → Normal file
0
test/preprocessor.cpp
Executable file → Normal file
0
test/preprocessor.cpp
Executable file → Normal file
0
test/preprocessor_deduced.cpp
Executable file → Normal file
0
test/preprocessor_deduced.cpp
Executable file → Normal file
0
test/python_test.cpp
Executable file → Normal file
0
test/python_test.cpp
Executable file → Normal file
0
test/sfinae.cpp
Executable file → Normal file
0
test/sfinae.cpp
Executable file → Normal file
0
test/singular.cpp
Executable file → Normal file
0
test/singular.cpp
Executable file → Normal file
0
test/timings.txt
Executable file → Normal file
0
test/timings.txt
Executable file → Normal file
0
test/tutorial.cpp
Executable file → Normal file
0
test/tutorial.cpp
Executable file → Normal file
0
test/unwrap_cv_reference.cpp
Executable file → Normal file
0
test/unwrap_cv_reference.cpp
Executable file → Normal file
Reference in New Issue
Block a user