From a26354b70ef2a70722c5b2c11688d42ecaaa81b3 Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Sun, 22 Feb 2009 06:23:56 +0000 Subject: [PATCH] updates functional module: only two unfused variants, now [SVN r51379] --- include/boost/fusion/functional/adapter.hpp | 4 +- .../adapter/detail/pow2_explode.hpp | 118 ------------ .../functional/adapter/detail/pt_def.hpp | 71 ------- .../functional/adapter/detail/pt_undef.hpp | 23 --- .../fusion/functional/adapter/limits.hpp | 17 +- .../functional/adapter/unfused_generic.hpp | 175 ------------------ .../adapter/unfused_lvalue_args.hpp | 136 -------------- .../adapter/unfused_rvalue_args.hpp | 137 -------------- .../boost/fusion/functional/generation.hpp | 4 +- ...e_unfused_generic.hpp => make_unfused.hpp} | 8 +- .../generation/make_unfused_lvalue_args.hpp | 18 -- .../generation/make_unfused_rvalue_args.hpp | 18 -- include/boost/fusion/support/deduce.hpp | 12 ++ 13 files changed, 20 insertions(+), 721 deletions(-) delete mode 100644 include/boost/fusion/functional/adapter/detail/pow2_explode.hpp delete mode 100644 include/boost/fusion/functional/adapter/detail/pt_def.hpp delete mode 100644 include/boost/fusion/functional/adapter/detail/pt_undef.hpp delete mode 100644 include/boost/fusion/functional/adapter/unfused_generic.hpp delete mode 100644 include/boost/fusion/functional/adapter/unfused_lvalue_args.hpp delete mode 100644 include/boost/fusion/functional/adapter/unfused_rvalue_args.hpp rename include/boost/fusion/functional/generation/{make_unfused_generic.hpp => make_unfused.hpp} (63%) delete mode 100644 include/boost/fusion/functional/generation/make_unfused_lvalue_args.hpp delete mode 100644 include/boost/fusion/functional/generation/make_unfused_rvalue_args.hpp diff --git a/include/boost/fusion/functional/adapter.hpp b/include/boost/fusion/functional/adapter.hpp index 734dac39..1a1f9819 100644 --- a/include/boost/fusion/functional/adapter.hpp +++ b/include/boost/fusion/functional/adapter.hpp @@ -11,8 +11,6 @@ #include #include #include -#include -#include -#include +#include #include #endif diff --git a/include/boost/fusion/functional/adapter/detail/pow2_explode.hpp b/include/boost/fusion/functional/adapter/detail/pow2_explode.hpp deleted file mode 100644 index 2d14ad70..00000000 --- a/include/boost/fusion/functional/adapter/detail/pow2_explode.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2006-2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -#if !defined(BOOST_PP_IS_ITERATING) -# error "This file has to be included by a preprocessor loop construct!" -#elif BOOST_PP_ITERATION_DEPTH() == 1 - -# if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_POW2_EXPLODE_HPP_INCLUDED) -# include -# include -# include -# define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_POW2_EXPLODE_HPP_INCLUDED -# endif - -# define BOOST_PP_VALUE 0 -# include BOOST_PP_ASSIGN_SLOT(1) - -# define BOOST_PP_FILENAME_2 \ - -# define BOOST_PP_VALUE (1 << N) >> 4 -# if BOOST_PP_VALUE > BOOST_PP_LIMIT_ITERATION -# error "Preprocessor limit exceeded." -# endif - -# include BOOST_PP_ASSIGN_SLOT(2) -# define BOOST_PP_ITERATION_LIMITS (0,BOOST_PP_DEC(BOOST_PP_SLOT_2())) -# include BOOST_PP_ITERATE() - -#elif BOOST_PP_ITERATION_DEPTH() == 2 - -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# if BOOST_PP_SLOT_1() < 1 << N -# include BOOST_PP_INDIRECT_SELF -# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1 -# include BOOST_PP_ASSIGN_SLOT(1) -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif -# endif - -#endif - diff --git a/include/boost/fusion/functional/adapter/detail/pt_def.hpp b/include/boost/fusion/functional/adapter/detail/pt_def.hpp deleted file mode 100644 index 8f85cf44..00000000 --- a/include/boost/fusion/functional/adapter/detail/pt_def.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2006-2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -// No include guard - this file is included multiple times intentionally. - -#if BOOST_PP_SLOT_1() & 0x001 -# define PT0 T0 & -#else -# define PT0 T0 const & -#endif -#if BOOST_PP_SLOT_1() & 0x002 -# define PT1 T1 & -#else -# define PT1 T1 const & -#endif -#if BOOST_PP_SLOT_1() & 0x004 -# define PT2 T2 & -#else -# define PT2 T2 const & -#endif -#if BOOST_PP_SLOT_1() & 0x008 -# define PT3 T3 & -#else -# define PT3 T3 const & -#endif -#if BOOST_PP_SLOT_1() & 0x010 -# define PT4 T4 & -#else -# define PT4 T4 const & -#endif -#if BOOST_PP_SLOT_1() & 0x020 -# define PT5 T5 & -#else -# define PT5 T5 const & -#endif -#if BOOST_PP_SLOT_1() & 0x040 -# define PT6 T6 & -#else -# define PT6 T6 const & -#endif -#if BOOST_PP_SLOT_1() & 0x080 -# define PT7 T7 & -#else -# define PT7 T7 const & -#endif -#if BOOST_PP_SLOT_1() & 0x100 -# define PT8 T8 & -#else -# define PT8 T8 const & -#endif -#if BOOST_PP_SLOT_1() & 0x200 -# define PT9 T9 & -#else -# define PT9 T9 const & -#endif -#if BOOST_PP_SLOT_1() & 0x400 -# define PT10 T10 & -#else -# define PT10 T10 const & -#endif -#if BOOST_PP_SLOT_1() & 0x800 -# define PT11 T11 & -#else -# define PT11 T11 const & -#endif - diff --git a/include/boost/fusion/functional/adapter/detail/pt_undef.hpp b/include/boost/fusion/functional/adapter/detail/pt_undef.hpp deleted file mode 100644 index dca50043..00000000 --- a/include/boost/fusion/functional/adapter/detail/pt_undef.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2006-2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -// No include guard - this file is included multiple times intentionally. - -#undef PT0 -#undef PT1 -#undef PT2 -#undef PT3 -#undef PT4 -#undef PT5 -#undef PT6 -#undef PT7 -#undef PT8 -#undef PT9 -#undef PT10 -#undef PT11 - diff --git a/include/boost/fusion/functional/adapter/limits.hpp b/include/boost/fusion/functional/adapter/limits.hpp index cf6701c4..783bc632 100644 --- a/include/boost/fusion/functional/adapter/limits.hpp +++ b/include/boost/fusion/functional/adapter/limits.hpp @@ -11,29 +11,16 @@ # include -# if !defined(BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY) -# define BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY 6 +# if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY) +# define BOOST_FUSION_UNFUSED_MAX_ARITY 6 # elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE # error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" # endif -# if !defined(BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY) -# define BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY 6 -# elif BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE -# error "BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" -# endif -# if !defined(BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY) -# define BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY 6 -# elif BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE -# error "BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" -# endif # if !defined(BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY) # define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6 # elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE # error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" # endif -# if !defined(BOOST_FUSION_CONSTRUCTOR_MAX_ARITY) -# define BOOST_FUSION_CONSTRUCTOR_MAX_ARITY 6 -# endif #endif diff --git a/include/boost/fusion/functional/adapter/unfused_generic.hpp b/include/boost/fusion/functional/adapter/unfused_generic.hpp deleted file mode 100644 index 82b1e4b0..00000000 --- a/include/boost/fusion/functional/adapter/unfused_generic.hpp +++ /dev/null @@ -1,175 +0,0 @@ -/*============================================================================= - Copyright (c) 2006-2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_GENERIC_HPP_INCLUDED) -#if !defined(BOOST_PP_IS_ITERATING) - -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -namespace boost { namespace fusion -{ - template class unfused_generic; - - //----- ---- --- -- - - - - - - template - class unfused_generic - { - Function fnc_transformed; - - typedef typename detail::qf_c::type function_c; - typedef typename detail::qf::type function; - - typedef typename detail::call_param::type func_const_fwd_t; - - public: - - inline explicit unfused_generic(func_const_fwd_t f = Function()) - : fnc_transformed(f) - { } - - template - struct result; - - typedef typename boost::result_of< - function_c(fusion::vector0 &) >::type call_const_0_result; - - inline call_const_0_result operator()() const - { - fusion::vector0 arg; - return this->fnc_transformed(arg); - } - - typedef typename boost::result_of< - function (fusion::vector0 &) >::type call_0_result; - - inline call_0_result operator()() - { - fusion::vector0 arg; - return this->fnc_transformed(arg); - } - - #define BOOST_FUSION_CODE(tpl_params,arg_types,params,args) \ - template \ - inline typename boost::result_of & )>::type \ - operator()(params) const \ - { \ - BOOST_PP_CAT(fusion::vector,N) arg(args); \ - return this->fnc_transformed(arg); \ - } \ - template \ - inline typename boost::result_of & )>::type \ - operator()(params) \ - { \ - BOOST_PP_CAT(fusion::vector,N) arg(args); \ - return this->fnc_transformed(arg); \ - } - - #define BOOST_PP_INDIRECT_SELF \ - - #define BOOST_PP_FILENAME_1 \ - - #define BOOST_PP_ITERATION_LIMITS \ - (1,BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY) - #define N BOOST_PP_ITERATION_1 - #include BOOST_PP_ITERATE() - #undef N - - #undef BOOST_FUSION_CODE - }; -}} - -namespace boost -{ - template - struct result_of const ()> - { - typedef typename boost::fusion::unfused_generic::call_const_0_result type; - }; - template - struct result_of()> - { - typedef typename boost::fusion::unfused_generic::call_0_result type; - }; -} - -#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_GENERIC_HPP_INCLUDED -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#include - -#if BOOST_PP_SLOT_1() == 0 - template - struct result - < Self const (BOOST_PP_ENUM_PARAMS(N,T)) > - : boost::result_of::type BOOST_PP_INTERCEPT) > & )> - { }; - - template - struct result - < Self(BOOST_PP_ENUM_PARAMS(N,T)) > - : boost::result_of::type BOOST_PP_INTERCEPT) > & )> - { }; -#endif - -#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400)) - template - inline typename boost::result_of & )>::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const - { - BOOST_PP_CAT(fusion::vector,N) - arg(BOOST_PP_ENUM_PARAMS(N,a)); - return this->fnc_transformed(arg); - } - template - inline typename boost::result_of & )>::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) - { - BOOST_PP_CAT(fusion::vector,N) - arg(BOOST_PP_ENUM_PARAMS(N,a)); - return this->fnc_transformed(arg); - } -#else - BOOST_FUSION_CODE(BOOST_PP_ENUM_PARAMS(N,typename T), - BOOST_PP_ENUM_PARAMS(N,PT), BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a), - BOOST_PP_ENUM_PARAMS(N,a) ) - // ...generates uglier code but is faster - it caches ENUM_* -#endif - -#include - -#endif // defined(BOOST_PP_IS_ITERATING) -#endif - diff --git a/include/boost/fusion/functional/adapter/unfused_lvalue_args.hpp b/include/boost/fusion/functional/adapter/unfused_lvalue_args.hpp deleted file mode 100644 index ba2f31b6..00000000 --- a/include/boost/fusion/functional/adapter/unfused_lvalue_args.hpp +++ /dev/null @@ -1,136 +0,0 @@ -/*============================================================================= - Copyright (c) 2006-2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_LVALUE_ARGS_HPP_INCLUDED) -#if !defined(BOOST_PP_IS_ITERATING) - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -namespace boost { namespace fusion -{ - template class unfused_lvalue_args; - - //----- ---- --- -- - - - - - - template class unfused_lvalue_args - { - Function fnc_transformed; - - typedef typename detail::qf_c::type function_c; - typedef typename detail::qf::type function; - - typedef typename detail::call_param::type func_const_fwd_t; - - public: - - inline explicit unfused_lvalue_args(func_const_fwd_t f = function()) - : fnc_transformed(f) - { } - - template - struct result; - - typedef typename boost::result_of< - function_c(fusion::vector0 &) >::type call_const_0_result; - - inline call_const_0_result operator()() const - { - fusion::vector0 arg; - return this->fnc_transformed(arg); - } - - typedef typename boost::result_of< - function(fusion::vector0 &) >::type call_0_result; - - inline call_0_result operator()() - { - fusion::vector0 arg; - return this->fnc_transformed(arg); - } - - #define BOOST_PP_FILENAME_1 \ - - #define BOOST_PP_ITERATION_LIMITS \ - (1,BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY) - #include BOOST_PP_ITERATE() - }; -}} - -namespace boost -{ - template - struct result_of< boost::fusion::unfused_lvalue_args const () > - { - typedef typename boost::fusion::unfused_lvalue_args::call_const_0_result type; - }; - template - struct result_of< boost::fusion::unfused_lvalue_args() > - { - typedef typename boost::fusion::unfused_lvalue_args::call_0_result type; - }; -} - -#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_LVALUE_ARGS_HPP_INCLUDED -#else // defined(BOOST_PP_IS_ITERATING) -//////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -//////////////////////////////////////////////////////////////////////////////// -#define N BOOST_PP_ITERATION() - - template - struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) > - : boost::result_of< function_c( - BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N, - typename detail::mref::type BOOST_PP_INTERCEPT) > & )> - { }; - - template - struct result< Self(BOOST_PP_ENUM_PARAMS(N,T)) > - : boost::result_of< function( - BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N, - typename detail::mref::type BOOST_PP_INTERCEPT) > & )> - { }; - - template - inline typename boost::result_of & )>::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const - { - BOOST_PP_CAT(fusion::vector,N)< - BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) > - arg(BOOST_PP_ENUM_PARAMS(N,a)); - return this->fnc_transformed(arg); - } - - template - inline typename boost::result_of & )>::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) - { - BOOST_PP_CAT(fusion::vector,N)< - BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) > - arg(BOOST_PP_ENUM_PARAMS(N,a)); - return this->fnc_transformed(arg); - } -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) -#endif - diff --git a/include/boost/fusion/functional/adapter/unfused_rvalue_args.hpp b/include/boost/fusion/functional/adapter/unfused_rvalue_args.hpp deleted file mode 100644 index 3c80475e..00000000 --- a/include/boost/fusion/functional/adapter/unfused_rvalue_args.hpp +++ /dev/null @@ -1,137 +0,0 @@ -/*============================================================================= - Copyright (c) 2006-2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_RVALUE_ARGS_HPP_INCLUDED) -#if !defined(BOOST_PP_IS_ITERATING) - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -namespace boost { namespace fusion -{ - template class unfused_rvalue_args; - - //----- ---- --- -- - - - - - - template class unfused_rvalue_args - { - Function fnc_transformed; - - typedef typename detail::qf_c::type function_c; - typedef typename detail::qf::type function; - - typedef typename detail::call_param::type func_const_fwd_t; - - public: - - inline explicit unfused_rvalue_args(func_const_fwd_t f = function()) - : fnc_transformed(f) - { } - - template - struct result; - - typedef typename boost::result_of< - function_c(fusion::vector0 &) >::type call_const_0_result; - - inline call_const_0_result operator()() const - { - fusion::vector0 arg; - return this->fnc_transformed(arg); - } - - typedef typename boost::result_of< - function(fusion::vector0 &) >::type call_0_result; - - inline call_0_result operator()() - { - fusion::vector0 arg; - return this->fnc_transformed(arg); - } - - #define BOOST_PP_FILENAME_1 \ - - #define BOOST_PP_ITERATION_LIMITS \ - (1,BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY) - #include BOOST_PP_ITERATE() - }; -}} - -namespace boost -{ - template - struct result_of const ()> - { - typedef typename boost::fusion::unfused_rvalue_args::call_const_0_result type; - }; - template - struct result_of()> - { - typedef typename boost::fusion::unfused_rvalue_args::call_0_result type; - }; -} - -#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_RVALUE_ARGS_HPP_INCLUDED -#else // defined(BOOST_PP_IS_ITERATING) -//////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -//////////////////////////////////////////////////////////////////////////////// -#define N BOOST_PP_ITERATION() - - template - struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) > - : boost::result_of< function_c( - BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N, - typename detail::cref::type BOOST_PP_INTERCEPT) > & )> - { }; - - template - struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) > - : boost::result_of< function( - BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N, - typename detail::cref::type BOOST_PP_INTERCEPT) > & )> - { }; - - template - inline typename boost::result_of & )>::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) const - { - BOOST_PP_CAT(fusion::vector,N)< - BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT) > - arg(BOOST_PP_ENUM_PARAMS(N,a)); - return this->fnc_transformed(arg); - } - - template - inline typename boost::result_of & )>::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) - { - BOOST_PP_CAT(fusion::vector,N)< - BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT) > - arg(BOOST_PP_ENUM_PARAMS(N,a)); - return this->fnc_transformed(arg); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) -#endif - diff --git a/include/boost/fusion/functional/generation.hpp b/include/boost/fusion/functional/generation.hpp index 3dabd3ee..3d812b9f 100644 --- a/include/boost/fusion/functional/generation.hpp +++ b/include/boost/fusion/functional/generation.hpp @@ -12,8 +12,6 @@ #include #include #include -#include -#include -#include +#include #endif diff --git a/include/boost/fusion/functional/generation/make_unfused_generic.hpp b/include/boost/fusion/functional/generation/make_unfused.hpp similarity index 63% rename from include/boost/fusion/functional/generation/make_unfused_generic.hpp rename to include/boost/fusion/functional/generation/make_unfused.hpp index 87a99c59..79eadbd5 100644 --- a/include/boost/fusion/functional/generation/make_unfused_generic.hpp +++ b/include/boost/fusion/functional/generation/make_unfused.hpp @@ -6,12 +6,12 @@ http://www.boost.org/LICENSE_1_0.txt). ==============================================================================*/ -#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED) -#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED +#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP_INCLUDED) +#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP_INCLUDED -#include +#include -#define BOOST_FUSION_CLASS_TPL_NAME unfused_generic +#define BOOST_FUSION_CLASS_TPL_NAME unfused #include #endif diff --git a/include/boost/fusion/functional/generation/make_unfused_lvalue_args.hpp b/include/boost/fusion/functional/generation/make_unfused_lvalue_args.hpp deleted file mode 100644 index f3c49e45..00000000 --- a/include/boost/fusion/functional/generation/make_unfused_lvalue_args.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED) -#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED - -#include - -#define BOOST_FUSION_CLASS_TPL_NAME unfused_lvalue_args -#include - -#endif - diff --git a/include/boost/fusion/functional/generation/make_unfused_rvalue_args.hpp b/include/boost/fusion/functional/generation/make_unfused_rvalue_args.hpp deleted file mode 100644 index 9322e1e0..00000000 --- a/include/boost/fusion/functional/generation/make_unfused_rvalue_args.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2007 Tobias Schwinger - - Use modification and distribution are 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). -==============================================================================*/ - -#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED) -#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED - -#include - -#define BOOST_FUSION_CLASS_TPL_NAME unfused_rvalue_args -#include - -#endif - diff --git a/include/boost/fusion/support/deduce.hpp b/include/boost/fusion/support/deduce.hpp index 37710ec1..3a7231bd 100644 --- a/include/boost/fusion/support/deduce.hpp +++ b/include/boost/fusion/support/deduce.hpp @@ -87,6 +87,18 @@ namespace boost { namespace fusion { namespace traits // Keep references on arrays, even if const + template + struct deduce + { + typedef T(&type)[N]; + }; + + template + struct deduce + { + typedef volatile T(&type)[N]; + }; + template struct deduce {