Skip to content
Permalink
Browse files

Fix compile error when using std::sort with Visual Studio 16.5.0

  • Loading branch information
dpjudas committed Mar 18, 2020
1 parent d32e0b9 commit d19527cf87d1caa58a23ae2b9b6d1e9030c989a5
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/utility/tarray.h
@@ -94,6 +94,10 @@ template<typename T> class TIterator : public std::iterator<std::random_access_i
TIterator operator-(difference_type offset) const { return TIterator(m_ptr - offset); }
difference_type operator-(const TIterator &other) const { return m_ptr - other.m_ptr; }

// Random access operators
T& operator[](difference_type i) { return m_ptr[i]; }
const T& operator[](difference_type i) const { return m_ptr[i]; }

T &operator*() { return *m_ptr; }
const T &operator*() const { return *m_ptr; }
T* operator->() { return m_ptr; }

0 comments on commit d19527c

Please sign in to comment.
You can’t perform that action at this time.