A RetroSearch Logo

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

Search Query:

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

min() and max() requirements overly restrictive

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.

281. std::min() and max() requirements overly restrictive

Section: 26.8.9 [alg.min.max] Status: CD1 Submitter: Martin Sebor Opened: 2000-12-02 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [alg.min.max].

View all other issues in [alg.min.max].

View all issues with CD1 status.

Duplicate of: 486

Discussion:

The requirements in 25.3.7, p1 and 4 call for T to satisfy the requirements of LessThanComparable ( [lessthancomparable]) and CopyConstructible (16.4.4.2 [utility.arg.requirements]). Since the functions take and return their arguments and result by const reference, I believe the CopyConstructible requirement is unnecessary.

Proposed resolution:

Remove the CopyConstructible requirement. Specifically, replace 25.3.7, p1 with

-1- Requires: Type T is LessThanComparable ( [lessthancomparable]).

and replace 25.3.7, p4 with

-4- Requires: Type T is LessThanComparable ( [lessthancomparable]).


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