M
Malay Haldar
I have a function object, from which I derive another function object
in which I overwrite the operator(). But now the operator() in the
base class seems inaccessible. For example, the following code doesn't
compile. Any insights on how to make it work ?
class C{};
struct X
{
void operator()( C const & ){}
};
struct Y : public X
{
void operator()( float ){}
}foo;
int main()
{
C c;
foo(c);
}
in which I overwrite the operator(). But now the operator() in the
base class seems inaccessible. For example, the following code doesn't
compile. Any insights on how to make it work ?
class C{};
struct X
{
void operator()( C const & ){}
};
struct Y : public X
{
void operator()( float ){}
}foo;
int main()
{
C c;
foo(c);
}