From c0eb4fe944bc7a3039d60a34fa52fc27f389ac7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Fri, 30 Dec 2011 09:02:57 +0000 Subject: [PATCH] Code simplification to gcc-3.4 & gcc-4.0 [SVN r76224] --- test/has_member_function_callable_with.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/has_member_function_callable_with.cpp b/test/has_member_function_callable_with.cpp index fd5498a..cf62c62 100644 --- a/test/has_member_function_callable_with.cpp +++ b/test/has_member_function_callable_with.cpp @@ -10,6 +10,8 @@ #include #include +//Just for BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED +#include #include #include @@ -94,6 +96,8 @@ class has_member_function_named_func #if !defined(_MSC_VER) || (_MSC_VER != 1600) + #if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED) + template().func(), 0)> struct zeroarg_checker_func { @@ -124,6 +128,17 @@ class has_member_function_named_func == sizeof(has_member_function_callable_with::yes_type); }; + #else + + template + struct has_member_function_callable_with_func_impl + + { + static const bool value = true; + }; + + #endif + #else template @@ -380,6 +395,7 @@ int main() { 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::value ? 1 : -1]; int check2[!has_member_function_callable_with_func::value ? 1 : -1]; @@ -390,6 +406,7 @@ int main() (void)check3; (void)check4; } + #endif { int check1[ has_member_function_callable_with_func::value ? 1 : -1];