 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
jmueto Guest
|
Posted: Fri Dec 17, 2004 4:09 pm Post subject: Re: Is using ... with virtual functions legal? |
|
|
Reed Hedges wrote:
| Quote: | I have a virtual method which uses ... for variable arguments, but
compiling with GCC 3.2 produces this error:
localsite.cc:684: generic thunk code fails for method `virtual
VOS::MetaObject*
VOS::LocalSite::createMetaObject(const char*, const char*, ...)'
which uses
`...'
The code compiles and works fine with GCC 2.95.
|
if you have a virtual function with an open parameter list (...)
you must not derive virtual.
(just solved the same problem)
Jmueto
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
richard@ex-parrot.com Guest
|
Posted: Fri Dec 17, 2004 7:10 pm Post subject: Re: Is using ... with virtual functions legal? |
|
|
jmueto wrote:
| Quote: | Reed Hedges wrote:
I have a virtual method which uses ... for variable arguments, but
compiling with GCC 3.2 produces this error:
localsite.cc:684: generic thunk code fails for method `virtual
VOS::MetaObject*
VOS::LocalSite::createMetaObject(const char*, const char*, ...)'
which uses
`...'
The code compiles and works fine with GCC 2.95.
if you have a virtual function with an open parameter list (...)
you must not derive virtual.
(just solved the same problem)
|
Not true. Virtual functions are allowed to be variadic. The following
example is perfectly legal.
class C {
virtual void f(...) = 0;
};
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|