Joaqu�n Cuenca Abela wrote:

> #define DELETEP(ptr) \
> do {} while(sizeof(*ptr) == 0); \
> delete ptr; \
> ptr = NULL;
>
> to prevent trying to delete a type not yet known to the compiler,
> because the standard doesn't forces a compiler to issue a warning in
> this case, and the result is undefined (the compiler can not known if
> the type has a trivial destructor).

???

How would the compiler allow deletion of an incomplete type that it
therefore obviously has no accessible destructor for? IMO a reasonable
compiler should issue diagnostics, and AFAIK any compiler would have to
abort translation.

/Mike - please don't cc

Reply via email to