Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #5282

Re: v-table index

From Vaclav Haisman <v.haisman@sh.cvut.cz>
Newsgroups comp.lang.c++
Subject Re: v-table index
Date 2011-05-21 20:13 +0200
Organization Czech Technical University
Message-ID <4DD800D8.6000600@sh.cvut.cz> (permalink)
References <c40b4b96-12ab-4ca2-8300-94448f3936fb@gu8g2000vbb.googlegroups.com>

Show all headers | View raw


Alexander Zezulinsky wrote, On 21.5.2011 19:24:
> Hi, everyone
> 
> I can operate with pointer-to-member functions.
> How can I get virtual member function index from v-table?
> I would like to iterate v-table and to execute virtual method by v-
> table index.
> 
> Is it possible?
It is not. Instead, gather the member function pointers into your own array
and index into such array, if you really need to. Alternativelly, rethink
your design so that you do not need such thing at all.

> 
> CODE:
>[...]

-- 
VH

Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

v-table index Alexander Zezulinsky <palgold88@gmail.com> - 2011-05-21 10:24 -0700
  Re: v-table index Vaclav Haisman <v.haisman@sh.cvut.cz> - 2011-05-21 20:13 +0200

csiph-web