[libcxx-commits] [PATCH] D124079: [libc++] Implement ranges::find_end, ranges::search{, _n}

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 19 01:33:10 PDT 2022


huixie90 added inline comments.


================
Comment at: libcxx/include/__algorithm/iterator_operations.h:29
+  static constexpr auto next = ranges::next;
+  static constexpr auto __advance_to = ranges::advance;
 };
----------------
question: why do we need another alias for `ranges::advance`? we could have another overload for classic one with the same name


================
Comment at: libcxx/include/__algorithm/search_n.h:166
+                          _BinaryPredicate __pred) {
+  static_assert(__is_callable<_BinaryPredicate, decltype(*__first), decltype(*__last)>::value,
+                "BinaryPredicate has to be callable");
----------------
re @bgraur's bug report. this line should be 
```
static_assert(__is_callable<_BinaryPredicate, decltype(*__first),  const _Tp&>::value, "BinaryPredicate has to be callable");
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124079/new/

https://reviews.llvm.org/D124079



More information about the libcxx-commits mailing list