410. Missing semantics for stack and queue comparison operators

Section: 24.3.10.2 [list.cons], 24.3.10.4 [list.modifiers] Status: CD1 Submitter: Hans Bos Opened: 2003-06-07 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View all other issues in [list.cons].

View all issues with CD1 status.

Discussion:

Sections 24.3.10.2 [list.cons] and 24.3.10.4 [list.modifiers] list comparison operators (==, !=, <, <=, >, =>) for queue and stack. Only the semantics for queue::operator== (24.3.10.2 [list.cons] par2) and queue::operator< (24.3.10.2 [list.cons] par3) are defined.

Proposed resolution:

Add the following new paragraphs after 24.3.10.2 [list.cons] paragraph 3:

  operator!=

Returns: x.c != y.c

  operator>

Returns: x.c > y.c

  operator<=

Returns: x.c <= y.c

  operator>=

Returns: x.c >= y.c

Add the following paragraphs at the end of 24.3.10.4 [list.modifiers]:

  operator==

Returns: x.c == y.c

  operator<

Returns: x.c < y.c

  operator!=

Returns: x.c != y.c

  operator>

Returns: x.c > y.c

  operator<=

Returns: x.c <= y.c

  operator>=

Returns: x.c >= y.c

[Kona: Matt provided wording.]

Rationale:

There isn't any real doubt about what these operators are supposed to do, but we ought to spell it out.