Skip to content

Commit cc4cf4d

Browse files
authored
Make IteratorLoop methods noexcept
1 parent e38fd0d commit cc4cf4d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

iter/__private/iterator_loop.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ class IteratorLoop final {
2424
using Item = typename std::remove_reference_t<Iterator>::Item;
2525

2626
public:
27-
IteratorLoop(Iterator iter)
27+
IteratorLoop(Iterator iter) noexcept
2828
: iter_(static_cast<Iterator&&>(iter)), item_(iter_.next()) {}
2929

30-
inline bool operator==(const __private::IteratorEnd&) const {
30+
inline bool operator==(const __private::IteratorEnd&) const noexcept {
3131
return item_.is_nome();
3232
}
33-
inline bool operator!=(const __private::IteratorEnd&) const {
33+
inline bool operator!=(const __private::IteratorEnd&) const noexcept {
3434
return item_.is_some();
3535
}
36-
inline void operator++() & { item_ = iter_.next(); }
37-
inline Item operator*() & { return item_.take().unwrap(); }
36+
inline void operator++() & noexcept { item_ = iter_.next(); }
37+
inline Item operator*() & noexcept { return item_.take().unwrap(); }
3838

3939
private:
4040
/* TODO: NonNull<IteratorBase<Item>> */ Iterator iter_;

0 commit comments

Comments
 (0)