-// Copyright (C) 2001, 2002 Doug Gregor (gregod@cs.rpi.edu)
-//
-// Permission to copy, use, sell and distribute this software is granted
-// provided this copyright notice appears in all copies.
-// Permission to modify the code and to distribute modified code is granted
-// provided this copyright notice appears in all copies, and a notice
-// that the code was modified is included with the copyright notice.
-//
-// This software is provided "as is" without express or implied warranty,
-// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-
-// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
-// design of this library.
-
-#ifndef BOOST_FUNCTION_HPP
-#define BOOST_FUNCTION_HPP
-
-#include <boost/function/function_base.hpp>
-#include <boost/type_traits/function_traits.hpp>
-#include <boost/type_traits/same_traits.hpp>
-#include <boost/type_traits/transform_traits.hpp>
-#include <boost/type_traits/ice.hpp>
-#include <boost/function/function0.hpp>
-#include <boost/function/function1.hpp>
-#include <boost/function/function2.hpp>
-#include <boost/function/function3.hpp>
-#include <boost/function/function4.hpp>
-#include <boost/function/function5.hpp>
-#include <boost/function/function6.hpp>
-#include <boost/function/function7.hpp>
-#include <boost/function/function8.hpp>
-#include <boost/function/function9.hpp>
-#include <boost/function/function10.hpp>
-
-// Don't compile any of this code if we've asked not to include the deprecated
-// syntax and we don't have partial specialization, because none of this code
-// can work.
-#if !defined (BOOST_FUNCTION_NO_DEPRECATED) || !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-namespace boost {
- namespace detail {
- namespace function {
- // Choose the appropriate underlying implementation
- template<int Args> struct real_get_function_impl {};
-
- template<>
- struct real_get_function_impl<0>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function0<R,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<1>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function1<R, T1,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<2>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function2<R, T1, T2,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<3>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function3<R, T1, T2, T3,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<4>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function4<R, T1, T2, T3, T4,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<5>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function5<R, T1, T2, T3, T4, T5,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator>
- type;
- };
- };
-
- template<>
- struct real_get_function_impl<6>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function6<R, T1, T2, T3, T4, T5, T6,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator>
- type;
- };
- };
-
- template<>
- struct real_get_function_impl<7>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function7<R, T1, T2, T3, T4, T5, T6, T7,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<8>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function8<R, T1, T2, T3, T4, T5, T6, T7, T8,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<9>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function9<R, T1, T2, T3, T4, T5, T6, T7, T8, T9,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<10>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function10<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template<bool GetIt, typename Traits>
- struct get_arg1_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg1_type<true, Traits>
- {
- typedef typename Traits::arg1_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg2_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg2_type<true, Traits>
- {
- typedef typename Traits::arg2_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg3_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg3_type<true, Traits>
- {
- typedef typename Traits::arg3_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg4_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg4_type<true, Traits>
- {
- typedef typename Traits::arg4_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg5_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg5_type<true, Traits>
- {
- typedef typename Traits::arg5_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg6_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg6_type<true, Traits>
- {
- typedef typename Traits::arg6_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg7_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg7_type<true, Traits>
- {
- typedef typename Traits::arg7_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg8_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg8_type<true, Traits>
- {
- typedef typename Traits::arg8_type type;
- };