[libcxx-commits] [libcxx] [libc++] [ranges] implement `ranges::chunk_view` for `forward_range` (PR #85741)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 18 23:32:26 PDT 2024
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 bda05140fb758156ae35f3919e6283d94bfa3905 7a38a42d7954be707562a7aa4a8915ea6b6cd980 -- libcxx/include/__ranges/chunk_view.h libcxx/include/ranges
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__ranges/chunk_view.h b/libcxx/include/__ranges/chunk_view.h
index e3ffdd3762..11e369db92 100644
--- a/libcxx/include/__ranges/chunk_view.h
+++ b/libcxx/include/__ranges/chunk_view.h
@@ -324,17 +324,16 @@ namespace views {
namespace __chunk {
struct __fn {
template <class _Range, convertible_to<range_difference_t<_Range>> _Np>
- _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto
- operator()(_Range&& __range,
- _Np&& __n) const noexcept(noexcept(chunk_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
- -> decltype(chunk_view(std::forward<_Range>(__range), std::forward<_Np>(__n))) {
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Np&& __n) const
+ noexcept(noexcept(chunk_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
+ -> decltype(chunk_view(std::forward<_Range>(__range), std::forward<_Np>(__n))) {
return chunk_view(std::forward<_Range>(__range), std::forward<_Np>(__n));
}
template <class _Np>
requires constructible_from<decay_t<_Np>, _Np>
- _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto
- operator()(_Np&& __n) const noexcept(is_nothrow_constructible_v<decay_t<_Np>, _Np>) {
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Np&& __n) const
+ noexcept(is_nothrow_constructible_v<decay_t<_Np>, _Np>) {
return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Np>(__n)));
}
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/85741
More information about the libcxx-commits
mailing list