Help settle the debate that’s going on in the comments at this question about bool and 1:
Can a standards-conforming C++ preprocessor allow one to use #define to redefine a language keyword? If so, must a standards-conforming C++ preprocessor allow this?
If a C++ program redefines a language keyword, can that program itself be standards conforming?
In C++, the closest thing to forbidding
#defineing a keyword is §17.4.3.1.1/2, which only disallows it in a translation unit that includes a standard library header:The second sentence of that paragraph has been changed in C++0x to outright forbid#defineing a keyword (C++0x FCD §17.6.3.3.1):Edit: As pointed out by Ken Bloom in comments to his answer, the rules have not changed in C++0x; the text has just been rearranged to confuse people like me. 🙂