Topic: Defect report: [basic.life]/5: irrelevant example
Author: giecrilj@stegny.2a.pl ("K i tof elechovski")
Date: Mon, 22 Jan 2007 05:24:08 GMT Raw View
B* pb = new (p) D1;
pb->mutate();
&pb; // OK: pb points to valid memory
What is this? Taking an address of the scalar object named pb is always
well-formed; it is irrelevant whether pb points to valid memory.
Besides, this expression, having no effect, cannot cause undefined
behaviour.
Chris
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]