Rather impressive. I opened expression.hpp, and could have sworn I was looking at an STL implementation.

Out of curiosity, have you considered storing the expression as a tree (binary functions get two child nodes, unary functions get one, etc)? To me, that seems like a more natural way to represent an expression.

Anyways, very nice.

Cheers