V
Vikas
Hi y'all,
Is it possible to have polymorphic type for pointer to data members?
I am trying to implement a functionality where various heterogenous
pointers to data members are stored in a containter.
Following example illustrates my question.
class foo
{
int a;
double b;
...
}
Now I can do something like the following:
vector<int foo::*> vector_containing_ptr_to_int_data_member_of_foo
I want to have a container with multiple types
vector<T foo::*> vector_containing_heterogenous_ptr_to_data_member_of_foo
(T is for any type)
Is it possible?
Thanks, Vikas
Is it possible to have polymorphic type for pointer to data members?
I am trying to implement a functionality where various heterogenous
pointers to data members are stored in a containter.
Following example illustrates my question.
class foo
{
int a;
double b;
...
}
Now I can do something like the following:
vector<int foo::*> vector_containing_ptr_to_int_data_member_of_foo
I want to have a container with multiple types
vector<T foo::*> vector_containing_heterogenous_ptr_to_data_member_of_foo
(T is for any type)
Is it possible?
Thanks, Vikas