[ox/std] Improve Vector::iterator to better conform to std::vector::iterator

(synced from 68f829ff2d)
This commit is contained in:
2021-07-30 19:36:26 -05:00
parent 943789845d
commit 57fa761252
3 changed files with 46 additions and 6 deletions
+5 -1
View File
@@ -9,6 +9,8 @@
#pragma once
#ifndef OX_USE_STDLIB
#include "types.hpp"
namespace std {
struct input_iterator_tag {
@@ -29,12 +31,14 @@ struct random_access_iterator_tag: public bidirectional_iterator_tag {
struct contiguous_iterator_tag: public random_access_iterator_tag {
};
template<typename Category, typename T>
template<typename Category, typename T, typename DiffType = std::ptrdiff_t,
typename PointerType = T*, typename ReferenceType = T&>
struct iterator {
using iterator_category = Category;
using value_type = T;
using pointer = T*;
using reference = T&;
using difference_type = DiffType;
};
}