summaryrefslogtreecommitdiffabout
path: root/include/opkele
Side-by-side diff
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/iterator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/opkele/iterator.h b/include/opkele/iterator.h
index 8f86234..94da7e4 100644
--- a/include/opkele/iterator.h
+++ b/include/opkele/iterator.h
@@ -90,33 +90,33 @@ namespace opkele {
virtual void advance() { ++i; }
};
template<typename T,typename TR=T&,typename TP=T*>
class forward_iterator_proxy : public iterator<forward_iterator_tag,T,void,TP,TR> {
public:
basic_forward_iterator_proxy_impl<T,TR,TP> *I;
template<typename IT>
forward_iterator_proxy(const IT& i)
: I(new forward_iterator_proxy_impl<IT>(i)) { }
forward_iterator_proxy(const forward_iterator_proxy<T,TR,TP>& x)
: I(x.I->dup()) { }
~forward_iterator_proxy() { delete I; }
forward_iterator_proxy& operator=(const forward_iterator_proxy<T,TR,TP>& x) {
- delete I; I = x.I->dup(); }
+ delete I; I = x.I->dup(); return *this; }
bool operator==(const forward_iterator_proxy<T,TR,TP>& x) const {
return (*I)==(*(x.I)); }
bool operator!=(const forward_iterator_proxy<T,TR,TP>& x) const {
return (*I)!=(*(x.I)); }
TR operator*() const {
return **I; }
TP operator->() const {
return I->operator->(); }
forward_iterator_proxy<T,TR,TP>& operator++() {
I->advance(); return *this; }
forward_iterator_proxy<T,TR,TP>& operator++(int) {
forward_iterator_proxy<T,TR,TP> rv(*this);
I->advance(); return rv; }