Created on 2006-08-28.00:00:00 last changed 171 months ago
Proposed resolution:
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]
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?
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3163 |
2006-08-28 00:00:00 | admin | create |