On Mon, 27 Jan 2003 18:40:02 +0100, Gennaro Prota <[EMAIL PROTECTED]> wrote:
>On Mon, 27 Jan 2003 13:25:52 +0200, "Peter Dimov" <[EMAIL PROTECTED]> >wrote: > >>However, there is a difference. Whether p->f() invokes undefined behavior is >>determined by the value of p (i.e., at runtime.) Whether passing x to an >>ellipsis invokes undefined behavior is determined by the type of x (i.e. at >>compile time.) > >Right. But whether passing happens or not depends on what you mean by >"passing". If the meaning is just that you wrote a function call >expression where the argument x corresponds to the ellipsis, then yes > > if (...) > f(x); > >you have passed x here BTW, if you just look at the function call expression, i.e. if you forget about execution semantics, then you can only see the _static_ type of the argument expression. So you would conclude that this is well-defined: struct A {}; struct B : A { B() {} private: B(const B&) {} }; void variadic(...); void f(A* p) { variadic (*p); } int main() { B b; f(&b); } because the static type of the expression *p is A, which is a POD. Genny. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost