[libcxx-commits] [libcxx] [libc++] `std::views::split`: fix handling of empty ranges (LWG4017) (PR #87916)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 7 07:41:17 PDT 2024
Jan =?utf-8?q?Kokemüller?= <jan.kokemueller at gmail.com>,
Jan =?utf-8?q?Kokemüller?= <jan.kokemueller at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/87916 at github.com>
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 869797daca38941e0af3bcd8ae5300bcebf7b1a9 a18c790eb3879a84ce7b4b321687c5b2d1c03ceb -- libcxx/include/__ranges/lazy_split_view.h libcxx/include/__ranges/split_view.h libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent_base.pass.cpp libcxx/test/std/ranges/range.adaptors/range.lazy.split/view_interface.pass.cpp libcxx/test/std/ranges/range.adaptors/range.split/general.pass.cpp libcxx/test/std/ranges/range.adaptors/range.split/iterator/base.pass.cpp libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.base.pass.cpp libcxx/test/std/ranges/range.adaptors/range.split/iterator/deref.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.base.pass.cpp
index 19d534706c..ec84f3a510 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.split/iterator/ctor.base.pass.cpp
@@ -36,7 +36,9 @@ constexpr bool test() {
using SplitIter = std::ranges::iterator_t<SplitView>;
SplitView sv{TracedMoveView{}, TracedMoveView{}};
- SplitIter iter = {sv, sv.base().begin(), std::make_optional(std::ranges::subrange<TracedMoveIter>{sv.base().begin(), sv.base().end()})};
+ SplitIter iter = {sv,
+ sv.base().begin(),
+ std::make_optional(std::ranges::subrange<TracedMoveIter>{sv.base().begin(), sv.base().end()})};
assert(iter.base().moved);
auto subRange = *iter;
``````````
</details>
https://github.com/llvm/llvm-project/pull/87916
More information about the libcxx-commits
mailing list