Skip to content

Commit dd03a9b

Browse files
committed
Make OperandValueArrayRef::iterator a forward iterator to appease std::any_of gods.
1 parent 35acc0f commit dd03a9b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/swift/SIL/SILValue.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,11 @@ class OperandValueArrayRef {
301301
: Operands(operands) {}
302302

303303
/// A simple iterator adapter.
304-
class iterator {
304+
class iterator : public std::iterator<std::forward_iterator_tag,
305+
SILValue, ptrdiff_t> {
305306
const Operand *Ptr;
306307
public:
308+
iterator() = default;
307309
iterator(const Operand *ptr) : Ptr(ptr) {}
308310
SILValue operator*() const { assert(Ptr); return Ptr->get(); }
309311
SILValue operator->() const { return operator*(); }

0 commit comments

Comments
 (0)