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.

282. What types does numpunct grouping refer to?

Section: 28.3.4.3.3.3[facet.num.put.virtuals]Status:CD1Submitter: Howard HinnantOpened: 2000-12-05Last modified: 2016-01-28

Priority:Not Prioritized

View otheractive issues in [facet.num.put.virtuals].

View all otherissues in [facet.num.put.virtuals].

View all issues withCD1 status.

Discussion:

Paragraph 16 mistakenly singles out integral types for inserting thousands_sep() characters. This conflicts with the syntax for floating point numbers described under 22.2.3.1/2.

Proposed resolution:

Change paragraph 16 from:

For integral types, punct.thousands_sep() characters are inserted into the sequence as determined by the value returned by punct.do_grouping() using the method described in 28.3.4.4.1.3[facet.numpunct.virtuals].

To:

For arithmetic types, punct.thousands_sep() characters are inserted into the sequence as determined by the value returned by punct.do_grouping() using the method described in 28.3.4.4.1.3[facet.numpunct.virtuals].

[Copenhagen: Opinions were divided about whether this is actually aninconsistency, but at best it seems to have been unintentional. Thisis only an issue for floating-point output: The standard isunambiguous that implementations must parse thousands_sep characterswhen performing floating-point. The standard is also unambiguous thatthis requirement does not apply to the "C" locale.]

[A survey of existing practice is needed; it is believed that someimplementations do insert thousands_sep characters for floating-pointoutput and others fail to insert thousands_sep characters for floating-point input even though this is unambiguously required by thestandard.]

[Post-Curaçao: the above proposed resolution is the consensus ofHoward, Bill, Pete, Benjamin, Nathan, Dietmar, Boris, and Martin.]


[8]ページ先頭

©2009-2026 Movatter.jp