Aj writes:

> I am pretty sure that what "delete" does when given an array is
> implementation dependent.

Indeed.  "behavior is undefined" is standardese for saying:

(a) Compiler implementor, you may compile such code into whatever you
    wish - let it crash, or assume that 2==3, or make it the syntax for
    some extension of yours, or whatever.

(b) Programmer, don't write code which does this.  At least not if you
    want your program to be portable.  And even if it happens to work in
    some program with some compiler, don't assume it always will even on
    that compiler, unless its documentation explicitly says so.

> That is why I asked this question in a g++ forum.

Because you want your code to only work with g++?

-- 
Hallvard
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to