I see this in the standard C++ libraries for my system, as well as some of the headers in a library I’m using.
What are the semantics of these two definitions? Is there a good reference for #defines like this other than the source itself?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
__STDC_LIMIT_MACROSand__STDC_CONSTANT_MACROSare a workaround to allow C++ programs to usestdint.hmacros specified in the C99 standard that aren’t in the C++ standard. The macros, such asUINT8_MAX,INT64_MIN, andINT32_C()may be defined already in C++ applications in other ways. To allow the user to decide if they want the macros defined as C99 does, many implementations require that__STDC_LIMIT_MACROSand__STDC_CONSTANT_MACROSbe defined beforestdint.his included.This isn’t part of the C++ standard, but it has been adopted by more than one implementation.