Fix const_reverse_iterator constructor (pass const ptr)

pull/365/head
Jorge Timón 8 years ago
parent 300851ec16
commit 33aed5bf89
No known key found for this signature in database
GPG Key ID: A4F5D141C01A0387

@ -132,7 +132,7 @@ public:
typedef const T* pointer;
typedef const T& reference;
typedef std::bidirectional_iterator_tag iterator_category;
const_reverse_iterator(T* ptr_) : ptr(ptr_) {}
const_reverse_iterator(const T* ptr_) : ptr(ptr_) {}
const_reverse_iterator(reverse_iterator x) : ptr(&(*x)) {}
const T& operator*() const { return *ptr; }
const T* operator->() const { return ptr; }

Loading…
Cancel
Save