Concept ComparableConcept
A type that can be compared.

Extends EqualityComparableConcept, LessThanComparableConcept
All Extended EqualityComparableConcept, LessThanComparableConcept
All Subcl's FiniteOrderedAlphabetConcept, IntegerConcept, OrderedAlphabetConcept, SignedIntegerConcept, UnsignedIntegerConcept
Defined in <seqan/basic.h>
Signature Comparable<T>

Detailed Description

Expects instances of type T to be comparable. Comparison operators must return boolean convertible values.

Valid Expressions

a < b;
a > b;
a <= b;
a >= b;

Invariants:

  • (a < b) <=> b > a
  • (a <= b) <=> b >= a
  • (a == b) <=> (a >= b) && (b >= a)

See Also

Member Function Overview

Member Functions Inherited From EqualityComparableConcept

Member Functions Inherited From LessThanComparableConcept

Interface Function Overview

Member Functions Detail

bool T::operator>(T const & other) const;

C++ built-in greater-than comparison operator.

This operator can be implemented as a member or a global function.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

Interface Functions Detail

bool T::operator<=(T const & other) const;

C++ built-in less-than-or-equal comparison operator.

This operator can be implemented as a member or a global function.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

bool T::operator>=(T const & other) const;

C++ built-in greather-than-or-equal comparison operator.

This operator can be implemented as a member or a global function.

Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.