diff options
author | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2020-12-18 15:11:51 -0500 |
---|---|---|
committer | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2021-01-12 14:18:24 -0500 |
commit | eef4bdbb34de2dda657668c2ab39397e61e36a0a (patch) | |
tree | 44d5392014114fa5d33ed385531ef9a18637e250 /libcxx | |
parent | 08d4a50467ecef1337f8d7d9763c7738861bd6f6 (diff) | |
download | llvm-eef4bdbb34de2dda657668c2ab39397e61e36a0a.zip llvm-eef4bdbb34de2dda657668c2ab39397e61e36a0a.tar.gz llvm-eef4bdbb34de2dda657668c2ab39397e61e36a0a.tar.bz2 |
[libc++] Add a missing `<_Compare>` template argument.
Sometimes `_Compare` is an lvalue reference type, so letting it be
deduced is pretty much always wrong. (Well, less efficient than
it could be, anyway.)
Differential Revision: https://reviews.llvm.org/D93562
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/include/algorithm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 7a4cc39..fe9caf4 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -4483,7 +4483,7 @@ __buffered_inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator value_type* __p = __buff; for (_BidirectionalIterator __i = __first; __i != __middle; __d.template __incr<value_type>(), (void) ++__i, (void) ++__p) ::new ((void*)__p) value_type(_VSTD::move(*__i)); - _VSTD::__half_inplace_merge(__buff, __p, __middle, __last, __first, __comp); + _VSTD::__half_inplace_merge<_Compare>(__buff, __p, __middle, __last, __first, __comp); } else { @@ -4492,9 +4492,10 @@ __buffered_inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator ::new ((void*)__p) value_type(_VSTD::move(*__i)); typedef reverse_iterator<_BidirectionalIterator> _RBi; typedef reverse_iterator<value_type*> _Rv; - _VSTD::__half_inplace_merge(_Rv(__p), _Rv(__buff), + typedef __invert<_Compare> _Inverted; + _VSTD::__half_inplace_merge<_Inverted>(_Rv(__p), _Rv(__buff), _RBi(__middle), _RBi(__first), - _RBi(__last), _VSTD::__invert<_Compare>(__comp)); + _RBi(__last), _Inverted(__comp)); } } |