235 lines
		
	
	
		
			7.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			235 lines
		
	
	
		
			7.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/*==============================================================================
 | 
						|
    Copyright (c) 2001-2010 Joel de Guzman
 | 
						|
    Copyright (c) 2010 Thomas Heller
 | 
						|
 | 
						|
    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)
 | 
						|
==============================================================================*/
 | 
						|
    namespace detail {
 | 
						|
        template <typename Object, typename MemPtr>
 | 
						|
        struct mem_fun_ptr_gen
 | 
						|
        {
 | 
						|
            mem_fun_ptr_gen(Object const& obj_, MemPtr ptr_)
 | 
						|
              : obj(obj_)
 | 
						|
              , ptr(ptr_)
 | 
						|
            {}
 | 
						|
            typename phoenix::expression::mem_fun_ptr<Object, MemPtr>::type const
 | 
						|
            operator()() const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<Object, MemPtr>::make(obj, ptr);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0
 | 
						|
                >::make(obj, ptr, a0);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1
 | 
						|
                >::make(obj, ptr, a0 , a1);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2 , A3
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2 , A3
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2 , a3);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2 , A3 , A4
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2 , A3 , A4
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2 , a3 , a4);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2 , A3 , A4 , A5
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2 , A3 , A4 , A5
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2 , A3 , A4 , A5 , A6
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2 , A3 , A4 , A5 , A6
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
 | 
						|
            }
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
 | 
						|
            typename phoenix::expression::mem_fun_ptr<
 | 
						|
                Object
 | 
						|
              , MemPtr
 | 
						|
              , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
 | 
						|
            >::type const
 | 
						|
            operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8) const
 | 
						|
            {
 | 
						|
                return phoenix::expression::mem_fun_ptr<
 | 
						|
                    Object
 | 
						|
                  , MemPtr
 | 
						|
                  , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
 | 
						|
                >::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
 | 
						|
            }
 | 
						|
            Object const& obj;
 | 
						|
            MemPtr ptr;
 | 
						|
        };
 | 
						|
        struct make_mem_fun_ptr_gen
 | 
						|
            : proto::callable
 | 
						|
        {
 | 
						|
            template<typename Sig>
 | 
						|
            struct result;
 | 
						|
            template<typename This, typename Object, typename MemPtr>
 | 
						|
            struct result<This(Object, MemPtr)>
 | 
						|
            {
 | 
						|
                typedef
 | 
						|
                    mem_fun_ptr_gen<
 | 
						|
                        typename remove_const<typename remove_reference<Object>::type>::type
 | 
						|
                      , typename remove_const<typename remove_reference<MemPtr>::type>::type
 | 
						|
                    >
 | 
						|
                type;
 | 
						|
            };
 | 
						|
            template<typename Object, typename MemPtr>
 | 
						|
            mem_fun_ptr_gen<Object, MemPtr> operator()(Object const & obj, MemPtr ptr) const
 | 
						|
            {
 | 
						|
                return mem_fun_ptr_gen<Object, MemPtr>(obj, ptr);
 | 
						|
            }
 | 
						|
        };
 | 
						|
    }
 |