Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:38

0001 #if !defined(BOOST_PP_IS_ITERATING)
0002 
0003 // Copyright David Abrahams 2002.
0004 // Distributed under the Boost Software License, Version 1.0. (See
0005 // accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt)
0007 
0008 # ifndef TARGET_DWA2002521_HPP
0009 #  define TARGET_DWA2002521_HPP
0010 
0011 #  include <boost/python/detail/preprocessor.hpp>
0012 
0013 #  include <boost/type.hpp>
0014 
0015 #  include <boost/preprocessor/comma_if.hpp>
0016 #  include <boost/preprocessor/if.hpp>
0017 #  include <boost/preprocessor/iterate.hpp>
0018 #  include <boost/preprocessor/debug/line.hpp>
0019 #  include <boost/preprocessor/enum_params.hpp>
0020 #  include <boost/preprocessor/repetition/enum_trailing_params.hpp>
0021 
0022 namespace boost { namespace python { namespace detail {
0023 
0024 #  define BOOST_PP_ITERATION_PARAMS_1                                                                   \
0025     (4, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/detail/target.hpp>, BOOST_PYTHON_FUNCTION_POINTER))
0026 #  include BOOST_PP_ITERATE()
0027 
0028 #  define BOOST_PP_ITERATION_PARAMS_1                                                                    \
0029     (4, (0, BOOST_PYTHON_CV_COUNT - 1, <boost/python/detail/target.hpp>, BOOST_PYTHON_POINTER_TO_MEMBER))
0030 #  include BOOST_PP_ITERATE()
0031 
0032 template <class R, class T>
0033 T& (* target(R (T::*)) )() { return 0; }
0034 
0035 }}} // namespace boost::python::detail
0036 
0037 # endif // TARGET_DWA2002521_HPP
0038 
0039 /* --------------- function pointers --------------- */
0040 // For gcc 4.4 compatability, we must include the
0041 // BOOST_PP_ITERATION_DEPTH test inside an #else clause.
0042 #else // BOOST_PP_IS_ITERATING
0043 #if BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == BOOST_PYTHON_FUNCTION_POINTER
0044 # if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100)                      \
0045         && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201)))
0046 #  line BOOST_PP_LINE(__LINE__, target.hpp(function_pointers))
0047 # endif 
0048 
0049 # define N BOOST_PP_ITERATION()
0050 
0051 template <class R BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class A)>
0052 BOOST_PP_IF(N, A0, void)(* target(R (*)(BOOST_PP_ENUM_PARAMS_Z(1, N, A))) )()
0053 {
0054     return 0;
0055 }
0056 
0057 # undef N
0058 
0059 /* --------------- pointers-to-members --------------- */
0060 #elif BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == BOOST_PYTHON_POINTER_TO_MEMBER
0061 // Outer over cv-qualifiers
0062 
0063 # define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/detail/target.hpp>))
0064 # include BOOST_PP_ITERATE()
0065 
0066 #elif BOOST_PP_ITERATION_DEPTH() == 2
0067 # if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100)                      \
0068         && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201)))
0069 #  line BOOST_PP_LINE(__LINE__, target.hpp(pointers-to-members))
0070 # endif 
0071 // Inner over arities
0072 
0073 # define N BOOST_PP_ITERATION()
0074 # define Q BOOST_PYTHON_CV_QUALIFIER(BOOST_PP_RELATIVE_ITERATION(1))
0075 
0076 template <class R, class T BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class A)>
0077 T& (* target(R (T::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, A)) Q) )()
0078 {
0079     return 0;
0080 }
0081 
0082 # undef N
0083 # undef Q
0084 
0085 #endif // BOOST_PP_ITERATION_DEPTH()
0086 #endif