A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue410 below:

Missing semantics for stack and queue comparison operators

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

410. Missing semantics for stack and queue comparison operators

Section: 23.3.11.2 [list.cons], 23.3.11.4 [list.modifiers] Status: CD1 Submitter: Hans Bos Opened: 2003-06-07 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [list.cons].

View all issues with CD1 status.

Discussion:

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

Proposed resolution:

Add the following new paragraphs after 23.3.11.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 23.3.11.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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4