tree.h
template
class binary_operation : public node
{
// ... unimportant details ...
unsigned evaluate() const;
I ask my self, why do you actually write a .cpp file as you have templates and they should go either all in the header file or in a seprarate file e.g ".icc", which holds the stuff from the cpp file. I am not sure but tempalates definitions should always NOT be in a compilation unit.
See -> Storing C++ template function definitions in a .CPP file