On Saturday, January 25, 2003, at 08:39 AM, Peter Dimov wrote:
<shrug> That's the way I read 5.2.2/7. I see little difference between that example and:Furthermore, it is undefined to pass a non-pod to an ellipse (5.2.2/7):
int foo(...);
class B
{
public:
B();
private:
B(const B&);
};
int main()
{
foo(B()); // undefined behavior
}
If you stick that in a sizeof, it is still undefined:
sizeof(foo(B()));
Is it?if(false) foo(B()); Is this undefined too?
class B
{
int foo();
};
int main()
{
B b;
if (false)
b.foo();
}
Except in the latter a diagnostic is required, whereas a diagnostic is not required, only permitted in the former.
I'm open to other interpretations. Note that 1.3.12 defines undefined behavior, and specifically includes a compile time diagnostic and termination of compilation as possible consequences of undefined behavior (i.e. undefined behavior includes compile time behavior, not just run time behavior).
-Howard
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost