This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 21.4 [cstdint], 99 [tr.c99.cstdint] Status: CD1 Submitter: Walter Brown Opened: 2006-08-28 Last modified: 2017-02-03
Priority: Not Prioritized
View all other issues in [cstdint].
View all issues with CD1 status.
Clause 18.3 of the current Working Paper (N2009) deals with the new C++ headers <cstdint> and <stdint.h>. These are of course based on the C99 header <stdint.h>, and were part of TR1.
Per 18.3.1/1, these headers define a number of macros and function macros. While the WP does not mention __STDC_CONSTANT_MACROS in this context, C99 footnotes do mention __STDC_CONSTANT_MACROS. Further, 18.3.1/2 states that "The header defines all ... macros the same as C99 subclause 7.18."
Therefore, if I wish to have the above-referenced macros and function macros defined, must I #define __STDC_CONSTANT_MACROS before I #include <cstdint>, or does the C++ header define these macros/function macros unconditionally?
To put this issue to rest for C++0X, I propose the following addition to 18.3.1/2 of the Working Paper N2009:
[Note: The macros defined by <cstdint> 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]