Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit a593599

Browse files
author
Jakob Riedle
committed
JR: Fixed bug in iterator comparisons
1 parent 0e7f7ac commit a593599

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/tinyutf8/tinyutf8.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ namespace tiny_utf8
637637
template<typename Container, bool Raw>
638638
static inline bool operator<( const const_iterator<Container, false>& lhs , const const_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_index() < rhs.get_index(); }
639639
template<typename Container, bool Raw>
640-
static inline bool operator<( const const_reverse_iterator<Container, false>& lhs , const const_reverse_iterator<Container, false>& rhs ) noexcept { return lhs.get_index() > rhs.get_index(); }
640+
static inline bool operator<( const const_reverse_iterator<Container, false>& lhs , const const_reverse_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_index() > rhs.get_index(); }
641641
template<typename Container, bool Raw>
642642
static inline bool operator<=( const const_iterator<Container, false>& lhs , const const_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_index() <= rhs.get_index(); }
643643
template<typename Container, bool Raw>
@@ -650,11 +650,11 @@ namespace tiny_utf8
650650
template<typename Container, bool Raw>
651651
static inline bool operator>=( const const_iterator<Container, true>& lhs , const const_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_raw_index() >= rhs.get_raw_index(); }
652652
template<typename Container, bool Raw>
653-
static inline bool operator>=( const const_reverse_iterator<Container, true>& lhs , const const_reverse_iterator<Container, true>& rhs ) noexcept { return lhs.get_raw_index() <= rhs.get_raw_index(); }
653+
static inline bool operator>=( const const_reverse_iterator<Container, true>& lhs , const const_reverse_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_raw_index() <= rhs.get_raw_index(); }
654654
template<typename Container, bool Raw>
655655
static inline bool operator<( const const_iterator<Container, true>& lhs , const const_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_index() < rhs.get_raw_index(); }
656656
template<typename Container, bool Raw>
657-
static inline bool operator<( const const_reverse_iterator<Container, true>& lhs , const const_reverse_iterator<Container, true>& rhs ) noexcept { return lhs.get_raw_index() > rhs.get_raw_index(); }
657+
static inline bool operator<( const const_reverse_iterator<Container, true>& lhs , const const_reverse_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_raw_index() > rhs.get_raw_index(); }
658658
template<typename Container, bool Raw>
659659
static inline bool operator<=( const const_iterator<Container, true>& lhs , const const_iterator<Container, Raw>& rhs ) noexcept { return lhs.get_index() <= rhs.get_raw_index(); }
660660
template<typename Container, bool Raw>

0 commit comments

Comments
 (0)