On Feb 25, 3:36 am, luigi.balla...@[EMAIL PROTECTED]
wrote:
> On Feb 22, 3:29 pm, Amal <amal.paramb...@[EMAIL PROTECTED]
> wrote:
>
> > Getting the address of a pure virtual function is valid in all
> > cases. Whenever the address of a virtual/pure virtual function is
> > taken the vtable is referred and correct address is retrieved. Hence
> > it is always valid what you have done and it must be compatible across
> > any c++ compilers.
>
> Thank you. May anybody point me to where this is stated in the
> standard?
I doubt that anyone will be able to provide such a citation - because
nowhere in the C++ Standard is there any language that states that a
member pointer to a pure virtual method is OK. But - and more
im****tantly - nowhere in the C++ Standard is there any language that
states that a member pointer to a pure virtual method is not OK.
The C++ Standard would have to prohibit member pointers to pure
virtual methods explicitly (just as the Standard does, for example,
with member pointers to static member functions) in order to make such
member pointers illegal. Otherwise, in the absence of any language to
that effect, member pointers to pure virtual methods must be legal -
and must behave no differently than any other kind of member pointer.
Greg
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]