summaryrefslogtreecommitdiff
path: root/include/o3tl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-29 11:15:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-29 11:15:11 +0200
commitd01810b745fad6afce8be838657471c297da6d53 (patch)
treeb26ef2f6a5ebcf49e80d3f7919ba02f2e6d1219f /include/o3tl
parent73faf2c068b793dd05ddc66b562e8ac27b2745cd (diff)
enumarray_iterator should not have a deleted copy assignment op
Change-Id: I1e5f8dcfe0801eca10622eefab43b674b6b3e956
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/enumarray.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx
index 355e674a5e77..648ea656d43d 100644
--- a/include/o3tl/enumarray.hxx
+++ b/include/o3tl/enumarray.hxx
@@ -79,7 +79,7 @@ public:
template<typename EA>
class enumarray_iterator {
- EA &m_buf;
+ EA *m_buf;
size_t m_pos;
public:
typedef enumarray_iterator<EA> self_type;
@@ -91,12 +91,12 @@ public:
typedef typename EA::value_type& reference;
enumarray_iterator(EA& b, size_t start_pos)
- : m_buf(b), m_pos(start_pos) {}
- value_type &operator*() { return m_buf[static_cast<key_type>(m_pos)]; }
+ : m_buf(&b), m_pos(start_pos) {}
+ value_type &operator*() { return (*m_buf)[static_cast<key_type>(m_pos)]; }
value_type *operator->() { return &(operator*()); }
self_type &operator++() { ++m_pos; return *this; }
- bool operator!=(const self_type& other) { return &m_buf != &other.m_buf || m_pos != other.m_pos; }
- bool operator==(const self_type& other) { return &m_buf == &other.m_buf && m_pos == other.m_pos; }
+ bool operator!=(const self_type& other) { return m_buf != other.m_buf || m_pos != other.m_pos; }
+ bool operator==(const self_type& other) { return m_buf == other.m_buf && m_pos == other.m_pos; }
};
}; // namespace o3tl