Models

• bool (*)(int,int)

• equal_to

See also

Predicate, Adaptable Predicate, Adaptable Binary Predicate

Adaptable Predicate

Category: functors

Component type: concept

Description

An Adaptable Predicate is a Predicate that is also an Adaptable Unary Function. That is, it is a Unary Function whose return type is bool, and that includes nested typedefs that define its argument type and return type.

Refinement of

Predicate, Adaptable Unary Function

Associated types

None, except for those associated with Predicate and Adaptable Unary Function.

Valid expressions

None, except for those defined by the Predicate and Adaptable Unary Function requirements.

Models

• logical_not

• unary_negate

See also

Predicate, Binary Predicate, Adaptable Binary Predicate

Adaptable Binary Predicate

Category: functors

Component type: concept

Description

An Adaptable Binary Predicate is a Binary Predicate that is also an Adaptable Binary Function. That is, it is a Binary Function whose return type is bool, and that includes nested typedef s that define its argument types and return type.

Refinement of

Predicate, Adaptable Binary Function

Associated types

None, except for those associated with Predicate and Adaptable Binary Function.

Valid expressions

None, except for those defined by the Predicate and Adaptable Binary Function requirements.

Models

• less

• equal_to

• logical_and

• logical_or

• binary_negate

See also

Binary Predicate, Predicate, Adaptable Predicate

Strict Weak Ordering

Category: functors

Component type: concept

Description

A Strict Weak Ordering is a Binary Predicate that compares two objects, returning true if the first precedes the second. This predicate must satisfy the standard mathematical definition of a strict weak ordering. The precise requirements are stated below, but what they roughly mean is that a Strict Weak Ordering has to behave the way that 'less than' behaves: if a is less than b then b is not less than a, if a is less than b and b is less than c then a is less than c, and so on.

Refinement of

Binary Predicate

Associated types
First argument type The type of the Strict Weak Ordering's first argument.
Second argument type The type of the Strict Weak Ordering's second argument. The first argument type and second argument type must be the same.
Result type The type returned when the Strict Weak Ordering is called. The result type must be convertible to bool.
Notation

F A type that is a model of Strict Weak Ordering

X The type of Strict Weak Ordering's arguments.

f Object of type F

x, y, z Object of type X

Definitions

• Two objects x and y are equivalent if both f(x, y) and f(y, x) are false. Note that an object is always (by the irreflexivity invariant) equivalent to itself.

Valid expressions

None, except for those defined in the Binary Predicate requirements.

Expression semantics
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату