J
Jakob Bieling
Hi,
Please have a look at the following snippet:
class test_i
{
public:
virtual int myfunc () = 0;
};
template <class T>
class extra_class
{
public:
void test (int i) {}
};
template <class i, template <class> class e>
class base : public i,
public e <i>
{
};
class test_class : public base <test_i, extra_class>
{
public:
void test () {}
int myfunc ()
{
test (1);
}
};
The problem I have is, that 'test_class' actually contains the function
'test(int)' by the way it is deriving, but it gets hidden by the local
definition 'test ()'. I know I can use the 'using' keyword to unhide the
first 'test' function, but I do not know how that would look like. 'using
extra_class <test_i>::test;' does not work for me. I am using VC++ 7.1. Can
I achieve my goal at all?
Thanks in advance!
Please have a look at the following snippet:
class test_i
{
public:
virtual int myfunc () = 0;
};
template <class T>
class extra_class
{
public:
void test (int i) {}
};
template <class i, template <class> class e>
class base : public i,
public e <i>
{
};
class test_class : public base <test_i, extra_class>
{
public:
void test () {}
int myfunc ()
{
test (1);
}
};
The problem I have is, that 'test_class' actually contains the function
'test(int)' by the way it is deriving, but it gets hidden by the local
definition 'test ()'. I know I can use the 'using' keyword to unhide the
first 'test' function, but I do not know how that would look like. 'using
extra_class <test_i>::test;' does not work for me. I am using VC++ 7.1. Can
I achieve my goal at all?
Thanks in advance!