Expression templates

// Delegation to the actual expression type. This avoids dynamic polymorphism (a.k.a. virtual functions in C++)// A Vec can be constructed from any VecExpression, forcing its evaluation.

with no temporary vectors needed and only one pass through each memory block.

// Following assignment will call the ctor of Vec which accept type of // Observe that in this case typeid(sum) will be VecSum<VecSum<Vec, Vec>, Vec>