Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76246 - in trunk: boost/intrusive/detail libs/intrusive/test
From: igaztanaga_at_[hidden]
Date: 2011-12-31 09:42:17


Author: igaztanaga
Date: 2011-12-31 09:42:16 EST (Sat, 31 Dec 2011)
New Revision: 76246
URL: http://svn.boost.org/trac/boost/changeset/76246

Log:
Corrections for GCC 4.3
Text files modified:
   trunk/boost/intrusive/detail/has_member_function_callable_with.hpp | 8 +++++---
   trunk/libs/intrusive/test/has_member_function_callable_with.cpp | 5 +++--
   2 files changed, 8 insertions(+), 5 deletions(-)

Modified: trunk/boost/intrusive/detail/has_member_function_callable_with.hpp
==============================================================================
--- trunk/boost/intrusive/detail/has_member_function_callable_with.hpp (original)
+++ trunk/boost/intrusive/detail/has_member_function_callable_with.hpp 2011-12-31 09:42:16 EST (Sat, 31 Dec 2011)
@@ -21,8 +21,9 @@
       #include <boost/static_assert.hpp>
       #include <boost/move/move.hpp>
 
- //Mark that we don't support 0 arg calls due to compiler ICE
- #if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) < 430)
+ //Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
+ //wrong SFINAE for GCC 4.2/4.3
+ #if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430)
       #define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
       #endif
 
@@ -118,7 +119,8 @@
             struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
                <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
             {
- //GCC [4.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported.
+ //Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
+ //wrong SFINAE for GCC 4.2/4.3
                static const bool value = true;
             };
 

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-31 09:42:16 EST (Sat, 31 Dec 2011)
@@ -124,8 +124,8 @@
             template <class U>
             static has_member_function_callable_with::no_type Test(...);
             
- static const bool value = sizeof(Test< Fun >(0))
- == sizeof(has_member_function_callable_with::yes_type);
+ static const bool value
+ = sizeof(Test< Fun >(0)) == sizeof(has_member_function_callable_with::yes_type);
          };
 
          #else
@@ -134,6 +134,7 @@
          struct has_member_function_callable_with_func_impl
             <Fun, true , void , void , void>
          {
+ //GCC [3.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported.
             static const bool value = true;
          };
 


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