File indexing completed on 2025-01-18 09:50:27
0001 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
0002
0003 #include <boost/proto/detail/preprocessed/poly_function_traits.hpp>
0004
0005 #elif !defined(BOOST_PP_IS_ITERATING)
0006
0007 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0008 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/poly_function_traits.hpp")
0009 #endif
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0020 #pragma wave option(preserve: 1)
0021 #endif
0022
0023 #define BOOST_PP_ITERATION_PARAMS_1 \
0024 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/poly_function_traits.hpp>))
0025 #include BOOST_PP_ITERATE()
0026
0027 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0028 #pragma wave option(output: null)
0029 #endif
0030
0031 #else
0032
0033 #define N BOOST_PP_ITERATION()
0034
0035
0036 template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
0037 struct poly_function_traits<PolyFun, PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), mpl::size_t<sizeof(poly_function_t)> >
0038 {
0039 typedef typename PolyFun::template impl<BOOST_PP_ENUM_PARAMS(N, const A)> function_type;
0040 typedef typename function_type::result_type result_type;
0041 };
0042
0043
0044 template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
0045 struct as_mono_function_impl<PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), true>
0046 {
0047 typedef typename PolyFun::template impl<BOOST_PP_ENUM_PARAMS(N, const A)> type;
0048 };
0049
0050
0051 template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
0052 struct as_mono_function_impl<PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), false>
0053 {
0054 typedef PolyFun type;
0055 };
0056
0057
0058 template<typename PolyFun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
0059 struct as_mono_function<PolyFun(BOOST_PP_ENUM_PARAMS(N, A))>
0060 : as_mono_function_impl<PolyFun(BOOST_PP_ENUM_PARAMS(N, A)), is_poly_function<PolyFun>::value>
0061 {};
0062
0063 #undef N
0064
0065 #endif