Fix const_reverse_iterator constructor (pass const ptr)

This commit is contained in:
Jorge Timón 2017-06-19 01:45:23 +02:00
parent 300851ec16
commit 33aed5bf89
No known key found for this signature in database
GPG key ID: A4F5D141C01A0387

View file

@ -132,7 +132,7 @@ public:
typedef const T* pointer; typedef const T* pointer;
typedef const T& reference; typedef const T& reference;
typedef std::bidirectional_iterator_tag iterator_category; 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_reverse_iterator(reverse_iterator x) : ptr(&(*x)) {}
const T& operator*() const { return *ptr; } const T& operator*() const { return *ptr; }
const T* operator->() const { return ptr; } const T* operator->() const { return ptr; }