A
Alvaro Segura
Hello,
I have this doubt that I find no answer for:
Can an object or a reference to an object be passed as an argument to a
variable length arguments function? And if so, how does it work?
// suppose we have:
void f(int x, ...);
class A {};
// and we do:
A a;
f(3, a); // is this OK?
I recently found that MSVC++ was not complaining when I accidentally did
something like that, but I thought it was wrong. What about the standard?
I have this doubt that I find no answer for:
Can an object or a reference to an object be passed as an argument to a
variable length arguments function? And if so, how does it work?
// suppose we have:
void f(int x, ...);
class A {};
// and we do:
A a;
f(3, a); // is this OK?
I recently found that MSVC++ was not complaining when I accidentally did
something like that, but I thought it was wrong. What about the standard?