another childish 'exception' question
if...
int main(void) {
int * p(some_value);
p = new int;
...
return 0;
}
Assume that the 'new' invocation fails generating a 'bad_alloc' exception... is the value of p modified? if so, is the value undefined? My gut feel would be that p is not modified and (p == some_value) still holds true but I'd like some confirmation on this.
The views expressed are those of the author and do not reflect any position taken by the Goverment of the United States of America, National Aeronautics and Space Administration (NASA), Jet Propulsion Laboratory (JPL), or California Institute of Technology (CalTech)