Skip to content

Commit

Permalink
[libc++] Fix build issues with find
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdaybird committed Jul 25, 2024
1 parent d3da2a7 commit a997ee5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/find.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ __find_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
// do first partial word
if (__first.__ctz_ != 0) {
__storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
__storage_type __dn = std::min(__clz_f, __n);
__storage_type __dn = (__clz_f < __n) ? __clz_f : __n;
__storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
__storage_type __b = std::__invert_if<!_ToFind>(*__first.__seg_) & __m;
if (__b)
Expand Down
3 changes: 2 additions & 1 deletion libcxx/include/__algorithm/min_element.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <__algorithm/comp.h>
#include <__algorithm/comp_ref_type.h>
#include <__algorithm/find.h>
#include <__algorithm/iterator_operations.h>
#include <__config>
#include <__functional/identity.h>
Expand Down Expand Up @@ -83,7 +84,7 @@ __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
__block_end = __last;
}

return find(__block_start, __block_end, __min_val);
return std::__find(__block_start, __block_end, __min_val, __proj);
}

template <class _Comp, class _Iter, class _Sent>
Expand Down

0 comments on commit a997ee5

Please sign in to comment.