Is it legal to redefine a C++ keyword?

17.4.3.1.1 Macro names [lib.macro.names]

1 Each name defined as a macro in a header is reserved to the implementation for any use if the translation unit includes the header.164)
2 A translation unit that includes a header shall not contain any macros that define names declared or defined in that header. Nor shall such a translation unit define macros for names lexically identical to keywords.

By the way, new is an operator and it can be overloaded (replaced) by the user by providing its own version.

Leave a Comment