Movatterモバイル変換


[0]ホーム

URL:



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

2044. No definition of "Stable" for copy algorithms

Section: 16.4.6.8[algorithm.stable]Status:C++14Submitter: Pablo HalpernOpened: 2011-03-24Last modified: 2016-01-28

Priority:Not Prioritized

View all issues withC++14 status.

Discussion:

16.4.6.8[algorithm.stable] specified the meaning of "stable" when applied to the different types of algorithms. The second bullet says:

— For theremove algorithms the relative order of the elements that are not removed is preserved.

There is no description of what "stable" means for copy algorithms, even though the term is applied tocopy_if (and perhaps others now or in the future). Thus,copy_if is using the term without a precise definition.

[Bloomington, 2011]

Move to Ready

Proposed resolution:

This wording is relative to the FDIS.

  1. In 16.4.6.8[algorithm.stable] p. 1 change as indicated:

    When the requirements for an algorithm state that it is “stable” without further elaboration, it means:

    • For thesort algorithms the relative order of equivalent elements is preserved.
    • For theremoveandcopy algorithms the relative order of the elements that are not removed is preserved.
    • For themerge algorithms, for equivalent elements in the original two ranges, the elements from thefirst range precede the elements from the second range.

[8]ページ先頭

©2009-2026 Movatter.jp