Index: boost/utility/detail/result_of_iterate.hpp
===================================================================
--- boost/utility/detail/result_of_iterate.hpp (revision 50658)
+++ boost/utility/detail/result_of_iterate.hpp (working copy)
@@ -1,6 +1,6 @@
// Boost result_of library
-// Copyright Douglas Gregor 2004. Use, modification and
+// Copyright Douglas Gregor and Daniel Walker 2004-2009. Use, modification and
// distribution is 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)
@@ -10,8 +10,13 @@
# error Boost result_of - do not include this file!
#endif
-#if defined(BOOST_HAS_DECLTYPE)
+#if (!defined(BOOST_HAS_DECLTYPE) \
+ || BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)))
+# define BOOST_NO_ISO_RESULT_OF 1
+#endif
+#if !defined(BOOST_NO_ISO_RESULT_OF)
+
// As of N2588, C++0x result_of only supports function call
// expressions of the form f(x). This precludes support for member
// function pointers, which are invoked with expressions of the form
@@ -49,7 +54,7 @@
} // namespace detail
-#else // defined(BOOST_HAS_DECLTYPE)
+#else // !defined(BOOST_NO_ISO_RESULT_OF)
// CWPro8 requires an argument in a function type specialization
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3002)) && BOOST_PP_ITERATION() == 0
Index: boost/utility/result_of.hpp
===================================================================
--- boost/utility/result_of.hpp (revision 50658)
+++ boost/utility/result_of.hpp (working copy)
@@ -92,6 +92,7 @@
#else
# define BOOST_NO_RESULT_OF 1
+# define BOOST_NO_ISO_RESULT_OF 1
#endif
}
Index: libs/utility/utility.htm
===================================================================
--- libs/utility/utility.htm (revision 50658)
+++ libs/utility/utility.htm (working copy)
@@ -154,8 +154,13 @@
...,tN). The implementation permits
the type F
to be a function pointer,
function reference, member function pointer, or class
- type.
If your compiler does not support
- decltype
, then when F
is a
+ type.
If your compiler cannot support the ISO
+ draft specification of result_of
,
+ N2798 20.7.4,
+ then the macro BOOST_NO_ISO_RESULT_OF
is
+ defined, and the following protocol is followed to
+ determine the type of call expressions.
+ When F
is a
class type with a member type result_type
,
result_of<F(T1, T2, ...,
TN)>
is
Index: libs/utility/test/result_of_test.cpp
===================================================================
--- libs/utility/test/result_of_test.cpp (revision 50658)
+++ libs/utility/test/result_of_test.cpp (working copy)
@@ -1,6 +1,6 @@
// Boost result_of library
-// Copyright Douglas Gregor 2003-2004. Use, modification and
+// Copyright Douglas Gregor and Daniel Walker 2003-2009. Use, modification and
// distribution is 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)
@@ -133,28 +133,28 @@
// Prior to decltype, result_of could not deduce the return type
// nullary function objects unless they exposed a result_type.
-#if defined(BOOST_HAS_DECLTYPE)
+#if defined(BOOST_NO_ISO_RESULT_OF)
+ BOOST_STATIC_ASSERT((is_same