[libcxx-commits] [libcxx] [libcxx] renames local variable to avoid shadowing werror (PR #77672)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 10 12:24:42 PST 2024


================
@@ -71,10 +71,10 @@ constexpr bool test() {
         BufferView<forward_iterator<const Inner*>, sentinel_wrapper<forward_iterator<const Inner*>>,
                    bidirectional_iterator<Inner*>, sentinel_wrapper<bidirectional_iterator<Inner*>>>;
     using JoinView = std::ranges::join_view<ConstInconvertibleOuter>;
-    using sentinel = std::ranges::sentinel_t<JoinView>;
+    using sentinel_t     = std::ranges::sentinel_t<JoinView>;
     using const_sentinel = std::ranges::sentinel_t<const JoinView>;
-    static_assert(!std::constructible_from<sentinel, const_sentinel>);
-    static_assert(!std::constructible_from<const_sentinel, sentinel>);
+    static_assert(!std::constructible_from<sentinel_t, const_sentinel>);
+    static_assert(!std::constructible_from<const_sentinel, sentinel_t>);
----------------
AdvenamTacet wrote:

```suggestion
    static_assert(!std::constructible_from<sentinel_t, const_sentinel_t>);
    static_assert(!std::constructible_from<const_sentinel_t, sentinel_t>);
```

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


More information about the libcxx-commits mailing list