Index: aux_/cast.hpp =================================================================== --- aux_/cast.hpp (.../trunk/boost/parameter) (revision 78804) +++ aux_/cast.hpp (.../branches/release/boost/parameter) (revision 78804) @@ -40,11 +40,11 @@ // X(something, *(predicate)) // X(something, (int)) -template +template struct cast; -template -struct cast +template <> +struct cast { static use_default_tag execute(use_default_tag) { @@ -73,39 +73,27 @@ typedef void* voidstar; -template -struct cast - : cast +template +struct cast + : cast { }; #else -template -struct cast - : cast +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 +template +struct cast { - 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 + typename boost::remove_const::type >::type reference; static use_default_tag execute(use_default_tag) @@ -118,7 +106,7 @@ return use_default_tag(); } - static type0 execute(type0 value) + static T execute(T value) { return value; } @@ -130,9 +118,9 @@ } }; -# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate, args) \ - boost::parameter::aux::cast::remove_const( \ - boost::parameter::aux::cast::execute(value) \ +# define BOOST_PARAMETER_FUNCTION_CAST(value, predicate) \ + boost::parameter::aux::cast::remove_const( \ + boost::parameter::aux::cast::execute(value) \ ) # endif Index: preprocessor.hpp =================================================================== --- preprocessor.hpp (.../trunk/boost/parameter) (revision 78804) +++ preprocessor.hpp (.../branches/release/boost/parameter) (revision 78804) @@ -701,7 +701,6 @@ ) \ ] \ , BOOST_PARAMETER_FN_ARG_PRED(arg) \ - , Args \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY(name, n, split_args, tag_namespace) \ @@ -729,7 +728,6 @@ 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 @@ boost::parameter::keyword::instance \ ] \ , BOOST_PARAMETER_FN_ARG_PRED(arg) \ - , Args \ ) // Generates the function template that recives a ArgumentPack, and then