diff --git a/doc/html/reference.html b/doc/html/reference.html
index f76c28a..5d66bf2 100644
--- a/doc/html/reference.html
+++ b/doc/html/reference.html
@@ -533,14 +533,15 @@ template <class A0, …class Aβ>
These templates describe the requirements on a function parameter.
-
+optional is defined in: boost/parameter/optional.hpp.
+required is defined in: boost/parameter/required.hpp.
+Both headers are included by: boost/parameter/parameters.hpp
diff --git a/doc/reference.rst b/doc/reference.rst
index 552a181..80f0328 100644
--- a/doc/reference.rst
+++ b/doc/reference.rst
@@ -475,9 +475,16 @@ __ ../../../../boost/parameter/parameters.hpp
These templates describe the requirements on a function parameter.
-:Defined in: `boost/parameter/parameters.hpp`__
+``optional`` is defined in: |optional_header|_
+``required`` is defined in: |required_header|_
+Both headers are included by: |preprocessor_header|_
-__ ../../../../boost/parameter/parameters.hpp
+.. |optional_header| replace:: boost/parameter/optional.hpp
+.. _optional_header: ../../../../boost/parameter/optional.hpp
+.. |required_header| replace:: boost/parameter/required.hpp
+.. _required_header: ../../../../boost/parameter/required.hpp
+.. |preprocessor_header| replace:: boost/parameter/preprocessor.hpp
+.. _preprocessor_header: ../../../../boost/parameter/preprocessor.hpp
:Specializations model: |ParameterSpec|_
@@ -502,9 +509,13 @@ The default value of ``Predicate`` is an unspecified |Metafunction|_ that return
This template is used to wrap the *keyword tag* argument to
``optional`` or ``required``.
-:Defined in: `boost/parameter/parameters.hpp`__
+:Defined in: |deduced_header|_
+:Included by: |preprocessor_header|_
-__ ../../../../boost/parameter/parameters.hpp
+.. |deduced_header| replace:: boost/parameter/deduced.hpp
+.. _deduced_header: ../../../../boost/parameter/deduced.hpp
+.. |preprocessor_header| replace:: boost/parameter/preprocessor.hpp
+.. _preprocessor_header: ../../../../boost/parameter/preprocessor.hpp
.. parsed-literal::
diff --git a/include/boost/parameter/aux_/arg_list.hpp b/include/boost/parameter/aux_/arg_list.hpp
index 721ce04..5b82ccd 100644
--- a/include/boost/parameter/aux_/arg_list.hpp
+++ b/include/boost/parameter/aux_/arg_list.hpp
@@ -12,6 +12,9 @@
#include
#include
#include
+#include
+#include
+#include
#include
#include
@@ -26,15 +29,7 @@
#include
#include
-namespace boost { namespace parameter {
-
-// Forward declaration for aux::arg_list, below.
-template struct keyword;
-
-namespace aux {
-
-// Tag type passed to MPL lambda.
-struct lambda_tag;
+namespace boost { namespace parameter { namespace aux {
//
// Structures used to build the tuple of actual arguments. The
@@ -146,10 +141,6 @@ struct empty_arg_list
typedef arg_list_tag tag; // For dispatching to sequence intrinsics
};
-// Forward declaration for arg_list::operator,
-template
-struct tagged_argument;
-
template
struct get_reference
{
diff --git a/include/boost/parameter/aux_/cast.hpp b/include/boost/parameter/aux_/cast.hpp
index bd3de2b..0125e22 100644
--- a/include/boost/parameter/aux_/cast.hpp
+++ b/include/boost/parameter/aux_/cast.hpp
@@ -1,141 +1,12 @@
-// Copyright Daniel Wallin 2006. Use, modification and distribution is
-// subject to 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)
+// Copyright Daniel Wallin 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_PARAMETER_CAST_060902_HPP
-# define BOOST_PARAMETER_CAST_060902_HPP
+#define BOOST_PARAMETER_CAST_060902_HPP
-# include
+#include
-# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-# include
-# include
-# endif
-
-namespace boost { namespace parameter { namespace aux {
-
-struct use_default_tag {};
-
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-
-# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate) value
-
-# else
-
-// Handles possible implicit casts. Used by preprocessor.hpp to
-// normalize user input.
-//
-// cast::execute() is identity
-// cast::execute() is identity
-// cast::execute() casts to X
-//
-// preprocessor.hpp uses this like this:
-//
-// #define X(value, predicate)
-// cast::execute(value)
-//
-// X(something, *)
-// X(something, *(predicate))
-// X(something, (int))
-
-template
-struct cast;
-
-template
-struct cast
-{
- static use_default_tag execute(use_default_tag)
- {
- return use_default_tag();
- }
-
- static use_default_tag remove_const(use_default_tag)
- {
- return use_default_tag();
- }
-
- template
- static U& execute(U& value)
- {
- return value;
- }
-
- template
- static U& remove_const(U& x)
- {
- return x;
- }
-};
-
-#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
-
-typedef void* voidstar;
-
-template
-struct cast
- : cast
-{
-};
-
-#else
-
-template
-struct cast
- : cast
-{
-};
-
-#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
-struct as_placeholder_expr
-{
- typedef T type;
-};
-
-template
-struct cast
-{
- typedef typename mpl::apply2<
- as_placeholder_expr, Args, Args>::type type0;
-
- typedef typename boost::add_reference<
- typename boost::remove_const::type
- >::type reference;
-
- static use_default_tag execute(use_default_tag)
- {
- return use_default_tag();
- }
-
- static use_default_tag remove_const(use_default_tag)
- {
- return use_default_tag();
- }
-
- static type0 execute(type0 value)
- {
- return value;
- }
-
- template
- static reference remove_const(U const& x)
- {
- return const_cast(x);
- }
-};
-
-# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate, args) \
- boost::parameter::aux::cast::remove_const( \
- boost::parameter::aux::cast::execute(value) \
- )
-
-# endif
-
-}}} // namespace boost::parameter::aux
-
-#endif // BOOST_PARAMETER_CAST_060902_HPP
+#endif // include guard
diff --git a/include/boost/parameter/aux_/is_tagged_argument.hpp b/include/boost/parameter/aux_/is_tagged_argument.hpp
new file mode 100755
index 0000000..e2cb35c
--- /dev/null
+++ b/include/boost/parameter/aux_/is_tagged_argument.hpp
@@ -0,0 +1,46 @@
+// Copyright Daniel Wallin, David Abrahams 2005.
+// 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)
+
+#ifndef BOOST_PARAMETER_IS_TAGGED_ARGUMENT_HPP
+#define BOOST_PARAMETER_IS_TAGGED_ARGUMENT_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ struct tagged_argument_base
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct is_tagged_argument_aux
+ : ::boost::is_convertible<
+ T*
+ , ::boost::parameter::aux::tagged_argument_base const*
+ >
+ {
+ };
+
+ // This metafunction identifies tagged_argument specializations
+ // and their derived classes.
+ template
+ struct is_tagged_argument
+ : ::boost::mpl::if_<
+ ::boost::is_lvalue_reference
+ , ::boost::mpl::false_
+ , ::boost::parameter::aux::is_tagged_argument_aux
+ >::type
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/lambda_tag.hpp b/include/boost/parameter/aux_/lambda_tag.hpp
new file mode 100755
index 0000000..77759a2
--- /dev/null
+++ b/include/boost/parameter/aux_/lambda_tag.hpp
@@ -0,0 +1,16 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_LAMBDA_TAG_HPP
+#define BOOST_PARAMETER_AUX_LAMBDA_TAG_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Tag type passed to MPL lambda.
+ struct lambda_tag;
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/name.hpp b/include/boost/parameter/aux_/name.hpp
new file mode 100755
index 0000000..45f2049
--- /dev/null
+++ b/include/boost/parameter/aux_/name.hpp
@@ -0,0 +1,78 @@
+// Copyright Daniel Wallin 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_PARAMETER_AUX_NAME_HPP
+#define BOOST_PARAMETER_AUX_NAME_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ struct name_tag_base
+ {
+ };
+
+ template
+ struct name_tag
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct is_name_tag : ::boost::mpl::false_
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+#include
+
+#if !defined(BOOST_NO_SFINAE) && \
+ !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace mpl {
+
+ template
+ struct lambda<
+ T
+ , typename ::boost::enable_if<
+ ::boost::parameter::aux::is_name_tag
+ , ::boost::parameter::aux::lambda_tag
+ >::type
+ >
+ {
+ typedef ::boost::mpl::true_ is_le;
+ typedef ::boost::mpl::bind3<
+ ::boost::mpl::quote3< ::boost::parameter::value_type>
+ , ::boost::mpl::arg<2>
+ , T
+ , void
+ > result_;
+ typedef result_ type;
+ };
+}} // namespace boost::mpl
+
+#endif // SFINAE enabled, not Borland.
+
+#include
+
+#define BOOST_PARAMETER_TAG_PLACEHOLDER_TYPE(tag) \
+ ::boost::parameter::value_type< \
+ ::boost::mpl::_2,tag,::boost::parameter::void_ \
+ >
+/**/
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/as_parameter_requirements.hpp b/include/boost/parameter/aux_/pack/as_parameter_requirements.hpp
new file mode 100755
index 0000000..65fae4c
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/as_parameter_requirements.hpp
@@ -0,0 +1,32 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_AS_PARAMETER_REQUIREMENTS_HPP
+#define BOOST_PARAMETER_AUX_PACK_AS_PARAMETER_REQUIREMENTS_HPP
+
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Converts a ParameterSpec into a specialization of
+ // parameter_requirements. We need to do this in order to get the
+ // tag_type into the type in a way that can be conveniently matched
+ // by a satisfies(...) member function in arg_list.
+ template
+ struct as_parameter_requirements
+ {
+ typedef ::boost::parameter::aux::parameter_requirements<
+ typename ::boost::parameter::aux::tag_type::type
+ , typename ::boost::parameter::aux::predicate::type
+ , ::boost::parameter::aux::has_default
+ > type;
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/deduce_tag.hpp b/include/boost/parameter/aux_/pack/deduce_tag.hpp
new file mode 100755
index 0000000..d95b94b
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/deduce_tag.hpp
@@ -0,0 +1,129 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_DEDUCE_TAG_HPP
+#define BOOST_PARAMETER_AUX_PACK_DEDUCE_TAG_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ template <
+ typename Argument
+ , typename ArgumentPack
+ , typename DeducedArgs
+ , typename UsedArgs
+ , typename TagFn
+ >
+ struct deduce_tag;
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Helper for deduce_tag<...>, below.
+ template <
+ typename Argument
+ , typename ArgumentPack
+ , typename DeducedArgs
+ , typename UsedArgs
+ , typename TagFn
+ >
+ struct deduce_tag0
+ {
+ typedef typename DeducedArgs::spec spec;
+
+ typedef typename ::boost::mpl::apply_wrap2<
+ typename ::boost::mpl::lambda<
+ typename spec::predicate
+ , ::boost::parameter::aux::lambda_tag
+ >::type
+ , Argument
+ , ArgumentPack
+ >::type condition;
+
+ // Deduced parameter matches several arguments.
+ BOOST_MPL_ASSERT((
+ typename ::boost::mpl::eval_if<
+ typename ::boost::parameter::aux::has_key_<
+ UsedArgs
+ , typename ::boost::parameter::aux::tag_type::type
+ >::type
+ , ::boost::mpl::if_<
+ condition
+ , ::boost::mpl::false_
+ , ::boost::mpl::true_
+ >
+ , ::boost::mpl::true_
+ >::type
+ ));
+
+ typedef typename ::boost::mpl::eval_if<
+ condition
+ , ::boost::parameter::aux::tag_deduced
+ , ::boost::parameter::aux::deduce_tag<
+ Argument
+ , ArgumentPack
+ , typename DeducedArgs::tail
+ , UsedArgs
+ , TagFn
+ >
+ >::type type;
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Tries to deduced a keyword tag for a given Argument.
+ // Returns an mpl::pair<> consisting of the tagged_argument<>,
+ // and an mpl::set<> where the new tag has been inserted.
+ //
+ // Argument: The argument type to be tagged.
+ //
+ // ArgumentPack: The ArgumentPack built so far.
+ //
+ // DeducedArgs: A specialization of deduced_item<> (see below).
+ // A list containing only the deduced ParameterSpecs.
+ //
+ // UsedArgs: An mpl::set<> containing the keyword tags used so far.
+ //
+ // TagFn: A metafunction class used to tag positional or deduced
+ // arguments with a keyword tag.
+ template <
+ typename Argument
+ , typename ArgumentPack
+ , typename DeducedArgs
+ , typename UsedArgs
+ , typename TagFn
+ >
+ struct deduce_tag
+ : ::boost::mpl::eval_if<
+ ::boost::is_same
+ , ::boost::mpl::pair< ::boost::parameter::void_,UsedArgs>
+ , ::boost::parameter::aux::deduce_tag0<
+ Argument
+ , ArgumentPack
+ , DeducedArgs
+ , UsedArgs
+ , TagFn
+ >
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/deduced_item.hpp b/include/boost/parameter/aux_/pack/deduced_item.hpp
new file mode 100755
index 0000000..280e6ea
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/deduced_item.hpp
@@ -0,0 +1,34 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_DEDUCED_ITEM_HPP
+#define BOOST_PARAMETER_AUX_PACK_DEDUCED_ITEM_HPP
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // A typelist that stored deduced parameter specs.
+ template <
+ typename ParameterSpec
+ , typename Tail = ::boost::parameter::void_
+ >
+ struct deduced_item
+ {
+ typedef ParameterSpec spec;
+ typedef Tail tail;
+ };
+
+ // Evaluate Tail and construct deduced_item list.
+ template
+ struct make_deduced_item
+ {
+ typedef ::boost::parameter::aux
+ ::deduced_item type;
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/insert_tagged.hpp b/include/boost/parameter/aux_/pack/insert_tagged.hpp
new file mode 100755
index 0000000..bef47b1
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/insert_tagged.hpp
@@ -0,0 +1,23 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_INSERT_TAGGED_HPP
+#define BOOST_PARAMETER_AUX_PACK_INSERT_TAGGED_HPP
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Inserts Tagged::key_type into the UserArgs set.
+ // Extra indirection to lazily evaluate Tagged::key_type.
+ template
+ struct insert_tagged
+ : ::boost::parameter::aux::insert_
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/is_named_argument.hpp b/include/boost/parameter/aux_/pack/is_named_argument.hpp
new file mode 100755
index 0000000..6c9be3c
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/is_named_argument.hpp
@@ -0,0 +1,28 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_IS_NAMED_ARGUMENT_HPP
+#define BOOST_PARAMETER_AUX_PACK_IS_NAMED_ARGUMENT_HPP
+
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct is_named_argument
+ : ::boost::mpl::if_<
+ ::boost::parameter::aux::is_template_keyword
+ , ::boost::mpl::true_
+ , ::boost::parameter::aux::is_tagged_argument
+ >::type
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/item.hpp b/include/boost/parameter/aux_/pack/item.hpp
new file mode 100755
index 0000000..b408051
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/item.hpp
@@ -0,0 +1,47 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_ITEM_HPP
+#define BOOST_PARAMETER_AUX_PACK_ITEM_HPP
+
+#include
+#include
+#include
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+#include
+#include
+#endif
+
+namespace boost { namespace parameter { namespace aux {
+
+ // A parameter spec item typelist.
+ template <
+ typename Spec
+ , typename Arg
+ , typename Tail = ::boost::parameter::void_
+ >
+ struct item
+ {
+ typedef Spec spec;
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ typedef ::boost::is_const<
+ typename ::boost::remove_reference::type
+ > is_arg_const;
+#endif
+ typedef Arg arg;
+ typedef Tail tail;
+ };
+
+ template
+ struct make_item
+ {
+ typedef boost::parameter::aux
+ ::item type;
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/make_arg_list.hpp b/include/boost/parameter/aux_/pack/make_arg_list.hpp
new file mode 100755
index 0000000..17eb0ed
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/make_arg_list.hpp
@@ -0,0 +1,276 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_MAKE_ARG_LIST_HPP
+#define BOOST_PARAMETER_AUX_PACK_MAKE_ARG_LIST_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ template <
+ typename List
+ , typename DeducedArgs
+ , typename TagFn
+ , typename Positional
+ , typename UsedArgs
+ , typename ArgumentPack
+ , typename Error
+ >
+ struct make_arg_list_aux;
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Borland needs the insane extra-indirection workaround below so that
+ // it doesn't magically drop the const qualifier from the argument type.
+ template <
+ typename List
+ , typename DeducedArgs
+ , typename TagFn
+ , typename Positional
+ , typename UsedArgs
+ , typename ArgumentPack
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ , typename argument
+#endif
+ , typename Error
+ >
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ struct make_arg_list00
+#else
+ struct make_arg_list0
+#endif
+ {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ typedef typename List::arg argument;
+#endif
+ typedef typename ::boost::remove_const<
+ typename ::boost::remove_reference::type
+ >::type arg_type;
+ typedef typename List::spec parameter_spec;
+ typedef typename ::boost::parameter::aux
+ ::tag_type::type tag_;
+ typedef ::boost::parameter::aux
+ ::is_named_argument is_tagged;
+
+ // If this argument is either explicitly tagged or a deduced
+ // parameter, then turn off positional matching.
+ typedef typename ::boost::mpl::eval_if<
+ Positional
+ , ::boost::mpl::eval_if<
+ ::boost::parameter::aux::is_deduced
+ , ::boost::mpl::false_
+ , ::boost::mpl::if_<
+ is_tagged
+ , ::boost::mpl::false_
+ , ::boost::mpl::true_
+ >
+ >
+ , ::boost::mpl::false_
+ >::type positional;
+
+ // If this parameter is explicitly tagged, then add it to the
+ // used-parmeters set. We only really need to add parameters
+ // that are deduced, but we would need a way to check if
+ // a given tag corresponds to a deduced parameter spec.
+ typedef typename ::boost::mpl::eval_if<
+ is_tagged
+ , ::boost::parameter::aux::insert_tagged
+ , ::boost::mpl::identity
+ >::type used_args;
+
+ // If this parameter is neither explicitly tagged nor positionally
+ // matched, then deduce the tag from the deduced parameter specs.
+ typedef typename ::boost::mpl::eval_if<
+ typename ::boost::mpl::if_<
+ is_tagged
+ , ::boost::mpl::true_
+ , positional
+ >::type
+ , ::boost::mpl::pair< ::boost::parameter::void_,used_args>
+ , ::boost::parameter::aux::deduce_tag<
+ argument
+ , ArgumentPack
+ , DeducedArgs
+ , used_args
+ , TagFn
+ >
+ >::type deduced_data;
+
+ // If this parameter is explicitly tagged ...
+ typedef typename ::boost::mpl::eval_if<
+ is_tagged
+ // ... just use it
+ , ::boost::mpl::identity
+ // ... else ...
+ , ::boost::mpl::eval_if<
+ // if positional matching is turned on ...
+ positional
+ // ... tag it positionally
+ , ::boost::mpl::apply_wrap2
+ // ... else, use the deduced tag
+ , ::boost::mpl::first
+ >
+ >::type tagged;
+
+ // Build the arg_list incrementally, prepending new nodes.
+ typedef typename ::boost::mpl::if_<
+ typename ::boost::mpl::if_<
+ ::boost::is_same
+ , ::boost::is_same
+ , ::boost::mpl::false_
+ >::type
+ , ::boost::parameter::aux::unmatched_argument
+ , ::boost::parameter::void_
+ >::type error;
+
+ typedef typename ::boost::mpl::if_<
+ ::boost::is_same
+ , ArgumentPack
+ , ::boost::parameter::aux::arg_list
+ >::type argument_pack;
+
+ typedef typename ::boost::parameter::aux::make_arg_list_aux<
+ typename List::tail
+ , DeducedArgs
+ , TagFn
+ , positional
+ , typename deduced_data::second
+ , argument_pack
+ , error
+ >::type type;
+ };
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ template <
+ typename List
+ , typename DeducedArgs
+ , typename TagFn
+ , typename Positional
+ , typename UsedArgs
+ , typename ArgumentPack
+ , typename Error
+ >
+ struct make_arg_list0
+ {
+ typedef typename ::boost::mpl::eval_if<
+ typename List::is_arg_const
+ , ::boost::parameter::aux::make_arg_list00<
+ List
+ , DeducedArgs
+ , TagFn
+ , Positional
+ , UsedArgs
+ , ArgumentPack
+ , typename List::arg const
+ , Error
+ >
+ , ::boost::parameter::aux::make_arg_list00<
+ List
+ , DeducedArgs
+ , TagFn
+ , Positional
+ , UsedArgs
+ , ArgumentPack
+ , typename List::arg
+ , Error
+ >
+ >::type type;
+ };
+#endif // Borland workarounds needed.
+
+ // Returns an ArgumentPack where the list of arguments has been tagged
+ // with keyword tags.
+ //
+ // List: A specialization of item<> (see below). Contains both
+ // the ordered ParameterSpecs, and the given arguments.
+ //
+ // DeducedArgs: A specialization of deduced_item<> (see below).
+ // A list containing only the deduced ParameterSpecs.
+ //
+ // TagFn: A metafunction class used to tag positional or deduced
+ // arguments with a keyword tag.
+ //
+ // Positional: An mpl::bool_<> specialization indicating if positional
+ // matching is to be performed.
+ //
+ // DeducedSet: An mpl::set<> containing the keyword tags used so far.
+ //
+ // ArgumentPack: The ArgumentPack built so far. This is initially an
+ // empty_arg_list and is built incrementally.
+ template <
+ typename List
+ , typename DeducedArgs
+ , typename TagFn
+ , typename Positional
+ , typename DeducedSet
+ , typename ArgumentPack
+ , typename Error
+ >
+ struct make_arg_list_aux
+ : ::boost::mpl::eval_if<
+ ::boost::is_same
+ , ::boost::mpl::identity< ::boost::mpl::pair >
+ , ::boost::parameter::aux::make_arg_list0<
+ List
+ , DeducedArgs
+ , TagFn
+ , Positional
+ , DeducedSet
+ , ArgumentPack
+ , Error
+ >
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // VC6.5 was choking on the default parameters for make_arg_list_aux,
+ // so this just forwards to that adding in the defaults.
+ template <
+ typename List
+ , typename DeducedArgs
+ , typename TagFn
+ , typename EmitErrors = ::boost::mpl::true_
+ >
+ struct make_arg_list
+ : ::boost::parameter::aux::make_arg_list_aux<
+ List
+ , DeducedArgs
+ , TagFn
+ , ::boost::mpl::true_
+ , ::boost::parameter::aux::set0
+ , ::boost::parameter::aux::empty_arg_list
+ , ::boost::parameter::void_
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/make_deduced_items.hpp b/include/boost/parameter/aux_/pack/make_deduced_items.hpp
new file mode 100755
index 0000000..140506c
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/make_deduced_items.hpp
@@ -0,0 +1,34 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_MAKE_DEDUCED_ITEMS_HPP
+#define BOOST_PARAMETER_AUX_PACK_MAKE_DEDUCED_ITEMS_HPP
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct make_deduced_items
+ : ::boost::mpl::eval_if<
+ ::boost::is_same
+ , ::boost::mpl::identity< ::boost::parameter::void_>
+ , ::boost::mpl::eval_if<
+ ::boost::parameter::aux::is_deduced
+ , ::boost::parameter::aux::make_deduced_item
+ , Tail
+ >
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/make_items.hpp b/include/boost/parameter/aux_/pack/make_items.hpp
new file mode 100755
index 0000000..8a9a847
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/make_items.hpp
@@ -0,0 +1,30 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_MAKE_ITEMS_HPP
+#define BOOST_PARAMETER_AUX_PACK_MAKE_ITEMS_HPP
+
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Creates a item typelist.
+ template
+ struct make_items
+ : ::boost::mpl::eval_if<
+ ::boost::is_same
+ , ::boost::mpl::identity< ::boost::parameter::void_>
+ , ::boost::parameter::aux::make_item
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/parameter_requirements.hpp b/include/boost/parameter/aux_/pack/parameter_requirements.hpp
new file mode 100755
index 0000000..709da21
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/parameter_requirements.hpp
@@ -0,0 +1,25 @@
+// Copyright Daniel Wallin, David Abrahams 2005.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_PARAMETER_REQUIREMENTS_HPP
+#define BOOST_PARAMETER_AUX_PACK_PARAMETER_REQUIREMENTS_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Used to pass static information about parameter requirements through
+ // the satisfies() overload set (below). The matched function is never
+ // invoked, but its type indicates whether a parameter matches at
+ // compile-time.
+ template
+ struct parameter_requirements
+ {
+ typedef Keyword keyword;
+ typedef Predicate predicate;
+ typedef HasDefault has_default;
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/predicate.hpp b/include/boost/parameter/aux_/pack/predicate.hpp
new file mode 100755
index 0000000..0c3903b
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/predicate.hpp
@@ -0,0 +1,67 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_PREDICATE_HPP
+#define BOOST_PARAMETER_AUX_PACK_PREDICATE_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ // helper for get_predicate<...>, below
+ template
+ struct get_predicate_or_default
+ {
+ typedef T type;
+ };
+
+ // helper for predicate<...>, below
+ template
+ struct get_predicate
+ : ::boost::parameter::aux
+ ::get_predicate_or_default
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template <>
+ struct get_predicate_or_default< ::boost::parameter::aux::use_default>
+ {
+ typedef ::boost::mpl::always< ::boost::mpl::true_> type;
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct predicate
+ : ::boost::mpl::eval_if<
+ typename ::boost::mpl::if_<
+ ::boost::parameter::aux::is_optional
+ , ::boost::mpl::true_
+ , ::boost::parameter::aux::is_required
+ >::type
+ , ::boost::parameter::aux::get_predicate
+ , ::boost::mpl::identity<
+ ::boost::mpl::always< ::boost::mpl::true_>
+ >
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/satisfies.hpp b/include/boost/parameter/aux_/pack/satisfies.hpp
new file mode 100755
index 0000000..f201a1e
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/satisfies.hpp
@@ -0,0 +1,92 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_SATISFIES_HPP
+#define BOOST_PARAMETER_AUX_PACK_SATISFIES_HPP
+
+#include
+#include
+#include
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+#include
+#include
+#include
+#include
+#include
+#else
+#include
+#include
+#endif
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Returns mpl::true_ iff the given ParameterRequirements are satisfied by
+ // ArgList.
+ template
+ struct satisfies
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+ // VC7.1 can't handle the sizeof() implementation below,
+ // so we use this instead.
+ typedef typename ::boost::mpl::apply_wrap3<
+ typename ArgList::binding
+ , typename ParameterRequirements::keyword
+ , ::boost::parameter::void_
+ , ::boost::mpl::false_
+ >::type bound;
+
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::is_same
+ , typename ParameterRequirements::has_default
+ , ::boost::mpl::apply_wrap2<
+ ::boost::parameter::aux::augment_predicate<
+ typename ParameterRequirements::predicate
+ , typename ArgList::reference
+ , typename ArgList::key_type
+ >
+ , bound
+ , ArgList
+ >
+ >::type type;
+#else // !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ sizeof(
+ ::boost::parameter::aux::to_yesno(
+ ArgList::satisfies(
+ static_cast(
+ BOOST_TTI_DETAIL_NULLPTR
+ )
+ , static_cast(BOOST_TTI_DETAIL_NULLPTR)
+ )
+ )
+ ) == sizeof(::boost::parameter::aux::yes_tag)
+ )
+ );
+
+ typedef ::boost::mpl::bool_ type;
+#endif // MSVC 7.1 workarounds needed.
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+ // Returns mpl::true_ if the requirements of the given ParameterSpec
+ // are satisfied by ArgList.
+ template
+ struct satisfies_requirements_of
+ : ::boost::parameter::aux::satisfies<
+ ArgList
+ , typename ::boost::parameter::aux
+ ::as_parameter_requirements::type
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/tag_deduced.hpp b/include/boost/parameter/aux_/pack/tag_deduced.hpp
new file mode 100755
index 0000000..f0b1d4a
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/tag_deduced.hpp
@@ -0,0 +1,37 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_TAG_DEDUCED_HPP
+#define BOOST_PARAMETER_AUX_PACK_TAG_DEDUCED_HPP
+
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ // Tags a deduced argument Arg with the keyword tag of Spec using TagFn.
+ // Returns the tagged argument and the mpl::set<> UsedArgs with the
+ // tag of Spec inserted.
+ template
+ struct tag_deduced
+ {
+ typedef ::boost::mpl::pair<
+ typename ::boost::mpl::apply_wrap2<
+ TagFn
+ , typename ::boost::parameter::aux::tag_type::type
+ , Arg
+ >::type
+ , typename ::boost::parameter::aux::insert_<
+ UsedArgs
+ , typename ::boost::parameter::aux::tag_type::type
+ >::type
+ > type;
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/tag_keyword_arg.hpp b/include/boost/parameter/aux_/pack/tag_keyword_arg.hpp
new file mode 100755
index 0000000..91d3151
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/tag_keyword_arg.hpp
@@ -0,0 +1,24 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_TAG_KEYWORD_ARG_HPP
+#define BOOST_PARAMETER_AUX_PACK_TAG_KEYWORD_ARG_HPP
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ struct tag_keyword_arg
+ {
+ template
+ struct apply
+ {
+ typedef typename ::boost::parameter::aux::tag::type type;
+ };
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/tag_template_keyword_arg.hpp b/include/boost/parameter/aux_/pack/tag_template_keyword_arg.hpp
new file mode 100755
index 0000000..c9c8167
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/tag_template_keyword_arg.hpp
@@ -0,0 +1,24 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_TAG_TEMPLATE_KEYWORD_ARG_HPP
+#define BOOST_PARAMETER_AUX_PACK_TAG_TEMPLATE_KEYWORD_ARG_HPP
+
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ struct tag_template_keyword_arg
+ {
+ template
+ struct apply
+ {
+ typedef ::boost::parameter::template_keyword type;
+ };
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/tag_type.hpp b/include/boost/parameter/aux_/pack/tag_type.hpp
new file mode 100755
index 0000000..18b0589
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/tag_type.hpp
@@ -0,0 +1,59 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_TAG_TYPE_HPP
+#define BOOST_PARAMETER_AUX_PACK_TAG_TYPE_HPP
+
+namespace boost { namespace parameter { namespace aux {
+
+ // helper for tag_type<...>, below.
+ template
+ struct get_tag_type0
+ {
+ typedef typename T::key_type type;
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct get_tag_type
+ : ::boost::mpl::eval_if<
+ ::boost::parameter::aux::is_deduced_aux
+ , ::boost::parameter::aux::get_tag_type0
+ , ::boost::mpl::identity
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct tag_type
+ : ::boost::mpl::eval_if<
+ typename ::boost::mpl::if_<
+ ::boost::parameter::aux::is_optional
+ , ::boost::mpl::true_
+ , ::boost::parameter::aux::is_required
+ >::type
+ , ::boost::parameter::aux::get_tag_type
+ , ::boost::mpl::identity
+ >
+ {
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pack/unmatched_argument.hpp b/include/boost/parameter/aux_/pack/unmatched_argument.hpp
new file mode 100755
index 0000000..817a449
--- /dev/null
+++ b/include/boost/parameter/aux_/pack/unmatched_argument.hpp
@@ -0,0 +1,31 @@
+// Copyright David Abrahams, Daniel Wallin 2003.
+// 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)
+
+#ifndef BOOST_PARAMETER_AUX_PACK_UNMATCHED_ARGUMENT_HPP
+#define BOOST_PARAMETER_AUX_PACK_UNMATCHED_ARGUMENT_HPP
+
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template
+ struct unmatched_argument
+ {
+ BOOST_MPL_ASSERT((
+ typename ::boost::mpl::if_<
+ ::boost::is_same
+ , ::boost::mpl::true_
+ , ::boost::mpl::false_
+ >::type
+ ));
+ typedef int type;
+ };
+}}} // namespace boost::parameter::aux
+
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/parameter_requirements.hpp b/include/boost/parameter/aux_/parameter_requirements.hpp
index ad7a129..d372691 100644
--- a/include/boost/parameter/aux_/parameter_requirements.hpp
+++ b/include/boost/parameter/aux_/parameter_requirements.hpp
@@ -1,25 +1,12 @@
-// Copyright Daniel Wallin, David Abrahams 2005. Use, modification and
-// distribution is subject to the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
+// Copyright Daniel Wallin, David Abrahams 2005.
+// 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)
#ifndef PARAMETER_REQUIREMENTS_050331_HPP
#define PARAMETER_REQUIREMENTS_050331_HPP
-namespace boost { namespace parameter { namespace aux {
+#include
-// Used to pass static information about parameter requirements
-// through the satisfies() overload set (below). The
-// matched function is never invoked, but its type indicates whether
-// a parameter matches at compile-time
-template
-struct parameter_requirements
-{
- typedef Keyword keyword;
- typedef Predicate predicate;
- typedef HasDefault has_default;
-};
+#endif // include guard
-}}} // namespace boost::parameter::aux
-
-#endif // PARAMETER_REQUIREMENTS_050331_HPP
diff --git a/include/boost/parameter/aux_/parenthesized_type.hpp b/include/boost/parameter/aux_/parenthesized_type.hpp
index 69e7a23..863e062 100644
--- a/include/boost/parameter/aux_/parenthesized_type.hpp
+++ b/include/boost/parameter/aux_/parenthesized_type.hpp
@@ -1,35 +1,12 @@
-// Copyright David Abrahams 2006. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// Copyright David Abrahams 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
-# define BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
+#define BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
-# include
-# include
+#include
-namespace boost { namespace parameter { namespace aux {
+#endif // include guard
-// A macro that takes a parenthesized C++ type name (T) and transforms
-// it into an un-parenthesized type expression equivalent to T.
-# define BOOST_PARAMETER_PARENTHESIZED_TYPE(x) \
- boost::parameter::aux::unaryfunptr_arg_type< void(*)x >::type
-
-// A metafunction that transforms void(*)(T) -> T
-template
-struct unaryfunptr_arg_type;
-
-template
-struct unaryfunptr_arg_type
-{
- typedef Arg type;
-};
-
-template <>
-struct unaryfunptr_arg_type
-{
- typedef void type;
-};
-
-}}} // namespace boost::parameter::aux
-
-#endif // BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP
diff --git a/include/boost/parameter/aux_/pp_impl/argument_pack.hpp b/include/boost/parameter/aux_/pp_impl/argument_pack.hpp
new file mode 100755
index 0000000..c616e55
--- /dev/null
+++ b/include/boost/parameter/aux_/pp_impl/argument_pack.hpp
@@ -0,0 +1,47 @@
+// Copyright Daniel Wallin 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_PARAMETER_AUX_PP_IMPL_ARGUMENT_PACK_HPP
+#define BOOST_PARAMETER_AUX_PP_IMPL_ARGUMENT_PACK_HPP
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace parameter { namespace aux {
+
+ template <
+ typename Parameters
+ , BOOST_PP_ENUM_BINARY_PARAMS(
+ BOOST_PARAMETER_MAX_ARITY
+ , typename A
+ , = ::boost::parameter::void_ BOOST_PP_INTERCEPT
+ )
+ >
+ struct argument_pack
+ {
+ typedef typename ::boost::parameter::aux::make_arg_list<
+ typename BOOST_PARAMETER_build_arg_list(
+ BOOST_PARAMETER_MAX_ARITY
+ , ::boost::parameter::aux::make_items
+ , typename Parameters::parameter_spec
+ , A
+ )::type
+ , typename Parameters::deduced_list
+ , ::boost::parameter::aux::tag_keyword_arg
+ , ::boost::mpl::false_
+ >::type result;
+ typedef typename ::boost::mpl::first::type type;
+ };
+}}} // namespace boost::parameter::aux
+
+#include
+#endif // include guard
+
diff --git a/include/boost/parameter/aux_/pp_impl/match.hpp b/include/boost/parameter/aux_/pp_impl/match.hpp
new file mode 100755
index 0000000..8eefd79
--- /dev/null
+++ b/include/boost/parameter/aux_/pp_impl/match.hpp
@@ -0,0 +1,36 @@
+// Copyright Daniel Wallin 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP
+#define BOOST_PARAMETER_AUX_PP_IMPL_MATCH_HPP
+
+#include
+#include