Movatterモバイル変換


[0]ホーム

URL:



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

410. Missing semantics for stack and queue comparison operators

Section: 23.3.11.2[list.cons], 23.3.11.4[list.modifiers]Status:CD1Submitter: Hans BosOpened: 2003-06-07Last modified: 2016-01-28

Priority:Not Prioritized

View all otherissues in [list.cons].

View all issues withCD1 status.

Discussion:

Sections 23.3.11.2[list.cons] and 23.3.11.4[list.modifiers] listcomparison operators (==, !=, <, <=, >, =>) for queue andstack. 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 aresupposed to do, but we ought to spell it out.


[8]ページ先頭

©2009-2026 Movatter.jp