Moved some components into a detail sub-directory

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@500 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-07-22 07:09:03 +00:00
parent 188b684d23
commit 4694fb6263
8 changed files with 12 additions and 12 deletions

View file

@ -10,8 +10,8 @@
#define MOCK_CHECK_HPP_INCLUDED
#include "operators.hpp"
#include "is_functor.hpp"
#include "../log.hpp"
#include "../is_functor.hpp"
#include <boost/utility/enable_if.hpp>
#include <boost/noncopyable.hpp>
#include <boost/ref.hpp>

View file

@ -0,0 +1,49 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2009
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef MOCK_IS_FUNCTOR_HPP_INCLUDED
#define MOCK_IS_FUNCTOR_HPP_INCLUDED
#include "yes_no_type.hpp"
#include <boost/function_types/is_callable_builtin.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/or.hpp>
namespace mock
{
namespace detail
{
#define MOCK_IS_FUNCTION_HELPER(N, M) \
template< typename T > yes_type& N##_helper( \
BOOST_DEDUCED_TYPENAME T::M* ); \
template< typename T > no_type& N##_helper( ... ); \
template< typename T > struct N \
: boost::mpl::bool_< \
sizeof( N##_helper< T >( 0 ) ) == sizeof( yes_type ) \
> \
{};
MOCK_IS_FUNCTION_HELPER( has_result_type, result_type )
MOCK_IS_FUNCTION_HELPER( has_sig, BOOST_NESTED_TEMPLATE sig< void > )
MOCK_IS_FUNCTION_HELPER( has_result, BOOST_NESTED_TEMPLATE result< void > )
#undef MOCK_IS_FUNCTION_HELPER
template< typename T >
struct is_functor
: boost::mpl::or_<
boost::function_types::is_callable_builtin< T >,
has_result_type< T >,
has_result< T >,
has_sig< T >
>
{};
}
} // mock
#endif // MOCK_IS_FUNCTOR_HPP_INCLUDED