Refactoring

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@128 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2010-02-20 22:26:09 +00:00
parent fe3d419f66
commit 1167f2afca
2 changed files with 9 additions and 10 deletions

View file

@ -50,7 +50,7 @@ namespace detail
template< typename T > template< typename T >
std::string serialize( const T& t, std::string serialize( const T& t,
BOOST_DEDUCED_TYPENAME boost::enable_if< BOOST_DEDUCED_TYPENAME boost::enable_if<
BOOST_DEDUCED_TYPENAME detail::is_serializable< T >::type >::type* = 0 ) BOOST_DEDUCED_TYPENAME detail::is_serializable< T > >::type* = 0 )
{ {
std::stringstream s; std::stringstream s;
static_cast< std::ostream& >( s ) << std::boolalpha << t; static_cast< std::ostream& >( s ) << std::boolalpha << t;
@ -59,7 +59,7 @@ namespace detail
template< typename T > template< typename T >
std::string serialize( const T&, std::string serialize( const T&,
BOOST_DEDUCED_TYPENAME boost::disable_if< BOOST_DEDUCED_TYPENAME boost::disable_if<
BOOST_DEDUCED_TYPENAME detail::is_serializable< T >::type >::type* = 0 ) BOOST_DEDUCED_TYPENAME detail::is_serializable< T > >::type* = 0 )
{ {
return "?"; return "?";
} }

View file

@ -36,14 +36,13 @@ namespace detail
template< typename T > template< typename T >
struct is_functor struct is_functor
{ : boost::mpl::or_<
typedef BOOST_DEDUCED_TYPENAME boost::mpl::or_< boost::function_types::is_callable_builtin< T >,
boost::function_types::is_callable_builtin< T >, has_result_type< T >,
has_result_type< T >, has_result< T >,
has_result< T >, has_sig< T >
has_sig< T > >
>::type type; {};
};
} }
} }