Listing 5: Using the template-based implementation for evaluating (x+2)*3

void someFunction (double x) 
{
  cout 
  << makeProd(makeSum(Variable(x),Literal(2)),Literal(3)).eval() 
  << endl;
}
— End of Listing —