#include #include // handle mixed type operations by selecting a "winning" type to promote to // By default this should be symmetric. template struct promote : public promote { }; template struct promote { typedef T result_type; }; template <> struct promote{ typedef double result_type; }; // get result type from a templated binary functor with one template parameter. template