diff --git a/include/boost/intrusive/detail/has_member_function_callable_with.hpp b/include/boost/intrusive/detail/has_member_function_callable_with.hpp index 406c1f7..d34e73f 100644 --- a/include/boost/intrusive/detail/has_member_function_callable_with.hpp +++ b/include/boost/intrusive/detail/has_member_function_callable_with.hpp @@ -21,8 +21,9 @@ #include #include - //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) { - //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; }; diff --git a/test/has_member_function_callable_with.cpp b/test/has_member_function_callable_with.cpp index cf62c62..5daefa8 100644 --- a/test/has_member_function_callable_with.cpp +++ b/test/has_member_function_callable_with.cpp @@ -124,8 +124,8 @@ class has_member_function_named_func template 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 @@ class has_member_function_named_func struct has_member_function_callable_with_func_impl { + //GCC [3.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported. static const bool value = true; };