UWP fixes

This commit is contained in:
Jack Andersen
2017-12-06 18:08:44 -10:00
parent f228f23661
commit 62c2b1ffac
7 changed files with 68 additions and 38 deletions

View File

@@ -9,10 +9,16 @@ namespace boo
/** Linked-list iterator shareable by ListNode types. */
template <class T>
class ListIterator : public std::iterator<std::bidirectional_iterator_tag, T>
class ListIterator
{
T* m_node;
public:
using iterator_category = std::bidirectional_iterator_tag;
using value_type = T;
using difference_type = std::ptrdiff_t;
using pointer = T*;
using reference = T&;
explicit ListIterator(T* node) : m_node(node) {}
T& operator*() const { return *m_node; }
bool operator!=(const ListIterator& other) const { return m_node != other.m_node; }