function_base.hpp:

- Updated any_pointer and manager classes to deal with member function
    pointers directly, so no allocation is required when using them.
  - Removed include of boost/mem_fn.hpp

function_template.hpp:
  - Many macros that were in the functionN.hpp headers have been moved here and
    are now generated on-the-fly using BOOST_JOIN
  - Added invokers for pointers to member functions
  - Revised pointer to member function handling code to not perform any
    allocations/deallocations
  - Added guards so that multiple inclusion of function_template.hpp will only
    include its dependencies once.

functionN.hpp:
  - Headers regenerated


[SVN r11729]
This commit is contained in:
Douglas Gregor
2001-11-19 20:30:18 +00:00
parent d37d210685
commit b8e4cdab2f
13 changed files with 353 additions and 461 deletions

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION0_HPP #ifndef BOOST_FUNCTION_FUNCTION0_HEADER
#define BOOST_FUNCTION0_HPP #define BOOST_FUNCTION_FUNCTION0_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 0 #define BOOST_FUNCTION_NUM_ARGS 0
#define BOOST_FUNCTION_COMMA
#define BOOST_FUNCTION_TEMPLATE_PARMS #define BOOST_FUNCTION_TEMPLATE_PARMS
#define BOOST_FUNCTION_TEMPLATE_ARGS #define BOOST_FUNCTION_TEMPLATE_ARGS
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#define BOOST_FUNCTION_PARMS #define BOOST_FUNCTION_PARMS
#define BOOST_FUNCTION_ARGS #define BOOST_FUNCTION_ARGS
#define BOOST_FUNCTION_FUNCTION function0 #define BOOST_FUNCTION_NOT_0_PARMS
#define BOOST_FUNCTION_BASE function0_base #define BOOST_FUNCTION_NOT_0_ARGS
#define BOOST_FUNCTION_INVOKER_BASE invoker_base0
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker0
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker0
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker0
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker0
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker0
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker0
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION0_HPP #endif // BOOST_FUNCTION_FUNCTION0_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION1_HPP #ifndef BOOST_FUNCTION_FUNCTION1_HEADER
#define BOOST_FUNCTION1_HPP #define BOOST_FUNCTION_FUNCTION1_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 1 #define BOOST_FUNCTION_NUM_ARGS 1
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1 #define BOOST_FUNCTION_TEMPLATE_ARGS T0
#define BOOST_FUNCTION_TEMPLATE_ARGS T1 #define BOOST_FUNCTION_PARMS T0 a0
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1 #define BOOST_FUNCTION_ARGS a0
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1 #define BOOST_FUNCTION_NOT_0_PARMS
#define BOOST_FUNCTION_PARMS T1 a1 #define BOOST_FUNCTION_NOT_0_ARGS
#define BOOST_FUNCTION_ARGS a1
#define BOOST_FUNCTION_FUNCTION function1
#define BOOST_FUNCTION_BASE function1_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base1
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker1
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker1
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker1
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker1
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker1
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker1
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION1_HPP #endif // BOOST_FUNCTION_FUNCTION1_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION10_HPP #ifndef BOOST_FUNCTION_FUNCTION10_HEADER
#define BOOST_FUNCTION10_HPP #define BOOST_FUNCTION_FUNCTION10_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 10 #define BOOST_FUNCTION_NUM_ARGS 10
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4, typename OtherT5, typename OtherT6, typename OtherT7, typename OtherT8, typename OtherT9, typename OtherT10 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6, a7, a8, a9
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4, OtherT5, OtherT6, OtherT7, OtherT8, OtherT9, OtherT10 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9, T10 a10 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6, a7, a8, a9
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4, a5, a6, a7, a8, a9, a10
#define BOOST_FUNCTION_FUNCTION function10
#define BOOST_FUNCTION_BASE function10_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base10
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker10
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker10
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker10
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker10
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker10
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker10
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION10_HPP #endif // BOOST_FUNCTION_FUNCTION10_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION2_HPP #ifndef BOOST_FUNCTION_FUNCTION2_HEADER
#define BOOST_FUNCTION2_HPP #define BOOST_FUNCTION_FUNCTION2_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 2 #define BOOST_FUNCTION_NUM_ARGS 2
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2 #define BOOST_FUNCTION_ARGS a0, a1
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2 #define BOOST_FUNCTION_NOT_0_ARGS a1
#define BOOST_FUNCTION_ARGS a1, a2
#define BOOST_FUNCTION_FUNCTION function2
#define BOOST_FUNCTION_BASE function2_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base2
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker2
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker2
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker2
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker2
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker2
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker2
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION2_HPP #endif // BOOST_FUNCTION_FUNCTION2_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION3_HPP #ifndef BOOST_FUNCTION_FUNCTION3_HEADER
#define BOOST_FUNCTION3_HPP #define BOOST_FUNCTION_FUNCTION3_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 3 #define BOOST_FUNCTION_NUM_ARGS 3
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3 #define BOOST_FUNCTION_ARGS a0, a1, a2
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2
#define BOOST_FUNCTION_ARGS a1, a2, a3
#define BOOST_FUNCTION_FUNCTION function3
#define BOOST_FUNCTION_BASE function3_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base3
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker3
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker3
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker3
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker3
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker3
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker3
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION3_HPP #endif // BOOST_FUNCTION_FUNCTION3_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION4_HPP #ifndef BOOST_FUNCTION_FUNCTION4_HEADER
#define BOOST_FUNCTION4_HPP #define BOOST_FUNCTION_FUNCTION4_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 4 #define BOOST_FUNCTION_NUM_ARGS 4
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4
#define BOOST_FUNCTION_FUNCTION function4
#define BOOST_FUNCTION_BASE function4_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base4
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker4
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker4
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker4
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker4
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker4
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker4
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION4_HPP #endif // BOOST_FUNCTION_FUNCTION4_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION5_HPP #ifndef BOOST_FUNCTION_FUNCTION5_HEADER
#define BOOST_FUNCTION5_HPP #define BOOST_FUNCTION_FUNCTION5_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 5 #define BOOST_FUNCTION_NUM_ARGS 5
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4, typename T5 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4, T5 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4, typename OtherT5 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4, OtherT5 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4, a5
#define BOOST_FUNCTION_FUNCTION function5
#define BOOST_FUNCTION_BASE function5_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base5
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker5
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker5
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker5
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker5
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker5
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker5
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION5_HPP #endif // BOOST_FUNCTION_FUNCTION5_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION6_HPP #ifndef BOOST_FUNCTION_FUNCTION6_HEADER
#define BOOST_FUNCTION6_HPP #define BOOST_FUNCTION_FUNCTION6_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 6 #define BOOST_FUNCTION_NUM_ARGS 6
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4, typename T5, typename T6 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4, T5, T6 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4, typename OtherT5, typename OtherT6 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4, OtherT5, OtherT6 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4, a5, a6
#define BOOST_FUNCTION_FUNCTION function6
#define BOOST_FUNCTION_BASE function6_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base6
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker6
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker6
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker6
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker6
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker6
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker6
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION6_HPP #endif // BOOST_FUNCTION_FUNCTION6_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION7_HPP #ifndef BOOST_FUNCTION_FUNCTION7_HEADER
#define BOOST_FUNCTION7_HPP #define BOOST_FUNCTION_FUNCTION7_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 7 #define BOOST_FUNCTION_NUM_ARGS 7
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4, T5, T6, T7 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4, typename OtherT5, typename OtherT6, typename OtherT7 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4, OtherT5, OtherT6, OtherT7 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4, a5, a6, a7
#define BOOST_FUNCTION_FUNCTION function7
#define BOOST_FUNCTION_BASE function7_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base7
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker7
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker7
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker7
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker7
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker7
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker7
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION7_HPP #endif // BOOST_FUNCTION_FUNCTION7_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION8_HPP #ifndef BOOST_FUNCTION_FUNCTION8_HEADER
#define BOOST_FUNCTION8_HPP #define BOOST_FUNCTION_FUNCTION8_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 8 #define BOOST_FUNCTION_NUM_ARGS 8
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6, T7
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4, T5, T6, T7, T8 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4, typename OtherT5, typename OtherT6, typename OtherT7, typename OtherT8 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6, a7
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4, OtherT5, OtherT6, OtherT7, OtherT8 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6, a7
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4, a5, a6, a7, a8
#define BOOST_FUNCTION_FUNCTION function8
#define BOOST_FUNCTION_BASE function8_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base8
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker8
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker8
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker8
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker8
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker8
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker8
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION8_HPP #endif // BOOST_FUNCTION_FUNCTION8_HEADER

