[llvm] Fixed build with C++20 standard (PR #169772)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 30 05:59:16 PST 2025


Vedran =?utf-8?q?Mileti=C4=87?= <vedran at miletic.net>,
Vedran =?utf-8?q?Mileti=C4=87?= <vedran at miletic.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/169772 at github.com>


================
@@ -267,6 +267,8 @@ class iterator_adaptor_base
     return *static_cast<DerivedT *>(this);
   }
   using BaseT::operator-;
+  template <bool Enabled = bool(BaseT::IsRandomAccess),
+            std::enable_if_t<Enabled, int> = 0>
----------------
kuhar wrote:

```suggestion
  template <bool Enabled = BaseT::IsRandomAccess,
                     typename = std::enable_if_t<Enabled, int>>
```
I think this is a little bit more idiomatic

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


More information about the llvm-commits mailing list