Title
std::min() and max() requirements overly restrictive
Status
cd1
Section
[alg.min.max]
Submitter
Martin Sebor

Created on 2000-12-02.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

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]).

Date: 2000-12-02.00:00:00

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

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2100
2000-12-02 00:00:00admincreate