View File

@ -1,5 +1,5 @@
// Boost.Function library // Boost.Function library
//
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu) // Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// //
// Permission to copy, use, sell and distribute this software is granted // Permission to copy, use, sell and distribute this software is granted
@ -13,47 +13,25 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION9_HPP #ifndef BOOST_FUNCTION_FUNCTION9_HEADER
#define BOOST_FUNCTION9_HPP #define BOOST_FUNCTION_FUNCTION9_HEADER
#include <boost/function/function_base.hpp>
#define BOOST_FUNCTION_NUM_ARGS 9 #define BOOST_FUNCTION_NUM_ARGS 9
#define BOOST_FUNCTION_COMMA , #define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8
#define BOOST_FUNCTION_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9 #define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6, T7, T8
#define BOOST_FUNCTION_TEMPLATE_ARGS T1, T2, T3, T4, T5, T6, T7, T8, T9 #define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8
#define BOOST_FUNCTION_OTHER_TEMPLATE_PARMS typename OtherT1, typename OtherT2, typename OtherT3, typename OtherT4, typename OtherT5, typename OtherT6, typename OtherT7, typename OtherT8, typename OtherT9 #define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6, a7, a8
#define BOOST_FUNCTION_OTHER_TEMPLATE_ARGS OtherT1, OtherT2, OtherT3, OtherT4, OtherT5, OtherT6, OtherT7, OtherT8, OtherT9 #define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8
#define BOOST_FUNCTION_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9 #define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6, a7, a8
#define BOOST_FUNCTION_ARGS a1, a2, a3, a4, a5, a6, a7, a8, a9
#define BOOST_FUNCTION_FUNCTION function9
#define BOOST_FUNCTION_BASE function9_base
#define BOOST_FUNCTION_INVOKER_BASE invoker_base9
#define BOOST_FUNCTION_FUNCTION_INVOKER function_invoker9
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER void_function_invoker9
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER function_obj_invoker9
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER void_function_obj_invoker9
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER get_function_invoker9
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER get_function_obj_invoker9
#include <boost/function/function_template.hpp> #include <boost/function/function_template.hpp>
#undef BOOST_FUNCTION_NUM_ARGS #undef BOOST_FUNCTION_NOT_0_ARGS
#undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_NOT_0_PARMS
#undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_PARMS
#undef BOOST_FUNCTION_OTHER_TEMPLATE_ARGS
#undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARGS
#undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_PARMS
#undef BOOST_FUNCTION_BASE #undef BOOST_FUNCTION_TEMPLATE_ARGS
#undef BOOST_FUNCTION_INVOKER_BASE #undef BOOST_FUNCTION_TEMPLATE_PARMS
#undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_NUM_ARGS
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#endif // BOOST_FUNCTION9_HPP #endif // BOOST_FUNCTION_FUNCTION9_HEADER

