Movatterモバイル変換


[0]ホーム

URL:



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

201. Numeric limits terminology wrong

Section: 17.3[support.limits]Status:CD1Submitter: Stephen ClearyOpened: 1999-12-21Last modified: 2017-06-15

Priority:Not Prioritized

View all issues withCD1 status.

Discussion:

In some places in this section, the terms "fundamental types" and"scalar types" are used when the term "arithmetic types" is intended.The current usage is incorrect because void is a fundamental type andpointers are scalar types, neither of which should havespecializations of numeric_limits.

[Lillehammer: it remains true that numeric_limits is using imprecise language. However, none of the proposals for changed wording are clearer. A redesign of numeric_limits is needed, but this is more a task than an open issue.]

Proposed resolution:

Change 17.3[support.limits] to:

-1- The headers<limits>,<climits>,<cfloat>, and<cinttypes> supplycharacteristics of implementation-dependentfundamentalarithmetic types (3.9.1).

Change [limits] to:

-1- Thenumeric_limits component provides a C++ program withinformation about various properties of the implementation'srepresentation of thefundamentalarithmetictypes.

-2- Specializations shall be provided for eachfundamentalarithmetic type, both floating point and integer, includingbool. The memberis_specialized shall betruefor all such specializations ofnumeric_limits.

-4- Non-fundamentalarithmetic standard types, suchascomplex<T> (26.3.2), shall not have specializations.

Change 17.3.5[numeric.limits] to:

-1- The memberis_specialized makes it possible to distinguishbetween fundamental types, which have specializations, and non-scalar types,which do not.


[8]ページ先頭

©2009-2026 Movatter.jp