[all-commits] [llvm/llvm-project] 869133: [libc++] `views::split` and `views::lazy_split` sh...
Stephan T. Lavavej via All-commits
all-commits at lists.llvm.org
Wed Dec 13 02:37:19 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 869133771af2762a7835c5691063f81675cd0ece
https://github.com/llvm/llvm-project/commit/869133771af2762a7835c5691063f81675cd0ece
Author: Stephan T. Lavavej <stl at nuwen.net>
Date: 2023-12-13 (Wed, 13 Dec 2023)
Changed paths:
M libcxx/include/__ranges/lazy_split_view.h
M libcxx/include/__ranges/split_view.h
M libcxx/test/std/ranges/range.adaptors/range.lazy.split/adaptor.pass.cpp
M libcxx/test/std/ranges/range.adaptors/range.split/adaptor.pass.cpp
Log Message:
-----------
[libc++] `views::split` and `views::lazy_split` shouldn't be range adaptor closures (#75266)
Fixes #75002. Found while running libc++'s tests with MSVC's STL.
This is a superset of #74961 that also fixes the product code
and adds a regression test. Thanks again, @cpplearner!
To summarize: `views::split` and `views::lazy_split` aren't unary,
aren't range adaptor **closure** objects, and can't be piped. However,
\[range.adaptor.object\]/8 says that `views::split(pattern)` and
`views::lazy_split(pattern)` produce unary, pipeable, range adaptor
closure objects.
This PR adjusts the test coverage accordingly, allowing it to portably
pass for libc++ and MSVC's STL.
More information about the All-commits
mailing list