From dc72d4c6970549f7ae871fe53242634ec9fee520 Mon Sep 17 00:00:00 2001 From: mat007 Date: Fri, 28 Aug 2009 21:11:33 +0000 Subject: [PATCH] Fix for gcc git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@7 860be788-9bd5-4423-9f1e-828f051e677b --- src/libraries/turtle/is_functor.hpp | 6 ++---- src/tests/turtle_test/is_functor_test.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libraries/turtle/is_functor.hpp b/src/libraries/turtle/is_functor.hpp index 6b57ecb..85f3117 100644 --- a/src/libraries/turtle/is_functor.hpp +++ b/src/libraries/turtle/is_functor.hpp @@ -19,9 +19,9 @@ namespace detail typedef char false_type[1]; template< typename T > - true_type& has_result_type_helper( T*, BOOST_DEDUCED_TYPENAME T::result_type* = 0 ) {} + true_type& has_result_type_helper( T*, BOOST_DEDUCED_TYPENAME T::result_type* = 0 ); template< typename T > - false_type& has_result_type_helper( T, ... ) {} + false_type& has_result_type_helper( T, ... ); template< typename T > struct has_result_type @@ -34,13 +34,11 @@ namespace detail struct is_functor { typedef BOOST_DEDUCED_TYPENAME boost::function_types::is_callable_builtin< T >::type type; - enum { value = BOOST_DEDUCED_TYPENAME type::value }; }; template< typename T > struct is_functor< T, true > { typedef boost::true_type type; - enum { value = true }; }; } } diff --git a/src/tests/turtle_test/is_functor_test.cpp b/src/tests/turtle_test/is_functor_test.cpp index efa3098..77ae501 100644 --- a/src/tests/turtle_test/is_functor_test.cpp +++ b/src/tests/turtle_test/is_functor_test.cpp @@ -19,7 +19,7 @@ namespace template< typename T > void check( T ) { - BOOST_STATIC_ASSERT(( mock::detail::is_functor< T >::value )); + BOOST_STATIC_ASSERT(( mock::detail::is_functor< T >::type::value )); } void f0 () {}