This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

2547. Container requirements (and other library text) should say "strict total order", not just "total order"

Section: 22.10.8 [comparisons], 24.2.2.1 [container.requirements.general], 33.4.3.2 [thread.thread.id] Status: New Submitter: Matt Austern Opened: 2015-10-08 Last modified: 2015-10-21

Priority: 3

View other active issues in [comparisons].

View all other issues in [comparisons].

View all issues with New status.

Discussion:

A number of places in the library, including 22.10.8 [comparisons]/14, the Optional container requirements in 24.2.2.1 [container.requirements.general], and 33.4.3.2 [thread.thread.id]/8, use the phrase "total order". Unfortunately, that phrase is ambiguous. In mathematics, the most common definition is that a relation is a total order if it's total, transitive, and antisymmetric in the sense that x≤y ∧ y≤x ⇒ x=y. What we really want is a strict total order: a relation < is a strict total order if it's total, transitive, and antisymmetric in the sense that exactly one of x<y, y<x, and x=y holds.

The non-normative note in 27.8 [alg.sorting]/4 correctly uses the phrase "strict total ordering" rather than simply "total ordering".

We could address this issue by replacing "total order" with "strict total order" everywhere it appears, since I think there are no cases where we actually want a non-strict total order, or we could add something in Clause 17 saying that we always mean strict total order whenever we say total order.

Proposed resolution: