non member bool operator
This commit is contained in:
parent
4eef7bfc01
commit
6c0bb23ed6
@ -131,21 +131,18 @@ public:
|
||||
const T *operator->() const {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
//SHOULDDO this should be implemented as non-member
|
||||
bool operator==(const typename
|
||||
ArrayList<T, count_t>::Iterator& other) const {
|
||||
return (value == other.value);
|
||||
}
|
||||
|
||||
//SHOULDDO this should be implemented as non-member
|
||||
bool operator!=(const typename
|
||||
ArrayList<T, count_t>::Iterator& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
};
|
||||
|
||||
friend bool operator==(const ArrayList::Iterator& lhs,
|
||||
const ArrayList::Iterator& rhs) {
|
||||
return (lhs.value == rhs.value);
|
||||
}
|
||||
|
||||
friend bool operator!=(const ArrayList::Iterator& lhs,
|
||||
const ArrayList::Iterator& rhs) {
|
||||
return not (lhs.value == rhs.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterator pointing to the first stored elmement
|
||||
*
|
||||
@ -251,4 +248,6 @@ protected:
|
||||
bool allocated;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* FSFW_CONTAINER_ARRAYLIST_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user