There's no way that will work. The size of Function depends on the size of Expression. The size of an objects is the sum of the sizes of its members, which means that the size of Expression in turn depends on the size of Function.
The only way to resolve the circular dependency is to make Expression::f a Function *.
Still, that will not compile until you forward-declare Function before defining Expression: class Function;
To have a `Function` object in `Expression` you must have the complete definition of `Function`,
That is not possible because `Function` needs a complete definition of `Expression` as it derives from it.
You can have a pointer to `Function` if you forward declare that class