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

Section: 23.14.7 [comparisons], 26.2.1 [container.requirements.general], 33.3.2.1 [thread.thread.id] Status: New Submitter: Matt Austern Opened: 2015-10-08 Last modified: 2015-10-30

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 23.14.7 [comparisons]/14, the Optional container requirements in 26.2.1 [container.requirements.general], and 33.3.2.1 [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 28.7 [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: