Simple std::enable_if example

Consider the following function: int negate(int i) { // (1) return -i; } and the following function template: template<class F> typename F::result_type negate(F const& f) { // (2) return -f(); } where F is some function object type (so that a member type F::result_type exists). Let…