[libcxx-commits] [libcxx] [libc++] Optimize std::find for segmented iterators (PR #67224)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 5 09:27:49 PDT 2023
================
@@ -126,6 +170,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
}
int main(int, char**) {
+ test_deque();
----------------
ldionne wrote:
I would like to have a test for the constexpr-ness of the new code path you are adding. You can either do that by creating your own segmented iterator container that is constexpr-friendly, or by using something like `join_view`, which should satisfy that criteria.
Actually, you should start by writing the test and notice that
```
_InputIterator operator()(_InputIterator __first, _InputIterator __last, _Proj& __proj)
```
is missing `constexpr`, which means that this wouldn't work right now :)
https://github.com/llvm/llvm-project/pull/67224
More information about the libcxx-commits
mailing list