Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276751 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/algorithm b/include/algorithm
index 25e95ac..cf03d66 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -2431,7 +2431,7 @@
 template<typename _Integral>
 inline _LIBCPP_INLINE_VISIBILITY
 _Integral
-__gcd(_Integral __x, _Integral __y)
+__algo_gcd(_Integral __x, _Integral __y)
 {
     do
     {
@@ -2456,7 +2456,7 @@
         _VSTD::swap_ranges(__first, __middle, __middle);
         return __middle;
     }
-    const difference_type __g = _VSTD::__gcd(__m1, __m2);
+    const difference_type __g = _VSTD::__algo_gcd(__m1, __m2);
     for (_RandomAccessIterator __p = __first + __g; __p != __first;)
     {
         value_type __t(_VSTD::move(*--__p));