Corrections for GCC 4.3

[SVN r76246]
This commit is contained in:
Ion Gaztañaga
2011-12-31 14:42:16 +00:00
parent 73963d75af
commit 614b548834
2 changed files with 8 additions and 5 deletions

View File

@@ -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;
};

View File

@@ -124,8 +124,8 @@ class has_member_function_named_func
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 @@ class has_member_function_named_func
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;
};