Skip to content
Closed
Changes from all commits
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
22 changes: 8 additions & 14 deletions libs/libvtrutil/src/vtr_strong_id_range.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ class StrongIdIterator {
}

///@brief ~ operator
template<typename IdType>
ssize_t operator-(const StrongIdIterator<IdType>& other) const {
ssize_t operator-(const StrongIdIterator<StrongId>& other) const {
VTR_ASSERT_SAFE(bool(id_));
VTR_ASSERT_SAFE(bool(other.id_));

Expand All @@ -107,20 +106,17 @@ class StrongIdIterator {
}

///@brief == operator
template<typename IdType>
bool operator==(const StrongIdIterator<IdType>& other) const {
bool operator==(const StrongIdIterator<StrongId>& other) const {
return id_ == other.id_;
}

///@brief != operator
template<typename IdType>
bool operator!=(const StrongIdIterator<IdType>& other) const {
bool operator!=(const StrongIdIterator<StrongId>& other) const {
return id_ != other.id_;
}

///@brief < operator
template<typename IdType>
bool operator<(const StrongIdIterator<IdType>& other) const {
bool operator<(const StrongIdIterator<StrongId>& other) const {
return id_ < other.id_;
}

Expand All @@ -129,19 +125,17 @@ class StrongIdIterator {
};

///@brief + operator
template<typename IdType>
inline StrongIdIterator<IdType> operator+(
const StrongIdIterator<IdType>& lhs,
inline StrongIdIterator<StrongId> operator+(
const StrongIdIterator<StrongId>& lhs,
ssize_t n) {
StrongIdIterator ret = lhs;
ret += n;
return ret;
}

///@brief - operator
template<typename IdType>
inline StrongIdIterator<IdType> operator-(
const StrongIdIterator<IdType>& lhs,
inline StrongIdIterator<StrongId> operator-(
const StrongIdIterator<StrongId>& lhs,
ssize_t n) {
StrongIdIterator ret = lhs;
ret -= n;
Expand Down
Loading