Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-12-18 11:39:42


Author: johnmaddock
Date: 2007-12-18 11:39:42 EST (Tue, 18 Dec 2007)
New Revision: 42139
URL: http://svn.boost.org/trac/boost/changeset/42139

Log:
Merge fix for #1525 from Trunk.
Text files modified:
   branches/release/boost/type_traits/function_traits.hpp | 26 +++++++++++++-------------
   1 files changed, 13 insertions(+), 13 deletions(-)

Modified: branches/release/boost/type_traits/function_traits.hpp
==============================================================================
--- branches/release/boost/type_traits/function_traits.hpp (original)
+++ branches/release/boost/type_traits/function_traits.hpp 2007-12-18 11:39:42 EST (Tue, 18 Dec 2007)
@@ -23,14 +23,14 @@
 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;
@@ -39,7 +39,7 @@
 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;
@@ -50,7 +50,7 @@
 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;
@@ -60,7 +60,7 @@
 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;
@@ -72,7 +72,7 @@
          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;
@@ -85,7 +85,7 @@
          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;
@@ -99,7 +99,7 @@
          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;
@@ -114,7 +114,7 @@
          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;
@@ -130,7 +130,7 @@
          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;
@@ -148,7 +148,7 @@
          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;
@@ -174,7 +174,7 @@
 
 namespace detail {
 
-template<int N>
+template<unsigned N>
 struct type_of_size
 {
   char elements[N];
@@ -227,7 +227,7 @@
 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(detail::function_arity_helper((Function*)0))-1));
 };
 
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk