Title
Does <cinttypes> have macro guards?
Status
c++11
Section
[c.files]
Submitter
Howard Hinnant

Created on 2009-02-12.00:00:00 last changed 161 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Add to [c.files]:

Table 112 describes header <cinttypes>. [Note: The macros defined by <cintypes> are provided unconditionally. In particular, the symbol __STDC_FORMAT_MACROS (mentioned in C99 footnote 182) plays no role in C++. — end note]

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree with the proposed resolution. Move to Tentatively Ready.

Date: 2009-02-12.00:00:00

The C standard says about <inttypes.h>:

C++ implementations should define these macros only when __STDC_FORMAT_MACROSis defined before <inttypes.h> is included.

The C standard has a similar note about <stdint.h>. For <cstdint> we adopted a "thanks but no thanks" policy and documented that fact in [cstdint.syn]:

... [Note: The macros defined by <stdint> are provided unconditionally. In particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in C99 footnotes 219, 220, and 222) play no role in C++. — end note]

I recommend we put a similar note in [c.files] regarding <cinttypes>.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4684
2010-10-21 18:28:33adminsetmessages: + msg4683
2009-02-12 00:00:00admincreate