summaryrefslogtreecommitdiffstats
blob: 102f17f0217645f59ce0fa0f6094a843d4cd2964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*=============================================================================
    Copyright (c) 2005-2007 Dan Marsden
    Copyright (c) 2005-2007 Joel de Guzman

    Distributed under 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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP
#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP

#include <boost/spirit/home/phoenix/core/limits.hpp>

#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>

namespace boost { namespace phoenix {
namespace detail
{
    template<typename MemFunPtr>
    struct mem_fun_ptr_return;

    template<typename Ret, typename Class>
    struct mem_fun_ptr_return<Ret (Class::*)()>
    {
        typedef Ret type;
    };
    
    template<typename Ret, typename Class>
    struct mem_fun_ptr_return<Ret (Class::*)() const>
    {
        typedef Ret type;
    };

#define BOOST_PP_ITERATION_PARAMS_1                                                           \
        (3, (1, PHOENIX_MEMBER_LIMIT, "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp"))

#include BOOST_PP_ITERATE()

}
}}

#endif

#else

#define PHOENIX_ITERATION BOOST_PP_ITERATION()

    template<typename Ret, typename Class,
             BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)>
    struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T))>
    {
        typedef Ret type;
    };

    template<typename Ret, typename Class,
             BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)>
    struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T)) const>
    {
        typedef Ret type;
    };

#undef PHOENIX_ITERATION

#endif