This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++11 status.
<cinttypes>Section: 31.8.3[istringstream]Status:C++11Submitter: CanadaOpened: 2010-08-25Last modified: 2016-01-28
Priority:Not Prioritized
View all issues withC++11 status.
Discussion:
Addresses CA-4
Subclause 27.9.2 [c.files] specifies that <cinttypes> hasdeclarations for abs() and div(); however, the signaturesare not present in this subclause. The signaturesproposed under TR1 ([tr.c99.inttypes]) are not present inFCD (unless if intmax_t happened to be long long). It isunclear as to which, if any of the abs() and div() functionsin [c.math] are meant to be declared by <cinttypes>. Thissubclause mentions imaxabs() and imaxdiv(). Thesefunctions, among other things, are not specified in FCD tobe the functions from Subclause 7.8 of the C Standard.Finally, <cinttypes> is not specified in FCD to include<cstdint> (whereas <inttypes.h> includes <stdint.h> in C).
[Post-Rapperswil, Daniel provides wording]
Subclause [c.files] specifies that<cinttypes> has declarations forabs() anddiv(); however, the signatures are not present in this subclause. The signatures proposed under TR1 ([tr.c99.inttypes]) are not present in FCD (unless ifintmax_t happened to belong long). It is unclear as to which, if any of theabs() anddiv() functions in [c.math] are meant to be declared by<cinttypes>. Thissubclause mentionsimaxabs() andimaxdiv(). These functions, among other things, are not specified in FCD to be the functions from subclause 7.8 of theC Standard. Finally,<cinttypes> is not specified in FCD to include<cstdint> (whereas<inttypes.h> includes<stdint.h> inC).
Moved to Tentatively Ready with proposed wording after 5 positive votes on c++std-lib.
[Adopted at 2010-11 Batavia]
Proposed resolution:
The wording refers to N3126.
Table 132 describes header
2 - The contents of header<cinttypes>. [Note: The macros defined by<cinttypes>are provided unconditionally.In particular, the symbol__STDC_FORMAT_MACROS, mentioned in footnote 182 of theCstandard, plays no role inC++. —end note ]<cinttypes>are the same as the StandardClibrary header<inttypes.h>, with the following changes:3 - The header<cinttypes>includes the header<cstdint>instead of<stdint.h>.4 - If and only if the typeintmax_tdesignates an extended integer type ([basic.fundamental]), the following function signatures are added:intmax_t abs(intmax_t);imaxdiv_t div(intmax_t, intmax_t);which shall have the same semantics as the function signatures
intmax_t imaxabs(intmax_t)andimaxdiv_t imaxdiv(intmax_t, intmax_t), respectively.