223 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			223 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/*=============================================================================
 | 
						|
    Copyright (c) 2001-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)
 | 
						|
==============================================================================*/
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<2, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<3, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<4, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<5, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3 , a4);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<6, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3 , a4 , a5);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<7, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<8, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<9, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    
 | 
						|
    template <typename Dummy>
 | 
						|
    struct function_ptr_impl<10, Dummy>
 | 
						|
    {
 | 
						|
        template <typename RT, typename FP>
 | 
						|
        struct impl
 | 
						|
        {
 | 
						|
            typedef RT result_type;
 | 
						|
            impl(FP fp_)
 | 
						|
                : fp(fp_) {}
 | 
						|
            template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
 | 
						|
            RT operator()(A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8 , A9 & a9) const
 | 
						|
            {
 | 
						|
                return fp(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
 | 
						|
            }
 | 
						|
            FP fp;
 | 
						|
        };
 | 
						|
    };
 |