7 #ifndef IGLOO_EQUALSCONTAINERCONSTRAINT_H 8 #define IGLOO_EQUALSCONTAINERCONSTRAINT_H 12 namespace constraint_internal {
14 inline bool default_comparer(
const T& lhs,
const T& rhs)
20 template<
typename ExpectedType,
typename BinaryPredicate>
24 : expected_(expected), predicate_(predicate)
27 template<
typename ActualType>
28 bool operator()(
const ActualType& actual)
const 30 typename ActualType::const_iterator actual_it;
31 typename ExpectedType::const_iterator expected_it;
33 for(actual_it = actual.begin(), expected_it = expected_.begin(); actual_it != actual.end() && expected_it != expected_.end(); actual_it++, expected_it++)
35 if(!predicate_(*actual_it, *expected_it))
41 return actual.size() == expected_.size();
44 const ExpectedType expected_;
45 const BinaryPredicate predicate_;
48 template<
typename ExpectedType>
54 template<
typename ExpectedType,
typename BinaryPredicate >
60 template<
typename ExpectedType,
typename BinaryPredicate >
65 std::ostringstream builder;
66 builder << snowhouse::Stringize(constraint.expected_);
Definition: stringize.h:71
Definition: equalscontainerconstraint.h:21
Definition: expression.h:17