Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 4609526

Browse files
committed
mpsc_queue: mark const methods as const
1 parent 2543afa commit 4609526

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/libpmemobj++/experimental/mpsc_queue.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class mpsc_queue {
5858

5959
iterator &operator++();
6060

61-
bool operator==(const iterator &rhs);
62-
bool operator!=(const iterator &rhs);
61+
bool operator==(const iterator &rhs) const;
62+
bool operator!=(const iterator &rhs) const;
6363

6464
pmem::obj::string_view operator*() const;
6565

@@ -97,8 +97,8 @@ class mpsc_queue {
9797
public:
9898
batch_type(iterator begin, iterator end);
9999

100-
iterator begin();
101-
iterator end();
100+
iterator begin() const;
101+
iterator end() const;
102102

103103
private:
104104
iterator begin_;
@@ -591,13 +591,13 @@ inline mpsc_queue::batch_type::batch_type(iterator begin_, iterator end_)
591591
}
592592

593593
inline mpsc_queue::iterator
594-
mpsc_queue::batch_type::begin()
594+
mpsc_queue::batch_type::begin() const
595595
{
596596
return begin_;
597597
}
598598

599599
inline mpsc_queue::iterator
600-
mpsc_queue::batch_type::end()
600+
mpsc_queue::batch_type::end() const
601601
{
602602
return end_;
603603
}
@@ -652,13 +652,13 @@ mpsc_queue::iterator::operator++()
652652
}
653653

654654
bool
655-
mpsc_queue::iterator::operator==(const mpsc_queue::iterator &rhs)
655+
mpsc_queue::iterator::operator==(const mpsc_queue::iterator &rhs) const
656656
{
657657
return data == rhs.data;
658658
}
659659

660660
bool
661-
mpsc_queue::iterator::operator!=(const mpsc_queue::iterator &rhs)
661+
mpsc_queue::iterator::operator!=(const mpsc_queue::iterator &rhs) const
662662
{
663663
return data != rhs.data;
664664
}

0 commit comments

Comments
 (0)