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:
mat007 2012-03-23 07:54:11 +00:00
parent 8c1e878480
commit aa09d7fe61
2 changed files with 3 additions and 50 deletions

View file

@ -14,7 +14,6 @@
#include "operators.hpp" #include "operators.hpp"
#include "log.hpp" #include "log.hpp"
#include <boost/utility/enable_if.hpp> #include <boost/utility/enable_if.hpp>
#include <boost/concept_check.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/ref.hpp> #include <boost/ref.hpp>
@ -22,42 +21,6 @@ namespace mock
{ {
namespace detail 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 > template< typename Actual >
class check_base : boost::noncopyable class check_base : boost::noncopyable
{ {
@ -81,12 +44,7 @@ namespace detail
public: public:
explicit check( Expected expected ) explicit check( Expected expected )
: expected_( expected ) : expected_( expected )
{ {}
BOOST_CONCEPT_ASSERT(( EqualityComparable<
BOOST_DEDUCED_TYPENAME
boost::unwrap_reference< Expected >::type,
Actual > ));
}
private: private:
virtual bool operator()( Actual actual ) virtual bool operator()( Actual actual )
{ {
@ -107,9 +65,7 @@ namespace detail
public: public:
explicit check( const constraint< Constraint >& c ) explicit check( const constraint< Constraint >& c )
: c_( c.f_ ) : c_( c.f_ )
{ {}
BOOST_CONCEPT_ASSERT(( FunctorCompatible< Constraint, Actual > ));
}
private: private:
virtual bool operator()( Actual actual ) virtual bool operator()( Actual actual )
{ {
@ -133,9 +89,7 @@ namespace detail
public: public:
explicit check( const Functor& f ) explicit check( const Functor& f )
: f_( f ) : f_( f )
{ {}
BOOST_CONCEPT_ASSERT(( FunctorCompatible< Functor, Actual > ));
}
private: private:
virtual bool operator()( Actual actual ) virtual bool operator()( Actual actual )
{ {

View file

@ -11,7 +11,6 @@
//#include <boost/spirit/home/phoenix/core/nothing.hpp> //#include <boost/spirit/home/phoenix/core/nothing.hpp>
//#include <boost/spirit/home/phoenix/bind.hpp> //#include <boost/spirit/home/phoenix/bind.hpp>
//#include <boost/function.hpp> //#include <boost/function.hpp>
//#include <boost/concept_check.hpp>
//#include <boost/bind.hpp> //#include <boost/bind.hpp>
//#include <boost/test/test_tools.hpp> //#include <boost/test/test_tools.hpp>
//#include <boost/test/unit_test_suite.hpp> //#include <boost/test/unit_test_suite.hpp>