[llvm] Fixed build with C++20 standard (PR #169772)
Corentin Jabot via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 04:35:03 PST 2025
================
@@ -267,7 +267,11 @@ class iterator_adaptor_base
return *static_cast<DerivedT *>(this);
}
using BaseT::operator-;
- difference_type operator-(const DerivedT &RHS) const {
+ difference_type operator-(const DerivedT &RHS) const
+#ifdef __cpp_concepts
+ requires(bool(BaseT::IsRandomAccess))
+#endif
+ {
----------------
cor3ntin wrote:
Right, we do not use C++20 features in the llvm code base, so a solution that actually gets compiled by CI is prefered at this point.
https://github.com/llvm/llvm-project/pull/169772
More information about the llvm-commits
mailing list