View File

@ -23,7 +23,6 @@
#include <typeinfo> #include <typeinfo>
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/type_traits.hpp> #include <boost/type_traits.hpp>
#include <boost/mem_fn.hpp>
namespace boost { namespace boost {
namespace detail { namespace detail {
@ -80,13 +79,17 @@ namespace boost {
* so function requires a union of the two. */ * so function requires a union of the two. */
union any_pointer union any_pointer
{ {
struct container {};
void* obj_ptr; void* obj_ptr;
const void* const_obj_ptr; const void* const_obj_ptr;
void (*func_ptr)(); void (*func_ptr)();
void (container::* mem_func_ptr)();
explicit any_pointer(void* p) : obj_ptr(p) {} explicit any_pointer(void* p) : obj_ptr(p) {}
explicit any_pointer(const void* p) : const_obj_ptr(p) {} explicit any_pointer(const void* p) : const_obj_ptr(p) {}
explicit any_pointer(void (*p)()) : func_ptr(p) {} explicit any_pointer(void (*p)()) : func_ptr(p) {}
explicit any_pointer(void (container::*p)()) : mem_func_ptr(p) {}
}; };
/** /**
@ -116,8 +119,7 @@ namespace boost {
// The operation type to perform on the given functor/function pointer // The operation type to perform on the given functor/function pointer
enum functor_manager_operation_type { enum functor_manager_operation_type {
clone_functor, clone_functor,
destroy_functor, destroy_functor
retrieve_type_info
}; };
// Tags used to decide between different types of functions // Tags used to decide between different types of functions
@ -147,13 +149,6 @@ namespace boost {
{ {
private: private:
typedef Functor functor_type; typedef Functor functor_type;
# ifndef BOOST_NO_STD_ALLOCATOR
typedef typename Allocator::template rebind<functor_type>::other
allocator_type;
typedef typename allocator_type::pointer pointer_type;
# else
typedef functor_type* pointer_type;
# endif // BOOST_NO_STD_ALLOCATOR
// For function pointers, the manager is trivial // For function pointers, the manager is trivial
static inline any_pointer static inline any_pointer
@ -162,10 +157,22 @@ namespace boost {
{ {
if (op == clone_functor) if (op == clone_functor)
return function_ptr; return function_ptr;
else if (op == destroy_functor)
return any_pointer(static_cast<void (*)()>(0));
else else
return any_pointer(&typeid(Functor)); return any_pointer(static_cast<void (*)()>(0));
}
// For member function pointers, the manager is trivial
static inline any_pointer
manager(any_pointer member_ptr, functor_manager_operation_type op,
member_ptr_tag)
{
if (op == clone_functor)
return member_ptr;
else {
typedef void (any_pointer::container::* stored_mem_func_type)();
stored_mem_func_type p = 0;
return any_pointer(p);
}
} }
// For function object pointers, we clone the pointer to each // For function object pointers, we clone the pointer to each
@ -175,6 +182,14 @@ namespace boost {
functor_manager_operation_type op, functor_manager_operation_type op,
function_obj_tag) function_obj_tag)
{ {
#ifndef BOOST_NO_STD_ALLOCATOR
typedef typename Allocator::template rebind<functor_type>::other
allocator_type;
typedef typename allocator_type::pointer pointer_type;
#else
typedef functor_type* pointer_type;
#endif // BOOST_NO_STD_ALLOCATOR
# ifndef BOOST_NO_STD_ALLOCATOR # ifndef BOOST_NO_STD_ALLOCATOR
allocator_type allocator; allocator_type allocator;
# endif // BOOST_NO_STD_ALLOCATOR # endif // BOOST_NO_STD_ALLOCATOR
@ -195,7 +210,7 @@ namespace boost {
# endif // BOOST_NO_STD_ALLOCATOR # endif // BOOST_NO_STD_ALLOCATOR
return any_pointer(static_cast<void*>(new_f)); return any_pointer(static_cast<void*>(new_f));
} }
else if (op == destroy_functor) { else {
/* Cast from the void pointer to the functor pointer type */ /* Cast from the void pointer to the functor pointer type */
functor_type* f = functor_type* f =
reinterpret_cast<functor_type*>(function_obj_ptr.obj_ptr); reinterpret_cast<functor_type*>(function_obj_ptr.obj_ptr);
@ -214,9 +229,6 @@ namespace boost {
return any_pointer(static_cast<void*>(0)); return any_pointer(static_cast<void*>(0));
} }
else {
return any_pointer(&typeid(Functor));
}
} }
public: public:
/* Dispatch to an appropriate manager based on whether we have a /* Dispatch to an appropriate manager based on whether we have a
@ -224,10 +236,7 @@ namespace boost {
static any_pointer static any_pointer
manage(any_pointer functor_ptr, functor_manager_operation_type op) manage(any_pointer functor_ptr, functor_manager_operation_type op)
{ {
typedef typename IF<(is_pointer<functor_type>::value), typedef typename get_function_tag<functor_type>::type tag_type;
function_ptr_tag,
function_obj_tag>::type tag_type;
return manager(functor_ptr, op, tag_type()); return manager(functor_ptr, op, tag_type());
} }
}; };

View File

@ -16,8 +16,13 @@
// Note: this header is a header template and must NOT have multiple-inclusion // Note: this header is a header template and must NOT have multiple-inclusion
// protection. // protection.
#include <cassert> #ifndef BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP
#include <algorithm> #define BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP
# include <cassert>
# include <algorithm>
# include <boost/config.hpp>
# include <boost/function/function_base.hpp>
#endif // BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP
// Type of the default allocator // Type of the default allocator
#ifndef BOOST_NO_STD_ALLOCATOR #ifndef BOOST_NO_STD_ALLOCATOR
@ -26,6 +31,35 @@
# define BOOST_FUNCTION_DEFAULT_ALLOCATOR int # define BOOST_FUNCTION_DEFAULT_ALLOCATOR int
#endif // BOOST_NO_STD_ALLOCATOR #endif // BOOST_NO_STD_ALLOCATOR
// Comma if nonzero number of arguments
#if BOOST_FUNCTION_NUM_ARGS == 0
# define BOOST_FUNCTION_COMMA
#else
# define BOOST_FUNCTION_COMMA ,
#endif // BOOST_FUNCTION_NUM_ARGS > 0
// Class names used in this version of the code
#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_BASE BOOST_JOIN(function_base,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_FUNCTION_INVOKER \
BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \
BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \
BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \
BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_MEM_FUNCTION_INVOKER \
BOOST_JOIN(mem_function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_VOID_MEM_FUNCTION_INVOKER \
BOOST_JOIN(void_mem_function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \
BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \
BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER \
BOOST_JOIN(get_mem_function_invoker,BOOST_FUNCTION_NUM_ARGS)
namespace boost { namespace boost {
namespace detail { namespace detail {
namespace function { namespace function {
@ -95,9 +129,45 @@ namespace boost {
} }
}; };
#if BOOST_FUNCTION_NUM_ARGS > 0
template<
typename MemFunctionPtr,
typename R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_PARMS
>
struct BOOST_FUNCTION_MEM_FUNCTION_INVOKER
{
static R invoke(any_pointer mem_function_ptr
BOOST_FUNCTION_COMMA
BOOST_FUNCTION_PARMS)
{
MemFunctionPtr f =
reinterpret_cast<MemFunctionPtr>(mem_function_ptr.mem_func_ptr);
return ((*a0).*f)(BOOST_FUNCTION_NOT_0_ARGS);
}
};
template<
typename MemFunctionPtr,
typename R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_PARMS
>
struct BOOST_FUNCTION_VOID_MEM_FUNCTION_INVOKER
{
static unusable invoke(any_pointer mem_function_ptr
BOOST_FUNCTION_COMMA
BOOST_FUNCTION_PARMS)
{
MemFunctionPtr f =
reinterpret_cast<MemFunctionPtr>(mem_function_ptr.mem_func_ptr);
(a0->*f)(BOOST_FUNCTION_NOT_0_ARGS);
return unusable();
}
};
#endif // BOOST_FUNCTION_NUM_ARGS > 0
template< template<
typename FunctionPtr, typename FunctionPtr,
typename Allocator,
typename R BOOST_FUNCTION_COMMA typename R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_PARMS BOOST_FUNCTION_TEMPLATE_PARMS
> >
@ -119,7 +189,6 @@ namespace boost {
template< template<
typename FunctionObj, typename FunctionObj,
typename Allocator,
typename R BOOST_FUNCTION_COMMA typename R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_PARMS BOOST_FUNCTION_TEMPLATE_PARMS
> >
@ -138,6 +207,29 @@ namespace boost {
> >
>::type type; >::type type;
}; };
#if BOOST_FUNCTION_NUM_ARGS > 0
template<
typename MemFunctionPtr,
typename R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_PARMS
>
struct BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
{
typedef typename IF<(is_void<R>::value),
BOOST_FUNCTION_VOID_MEM_FUNCTION_INVOKER<
MemFunctionPtr,
R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS
>,
BOOST_FUNCTION_MEM_FUNCTION_INVOKER<
MemFunctionPtr,
R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS
>
>::type type;
};
#endif // BOOST_FUNCTION_NUM_ARGS > 0
} // end namespace function } // end namespace function
} // end namespace detail } // end namespace detail
@ -154,10 +246,10 @@ namespace boost {
BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS); BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS);
#if BOOST_FUNCTION_NUM_ARGS == 1 #if BOOST_FUNCTION_NUM_ARGS == 1
typedef T1 argument_type; typedef T0 argument_type;
#elif BOOST_FUNCTION_NUM_ARGS == 2 #elif BOOST_FUNCTION_NUM_ARGS == 2
typedef T1 first_argument_type; typedef T0 first_argument_type;
typedef T2 second_argument_type; typedef T1 second_argument_type;
#endif #endif
typedef typename detail::function::function_return_type<R>::type typedef typename detail::function::function_return_type<R>::type
result_type; result_type;
@ -312,12 +404,6 @@ namespace boost {
this->assign_to(f, tag()); this->assign_to(f, tag());
} }
template<typename MemberPtr>
void assign_to(MemberPtr f, detail::function::member_ptr_tag)
{
this->assign_to(mem_fn(f));
}
template<typename FunctionPtr> template<typename FunctionPtr>
void assign_to(FunctionPtr f, detail::function::function_ptr_tag) void assign_to(FunctionPtr f, detail::function::function_ptr_tag)
{ {
@ -326,7 +412,6 @@ namespace boost {
if (f) { if (f) {
typedef typename detail::function::BOOST_FUNCTION_GET_FUNCTION_INVOKER< typedef typename detail::function::BOOST_FUNCTION_GET_FUNCTION_INVOKER<
FunctionPtr, FunctionPtr,
Allocator,
R BOOST_FUNCTION_COMMA R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS BOOST_FUNCTION_TEMPLATE_ARGS
>::type >::type
@ -342,6 +427,34 @@ namespace boost {
} }
} }
#if BOOST_FUNCTION_NUM_ARGS > 0
template<typename MemberPtr>
void assign_to(MemberPtr f, detail::function::member_ptr_tag)
{
clear();
if (f) {
typedef void (detail::function::any_pointer::container::
*stored_mem_func_type)();
typedef
typename detail::function::BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER<
MemberPtr,
R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS
>::type
invoker_type;
invoker = &invoker_type::invoke;
manager = &detail::function::functor_manager<MemberPtr,
Allocator>::manage;
functor = manager(detail::function::any_pointer(
reinterpret_cast<stored_mem_func_type>(f)
),
detail::function::clone_functor);
}
}
#endif // BOOST_FUNCTION_NUM_ARGS > 0
template<typename FunctionObj> template<typename FunctionObj>
void assign_to(const FunctionObj& f, detail::function::function_obj_tag) void assign_to(const FunctionObj& f, detail::function::function_obj_tag)
{ {
@ -349,7 +462,6 @@ namespace boost {
typedef typedef
typename detail::function::BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< typename detail::function::BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
FunctionObj, FunctionObj,
Allocator,
R BOOST_FUNCTION_COMMA R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS BOOST_FUNCTION_TEMPLATE_ARGS
>::type >::type
@ -394,4 +506,17 @@ namespace boost {
// Cleanup after ourselves... // Cleanup after ourselves...
#undef BOOST_FUNCTION_DEFAULT_ALLOCATOR #undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
#undef BOOST_FUNCTION_COMMA
#undef BOOST_FUNCTION_FUNCTION
#undef BOOST_FUNCTION_BASE
#undef BOOST_FUNCTION_INVOKER_BASE
#undef BOOST_FUNCTION_FUNCTION_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_MEM_FUNCTION_INVOKER
#undef BOOST_FUNCTION_VOID_MEM_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER