]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/type_traits/function_traits.hpp
remove unused boost files (~520)
[lyx.git] / boost / boost / type_traits / function_traits.hpp
index c38d76e213604d4de94fb04589236409a5b333ca..d71534572c3d64d5a774c526d8ae12a7cb0bb628 100644 (file)
@@ -1,14 +1,10 @@
 
-// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
+//  Copyright 2000 John Maddock (john@johnmaddock.co.uk)
+//  Use, modification and distribution are subject to 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).
 //
-// Permission to copy and use 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.
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
 
 #ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
 #define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
@@ -27,31 +23,34 @@ template<typename Function> struct function_traits_helper;
 template<typename R>
 struct function_traits_helper<R (*)(void)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 0);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 0);
   typedef R result_type;
 };
 
 template<typename R, typename T1>
 struct function_traits_helper<R (*)(T1)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 1);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 1);
   typedef R result_type;
   typedef T1 arg1_type;
+  typedef T1 argument_type;
 };
 
 template<typename R, typename T1, typename T2>
 struct function_traits_helper<R (*)(T1, T2)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 2);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 2);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
+  typedef T1 first_argument_type;
+  typedef T2 second_argument_type;
 };
 
 template<typename R, typename T1, typename T2, typename T3>
 struct function_traits_helper<R (*)(T1, T2, T3)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 3);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 3);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -61,7 +60,7 @@ struct function_traits_helper<R (*)(T1, T2, T3)>
 template<typename R, typename T1, typename T2, typename T3, typename T4>
 struct function_traits_helper<R (*)(T1, T2, T3, T4)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 4);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 4);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -73,7 +72,7 @@ template<typename R, typename T1, typename T2, typename T3, typename T4,
          typename T5>
 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 5);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 5);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -86,7 +85,7 @@ template<typename R, typename T1, typename T2, typename T3, typename T4,
          typename T5, typename T6>
 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 6);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 6);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -100,7 +99,7 @@ template<typename R, typename T1, typename T2, typename T3, typename T4,
          typename T5, typename T6, typename T7>
 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 7);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 7);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -115,7 +114,7 @@ template<typename R, typename T1, typename T2, typename T3, typename T4,
          typename T5, typename T6, typename T7, typename T8>
 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 8);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 8);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -131,7 +130,7 @@ template<typename R, typename T1, typename T2, typename T3, typename T4,
          typename T5, typename T6, typename T7, typename T8, typename T9>
 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 9);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 9);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -149,7 +148,7 @@ template<typename R, typename T1, typename T2, typename T3, typename T4,
          typename T10>
 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
 {
-  BOOST_STATIC_CONSTANT(int, arity = 10);
+  BOOST_STATIC_CONSTANT(unsigned, arity = 10);
   typedef R result_type;
   typedef T1 arg1_type;
   typedef T2 arg2_type;
@@ -167,7 +166,7 @@ struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
 
 template<typename Function>
 struct function_traits : 
-    public detail::function_traits_helper<typename add_pointer<Function>::type>
+  public boost::detail::function_traits_helper<typename boost::add_pointer<Function>::type>
 {
 };
 
@@ -175,7 +174,7 @@ struct function_traits :
 
 namespace detail {
 
-template<int N> 
+template<unsigned N> 
 struct type_of_size
 {
   char elements[N];
@@ -228,7 +227,7 @@ type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8,
 template<typename Function>
 struct function_traits
 {
-  BOOST_STATIC_CONSTANT(int, arity = (sizeof(detail::function_arity_helper((Function*)0))-1));
+  BOOST_STATIC_CONSTANT(unsigned, arity = (sizeof(boost::detail::function_arity_helper((Function*)0))-1));
 };
 
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION