template inline void swap(T & a, T & b) { T tmp = a; a = b; b = tmp; } template inline T sum(T a, T b) { return a + b; }