Warning, file /include/boost/phoenix/function/function.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_PHOENIX_FUNCTION_FUNCTION_HPP
0010 #define BOOST_PHOENIX_FUNCTION_FUNCTION_HPP
0011
0012 #include <boost/phoenix/config.hpp>
0013 #include <boost/phoenix/core/limits.hpp>
0014 #include <boost/phoenix/core/detail/function_eval.hpp>
0015 #include <boost/utility/result_of.hpp>
0016
0017 namespace boost { namespace phoenix
0018 {
0019
0020
0021
0022
0023 namespace expression
0024 {
0025 #if defined(BOOST_PHOENIX_NO_VARIADIC_FUNCTION)
0026 template <typename F, BOOST_PHOENIX_typename_A_void(BOOST_PHOENIX_ACTOR_LIMIT)>
0027 struct function
0028 : detail::expression::function_eval<F, BOOST_PHOENIX_A(BOOST_PHOENIX_ACTOR_LIMIT)>
0029 {};
0030 #else
0031
0032 #endif
0033 }
0034
0035
0036 template<typename F>
0037 struct function
0038 {
0039 BOOST_CONSTEXPR function()
0040 : f()
0041 {}
0042
0043 BOOST_CONSTEXPR function(F f_)
0044 : f(f_)
0045 {}
0046
0047 template <typename Sig>
0048 struct result;
0049
0050 #if defined(BOOST_PHOENIX_NO_VARIADIC_FUNCTION)
0051 typename detail::expression::function_eval<F>::type const
0052 operator()() const
0053 {
0054 return detail::expression::function_eval<F>::make(f);
0055 }
0056
0057
0058 #include <boost/phoenix/function/detail/cpp03/function_operator.hpp>
0059
0060
0061 template <typename This, typename A0>
0062 struct result<This(A0)>
0063 : detail::expression::function_eval<F,
0064 typename boost::remove_reference<A0>::type>
0065 {};
0066
0067 template <typename This, typename A0, typename A1>
0068 struct result<This(A0,A1)>
0069 : detail::expression::function_eval<F,
0070 typename boost::remove_reference<A0>::type,
0071 typename boost::remove_reference<A1>::type>
0072 {};
0073
0074 template <typename This, typename A0, typename A1, typename A2>
0075 struct result<This(A0,A1,A2)>
0076 : detail::expression::function_eval<F,
0077 typename boost::remove_reference<A0>::type,
0078 typename boost::remove_reference<A1>::type,
0079 typename boost::remove_reference<A2>::type>
0080 {};
0081
0082
0083 template <typename This, typename A0, typename A1,
0084 typename A2, typename A3>
0085 struct result<This(A0,A1,A2,A3)>
0086 : detail::expression::function_eval<F,
0087 typename boost::remove_reference<A0>::type,
0088 typename boost::remove_reference<A1>::type,
0089 typename boost::remove_reference<A2>::type,
0090 typename boost::remove_reference<A3>::type>
0091 {};
0092
0093
0094 template <typename This, typename A0, typename A1,
0095 typename A2, typename A3,typename A4>
0096 struct result<This(A0,A1,A2,A3,A4)>
0097 : detail::expression::function_eval<F,
0098 typename boost::remove_reference<A0>::type,
0099 typename boost::remove_reference<A1>::type,
0100 typename boost::remove_reference<A2>::type,
0101 typename boost::remove_reference<A3>::type,
0102 typename boost::remove_reference<A4>::type>
0103 {};
0104
0105
0106 template <typename This, typename A0, typename A1,
0107 typename A2, typename A3,typename A4,
0108 typename A5>
0109 struct result<This(A0,A1,A2,A3,A4,A5)>
0110 : detail::expression::function_eval<F,
0111 typename boost::remove_reference<A0>::type,
0112 typename boost::remove_reference<A1>::type,
0113 typename boost::remove_reference<A2>::type,
0114 typename boost::remove_reference<A3>::type,
0115 typename boost::remove_reference<A4>::type,
0116 typename boost::remove_reference<A5>::type>
0117 {};
0118
0119
0120 template <typename This, typename A0, typename A1,
0121 typename A2, typename A3,typename A4,
0122 typename A5, typename A6>
0123 struct result<This(A0,A1,A2,A3,A4,A5,A6)>
0124 : detail::expression::function_eval<F,
0125 typename boost::remove_reference<A0>::type,
0126 typename boost::remove_reference<A1>::type,
0127 typename boost::remove_reference<A2>::type,
0128 typename boost::remove_reference<A3>::type,
0129 typename boost::remove_reference<A4>::type,
0130 typename boost::remove_reference<A5>::type,
0131 typename boost::remove_reference<A6>::type>
0132 {};
0133 #else
0134
0135 #endif
0136
0137 F f;
0138 };
0139 }
0140
0141 template<typename F>
0142 struct result_of<phoenix::function<F>()>
0143 : phoenix::detail::expression::function_eval<F>
0144 {};
0145
0146 }
0147
0148 #endif
0149