~ubuntu-branches/debian/sid/boost1.49/sid

« back to all changes in this revision

Viewing changes to boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2012-02-26 00:31:44 UTC
  • Revision ID: package-import@ubuntu.com-20120226003144-eaytp12cbf6ubpms
Tags: upstream-1.49.0
ImportĀ upstreamĀ versionĀ 1.49.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*=============================================================================
 
2
    Copyright (c) 2005-2007 Dan Marsden
 
3
    Copyright (c) 2005-2007 Joel de Guzman
 
4
 
 
5
    Distributed under the Boost Software License, Version 1.0. (See accompanying 
 
6
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
7
==============================================================================*/
 
8
#ifndef BOOST_PP_IS_ITERATING
 
9
#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP
 
10
#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP
 
11
 
 
12
#include <boost/spirit/home/phoenix/core/limits.hpp>
 
13
 
 
14
#include <boost/preprocessor/repetition/enum_params.hpp>
 
15
#include <boost/preprocessor/iteration/iterate.hpp>
 
16
 
 
17
namespace boost { namespace phoenix {
 
18
namespace detail
 
19
{
 
20
    template<typename MemFunPtr>
 
21
    struct mem_fun_ptr_return;
 
22
 
 
23
    template<typename Ret, typename Class>
 
24
    struct mem_fun_ptr_return<Ret (Class::*)()>
 
25
    {
 
26
        typedef Ret type;
 
27
    };
 
28
    
 
29
    template<typename Ret, typename Class>
 
30
    struct mem_fun_ptr_return<Ret (Class::*)() const>
 
31
    {
 
32
        typedef Ret type;
 
33
    };
 
34
 
 
35
#define BOOST_PP_ITERATION_PARAMS_1                                                           \
 
36
        (3, (1, PHOENIX_MEMBER_LIMIT, "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp"))
 
37
 
 
38
#include BOOST_PP_ITERATE()
 
39
 
 
40
}
 
41
}}
 
42
 
 
43
#endif
 
44
 
 
45
#else
 
46
 
 
47
#define PHOENIX_ITERATION BOOST_PP_ITERATION()
 
48
 
 
49
    template<typename Ret, typename Class,
 
50
             BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)>
 
51
    struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T))>
 
52
    {
 
53
        typedef Ret type;
 
54
    };
 
55
 
 
56
    template<typename Ret, typename Class,
 
57
             BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)>
 
58
    struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T)) const>
 
59
    {
 
60
        typedef Ret type;
 
61
    };
 
62
 
 
63
#undef PHOENIX_ITERATION
 
64
 
 
65
#endif