summaryrefslogtreecommitdiffstats
path: root/libcxx/include/algorithm
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-07-26 14:29:45 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-07-26 14:29:45 +0000
commit19b4035f29bafe7d5ddd07e10d15faae05f0e0f5 (patch)
tree57640a0bf3eac97c38bd589f5ad4a46037a59e1f /libcxx/include/algorithm
parentab581e79aa3ee4cdbcb30b9c5a76ff4e40281365 (diff)
downloadbcm5719-llvm-19b4035f29bafe7d5ddd07e10d15faae05f0e0f5.tar.gz
bcm5719-llvm-19b4035f29bafe7d5ddd07e10d15faae05f0e0f5.zip
Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.
llvm-svn: 276751
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm4
1 files changed, 2 insertions, 2 deletions
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<typename _Integral>
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));
OpenPOWER on IntegriCloud