[libcxx-commits] [clang] [clang-tools-extra] [libcxx] [llvm] [libcxx] implement views::concat (PR #120920)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Dec 22 13:33:25 PST 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 c5492e3c65e40cdcab9771b692f9ad437c65aa04 11ec4bc42c734c5f55047d5c5bd5ed9bcd8c6e01 --extensions cpp,h -- libcxx/include/__ranges/concat_view.h libcxx/test/std/ranges/range.adaptors/range.concat/adaptor.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/begin.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/ctad.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/ctor.default.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/ctor.view.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/end.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/iterator/compare.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/iterator/decrement.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/iterator/deref.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/iterator/increment.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/iterator/iter_move.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/iterator/iter_swap.pass.cpp libcxx/test/std/ranges/range.adaptors/range.concat/types.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/include/__ranges/concat_view.h b/libcxx/include/__ranges/concat_view.h
index 9d17aae65e..708917365a 100644
--- a/libcxx/include/__ranges/concat_view.h
+++ b/libcxx/include/__ranges/concat_view.h
@@ -602,9 +602,8 @@ namespace views {
 namespace __concat {
 struct __fn {
   template <class... _Views>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Views... views) const
-      noexcept(noexcept(concat_view(std::forward<_Views>(views)...)))
-          -> decltype(concat_view(std::forward<_Views>(views)...)) {
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Views... views) const noexcept(
+      noexcept(concat_view(std::forward<_Views>(views)...))) -> decltype(concat_view(std::forward<_Views>(views)...)) {
     return concat_view(std::forward<_Views>(views)...);
   }
 };
diff --git a/libcxx/test/std/ranges/range.adaptors/range.concat/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.concat/ctor.default.pass.cpp
index b11a82f537..f758d5a931 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.concat/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.concat/ctor.default.pass.cpp
@@ -54,9 +54,7 @@ constexpr bool test() {
   }
 
   // Check cases where the default constructor isn't provided
-  {
-    static_assert(!std::is_default_constructible_v<std::ranges::concat_view<NoDefaultView >>);
-  }
+  { static_assert(!std::is_default_constructible_v<std::ranges::concat_view<NoDefaultView >>); }
 
   // Check noexcept-ness
   {

``````````

</details>


https://github.com/llvm/llvm-project/pull/120920


More information about the libcxx-commits mailing list