From 19b4035f29bafe7d5ddd07e10d15faae05f0e0f5 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 26 Jul 2016 14:29:45 +0000 Subject: Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS. llvm-svn: 276751 --- libcxx/include/algorithm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcxx/include/algorithm') diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 25e95ac443a..cf03d66d542 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -2431,7 +2431,7 @@ __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIt template inline _LIBCPP_INLINE_VISIBILITY _Integral -__gcd(_Integral __x, _Integral __y) +__algo_gcd(_Integral __x, _Integral __y) { do { @@ -2456,7 +2456,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran _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)); -- cgit v1.2.3