Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76224 - trunk/libs/intrusive/test
From: igaztanaga_at_[hidden]
Date: 2011-12-30 04:02:58


Author: igaztanaga
Date: 2011-12-30 04:02:57 EST (Fri, 30 Dec 2011)
New Revision: 76224
URL: http://svn.boost.org/trac/boost/changeset/76224

Log:
Code simplification to gcc-3.4 & gcc-4.0
Text files modified:
   trunk/libs/intrusive/test/has_member_function_callable_with.cpp | 17 +++++++++++++++++
   1 files changed, 17 insertions(+), 0 deletions(-)

Modified: trunk/libs/intrusive/test/has_member_function_callable_with.cpp
==============================================================================
--- trunk/libs/intrusive/test/has_member_function_callable_with.cpp (original)
+++ trunk/libs/intrusive/test/has_member_function_callable_with.cpp 2011-12-30 04:02:57 EST (Fri, 30 Dec 2011)
@@ -10,6 +10,8 @@
 
 #include <boost/intrusive/detail/config_begin.hpp>
 #include <boost/intrusive/detail/workaround.hpp>
+//Just for BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
 #include <cstddef>
 #include <boost/move/move.hpp>
 
@@ -94,6 +96,8 @@
 
       #if !defined(_MSC_VER) || (_MSC_VER != 1600)
 
+ #if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
+
          template<class F, std::size_t N = sizeof(boost::move_detail::declval<F>().func(), 0)>
          struct zeroarg_checker_func
          {
@@ -124,6 +128,17 @@
                                  == sizeof(has_member_function_callable_with::yes_type);
          };
 
+ #else
+
+ template<typename Fun>
+ struct has_member_function_callable_with_func_impl
+ <Fun, true , void , void , void>
+ {
+ static const bool value = true;
+ };
+
+ #endif
+
       #else
 
          template<typename Fun>
@@ -380,6 +395,7 @@
 {
    using namespace boost::intrusive::intrusive_detail;
 
+ #if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
    {
    int check1[ has_member_function_callable_with_func<functor>::value ? 1 : -1];
    int check2[!has_member_function_callable_with_func<functor2>::value ? 1 : -1];
@@ -390,6 +406,7 @@
    (void)check3;
    (void)check4;
    }
+ #endif
 
    {
    int check1[ has_member_function_callable_with_func<functor, int>::value ? 1 : -1];


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