A RetroSearch Logo

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

Search Query:

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

distance first and last confused

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

210. distance first and last confused

Section: 26 [algorithms] Status: TC1 Submitter: Lisa Lippincott Opened: 2000-02-15 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [algorithms].

View all other issues in [algorithms].

View all issues with TC1 status.

Discussion:

In paragraph 9 of section 26 [algorithms], it is written:

In the description of the algorithms operators + and - are used for some of the iterator categories for which they do not have to be defined. In these cases the semantics of [...] a-b is the same as of

     return distance(a, b);

Proposed resolution:

On the last line of paragraph 9 of section 26 [algorithms] change "a-b" to "b-a".

Rationale:

There are two ways to fix the defect; change the description to b-a or change the return to distance(b,a). The LWG preferred the former for consistency.


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