Make names from the math namespace available locally */
| 4 | |
| 5 | /* Make names from the math namespace available locally */ |
| 6 | auto my_hypot(const auto& x, const auto& y) // Renamed to my_hypot to avoid clashes with hypot() function in <cmath> |
| 7 | { |
| 8 | using namespace math; |
| 9 | // Or: |
| 10 | // using math::square; |
| 11 | // using math::sqrt; /* Same as, of course: using std::sqrt; */ |
| 12 | return sqrt(square(x) + square(y)); |
| 13 | } |
| 14 | |
| 15 | int main() |
| 16 | { |