C++ won't allow me to construct an object of type SymIntPoly and call f() on it. Below are the classes and the structure.
template<typename T>
struct SymPoly
{
T f() { retu this->x; }
};
struct IntPoly
{
int x;
virtual int f() = 0;
};
struct SymIntPoly : public IntPoly, public SymPoly<int>
{
};
I do not know about compilers, but I feel that the compiler does not treat the two functions as the same functions (ie. they do not have the same inteal signature?)
The use case is that SymPoly
