[libcxx-commits] [libcxx] [libc++][ranges] Implement LWG4053 'Unary call to std::views::repeat does not decay the argument' (PR #88612)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 13 02:56:11 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 d488b2225d484027eb2c21a06d27decf008e878b 4f1a78bf028bf20345bd3d7c238dd522b1505241 -- libcxx/include/__ranges/repeat_view.h libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp b/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
index 9077f9a0c6..703ea9d705 100644
--- a/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.repeat.view/views_repeat.pass.cpp
@@ -63,10 +63,10 @@ static_assert(std::is_invocable_v<decltype(std::views::repeat), MoveOnly>);
// LWG4053: Unary call to std::views::repeat does not decay the argument
using RPV = std::ranges::repeat_view<const char*>;
-static_assert(std::same_as<decltype(std::views::repeat("foo", std::unreachable_sentinel)), RPV>); // OK
+static_assert(std::same_as<decltype(std::views::repeat("foo", std::unreachable_sentinel)), RPV>); // OK
static_assert(std::same_as<decltype(std::views::repeat(+"foo", std::unreachable_sentinel)), RPV>); // OK
-static_assert(std::same_as<decltype(std::views::repeat("foo")), RPV>); // OK since LWG4053
-static_assert(std::same_as<decltype(std::views::repeat(+"foo")), RPV>); // OK
+static_assert(std::same_as<decltype(std::views::repeat("foo")), RPV>); // OK since LWG4053
+static_assert(std::same_as<decltype(std::views::repeat(+"foo")), RPV>); // OK
constexpr bool test() {
assert(*std::views::repeat(33).begin() == 33);
``````````
</details>
https://github.com/llvm/llvm-project/pull/88612
More information about the libcxx-commits
mailing list