1 #include <cmath> 2 3 template <typename T> foo(T a)4 T foo(T a) { 5 return std::copysign(a, static_cast<T>(-1.0)); 6 } 7