aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chip.h
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/chip.h')
-rw-r--r--ice40/chip.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/ice40/chip.h b/ice40/chip.h
index 695eea48..dd00c7c8 100644
--- a/ice40/chip.h
+++ b/ice40/chip.h
@@ -276,12 +276,23 @@ struct BelIterator
{
int cursor;
- void operator++() { cursor++; }
+ BelIterator operator++() { cursor++; return *this; }
+ BelIterator operator++(int) {
+ BelIterator prior(*this);
+ cursor++;
+ return prior;
+ }
+
bool operator!=(const BelIterator &other) const
{
return cursor != other.cursor;
}
+ bool operator==(const BelIterator &other) const
+ {
+ return cursor == other.cursor;
+ }
+
BelId operator*() const
{
BelId ret;