Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion llvm/include/llvm/ADT/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
static_assert(
BaseT::IsRandomAccess,
"The '-' operator is only defined for random access iterators.");
Expand Down