forked from boostorg/concept_check
fixed Const_BinaryPredicate_concept for borland
[SVN r8117]
This commit is contained in:
@@ -491,10 +491,14 @@ template <class T> void ignore_unused_variable_warning(const T&) { }
|
|||||||
template <class Func, class First, class Second>
|
template <class Func, class First, class Second>
|
||||||
struct Const_BinaryPredicate_concept {
|
struct Const_BinaryPredicate_concept {
|
||||||
void constraints() {
|
void constraints() {
|
||||||
REQUIRE3(Func, First, Second, BinaryPredicate);
|
const_constraints(f);
|
||||||
require_boolean_expr(f(a, b)); // operator() must be a const member function
|
|
||||||
}
|
}
|
||||||
const Func f;
|
void const_constraints(const Func& fun) {
|
||||||
|
REQUIRE3(Func, First, Second, BinaryPredicate);
|
||||||
|
// operator() must be a const member function
|
||||||
|
require_boolean_expr(fun(a, b));
|
||||||
|
}
|
||||||
|
Func f;
|
||||||
First a;
|
First a;
|
||||||
Second b;
|
Second b;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user