[ox/std] Improve Vector::iterator to better conform to std::vector::iterator
(synced from 68f829ff2d)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user