Code: Select all
class A {};
A NULL;
void f()
{
throw NULL;
}
Furthermore, the wording of the rationale is slightly incorrect:
To quote ISO C++, 18.1, para. 4, (lib.support.types):throw(NULL) (equivalent to throw(0)) is never a throw of the null-pointer-constant ...
Granted, the referenced `4.10' states a null pointer constant has integer (not pointer) type. However, the macro is a null pointer constant.The macro NULL is an implementation-defined C++ null pointer constant in this International Standard
(4.10).