|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53261 - trunk/boost/lambda/detail
From: steven_at_[hidden]
Date: 2009-05-25 17:52:14
Author: steven_watanabe
Date: 2009-05-25 17:52:12 EDT (Mon, 25 May 2009)
New Revision: 53261
URL: http://svn.boost.org/trac/boost/changeset/53261
Log:
Fix lambda regression with msvc 7.1
Text files modified:
trunk/boost/lambda/detail/lambda_functors.hpp | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
Modified: trunk/boost/lambda/detail/lambda_functors.hpp
==============================================================================
--- trunk/boost/lambda/detail/lambda_functors.hpp (original)
+++ trunk/boost/lambda/detail/lambda_functors.hpp 2009-05-25 17:52:12 EDT (Mon, 25 May 2009)
@@ -13,6 +13,30 @@
#ifndef BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP
#define BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+#include <boost/mpl/or.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_array.hpp>
+
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY1(A1, R1)\
+ typename lazy_disable_if<is_array<A1>, typename R1 >::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY2(A1, A2, R1, R2) \
+ typename lazy_disable_if<mpl::or_<is_array<A1>, is_array<A2> >, typename R1, R2 >::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY3(A1, A2, A3, R1, R2, R3) \
+ typename lazy_disable_if<mpl::or_<is_array<A1>, is_array<A2>, is_array<A3> >, typename R1, R2, R3 >::type
+
+#else
+
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY1(A1, R1) typename R1::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY2(A1, A2, R1, R2) typename R1, R2::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY3(A1, A2, A3, R1, R2, R3) typename R1, R2, R3::type
+
+#endif
+
namespace boost {
namespace lambda {
@@ -152,7 +176,7 @@
}
template<class A>
- typename inherited::template sig<tuple<A const&> >::type
+ BOOST_LAMBDA_DISABLE_IF_ARRAY1(A, inherited::template sig<tuple<A const&> >)
operator()(A const& a) const {
return inherited::template call<
typename inherited::template sig<tuple<A const&> >::type
@@ -168,7 +192,7 @@
}
template<class A, class B>
- typename inherited::template sig<tuple<A const&, B&> >::type
+ BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A const&, B&> >)
operator()(A const& a, B& b) const {
return inherited::template call<
typename inherited::template sig<tuple<A const&, B&> >::type
@@ -176,7 +200,7 @@
}
template<class A, class B>
- typename inherited::template sig<tuple<A&, B const&> >::type
+ BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A&, B const&> >)
operator()(A& a, B const& b) const {
return inherited::template call<
typename inherited::template sig<tuple<A&, B const&> >::type
@@ -184,7 +208,7 @@
}
template<class A, class B>
- typename inherited::template sig<tuple<A const&, B const&> >::type
+ BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A const&, B const&> >)
operator()(A const& a, B const& b) const {
return inherited::template call<
typename inherited::template sig<tuple<A const&, B const&> >::type
@@ -201,7 +225,7 @@
}
template<class A, class B, class C>
- typename inherited::template sig<tuple<A const&, B const&, C const&> >::type
+ BOOST_LAMBDA_DISABLE_IF_ARRAY3(A, B, C, inherited::template sig<tuple<A const&, B const&, C const&> >)
operator()(A const& a, B const& b, C const& c) const
{
return inherited::template call<
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