mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Removed concept checks which caused longer compilation error traces
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@429 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
8c1e878480
commit
aa09d7fe61
2 changed files with 3 additions and 50 deletions
|
|
@ -14,7 +14,6 @@
|
|||
#include "operators.hpp"
|
||||
#include "log.hpp"
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
|
|
@ -22,42 +21,6 @@ namespace mock
|
|||
{
|
||||
namespace detail
|
||||
{
|
||||
template< typename Functor, typename Actual >
|
||||
struct FunctorCompatible : private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
BOOST_CONCEPT_USAGE( FunctorCompatible )
|
||||
{
|
||||
boost::require_boolean_expr(
|
||||
// if an error is generated by the line below it means
|
||||
// an argument passed to 'with' was of the wrong type
|
||||
functor_accepts( actual_argument_type )
|
||||
);
|
||||
}
|
||||
private:
|
||||
FunctorCompatible( int ) {}
|
||||
Functor functor_accepts;
|
||||
Actual actual_argument_type;
|
||||
};
|
||||
|
||||
template< typename Expected, typename Actual >
|
||||
struct EqualityComparable : private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
BOOST_CONCEPT_USAGE( EqualityComparable )
|
||||
{
|
||||
boost::require_boolean_expr(
|
||||
// if an error is generated by the line below it means
|
||||
// an argument passed to 'with' was of the wrong type
|
||||
actual_argument_type == expected_argument_type
|
||||
);
|
||||
}
|
||||
private:
|
||||
EqualityComparable( int ) {}
|
||||
Expected expected_argument_type;
|
||||
Actual actual_argument_type;
|
||||
};
|
||||
|
||||
template< typename Actual >
|
||||
class check_base : boost::noncopyable
|
||||
{
|
||||
|
|
@ -81,12 +44,7 @@ namespace detail
|
|||
public:
|
||||
explicit check( Expected expected )
|
||||
: expected_( expected )
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( EqualityComparable<
|
||||
BOOST_DEDUCED_TYPENAME
|
||||
boost::unwrap_reference< Expected >::type,
|
||||
Actual > ));
|
||||
}
|
||||
{}
|
||||
private:
|
||||
virtual bool operator()( Actual actual )
|
||||
{
|
||||
|
|
@ -107,9 +65,7 @@ namespace detail
|
|||
public:
|
||||
explicit check( const constraint< Constraint >& c )
|
||||
: c_( c.f_ )
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( FunctorCompatible< Constraint, Actual > ));
|
||||
}
|
||||
{}
|
||||
private:
|
||||
virtual bool operator()( Actual actual )
|
||||
{
|
||||
|
|
@ -133,9 +89,7 @@ namespace detail
|
|||
public:
|
||||
explicit check( const Functor& f )
|
||||
: f_( f )
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( FunctorCompatible< Functor, Actual > ));
|
||||
}
|
||||
{}
|
||||
private:
|
||||
virtual bool operator()( Actual actual )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
//#include <boost/spirit/home/phoenix/core/nothing.hpp>
|
||||
//#include <boost/spirit/home/phoenix/bind.hpp>
|
||||
//#include <boost/function.hpp>
|
||||
//#include <boost/concept_check.hpp>
|
||||
//#include <boost/bind.hpp>
|
||||
//#include <boost/test/test_tools.hpp>
|
||||
//#include <boost/test/unit_test_suite.hpp>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue