Skip to content

Commit

Permalink
Fix const_reverse_iterator constructor (pass const ptr)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimon authored and xanimo committed Mar 28, 2024
1 parent f46e01b commit d7f0473
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prevector.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class prevector {
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; }
Expand Down

0 comments on commit d7f0473

Please sign in to comment.