Title
Regular is the wrong concept to constrain numeric_limits
Status
nad concepts
Section
[numeric.limits]
Submitter
Alisdair Meredith

Created on 2008-09-24.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

[ Summit: ]

Move to Open. Alisdair and Gaby will work on a solution, along with the new treatment of axioms in clause 14.

Date: 2008-09-24.00:00:00

Addresses FR 32 and DE 16

numeric_limits has functions specifically designed to return NaNs, which break the model of Regular (via its axioms.) While floating point types will be acceptible in many algorithms taking Regular values, it is not appopriate for this specific API and we need a less refined constraint.

FR 32:

The definition of numeric_limits<> as requiring a regular type is both conceptually wrong and operationally illogical. As we pointed before, this mistake needs to be corrected. For example, the template can be left unconstrained. In fact this reflects a much more general problem with concept_maps/axioms and their interpretations. It appears that the current text heavily leans toward experimental academic type theory.

DE 16:

The class template numeric_limits should not specify the Regular concept requirement for its template parameter, because it contains functions returning NaN values for floating-point types; these values violate the semantics of EqualityComparable.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg4293
2008-09-24 00:00:00admincreate