mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-25 22:14:34 +00:00
feat(kernel/std): ✨ add iterator_traits specialization for pointer types
This commit is contained in:
parent
7873d0e724
commit
d7abd36717
@ -18,6 +18,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
#include <cstddef>
|
||||
|
||||
namespace std
|
||||
{
|
||||
@ -56,6 +57,18 @@ namespace std
|
||||
using iterator_category = typename Iter::iterator_category;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct iterator_traits<T *>
|
||||
{
|
||||
public:
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using value_type = std::remove_cv_t<T>;
|
||||
using pointer = T *;
|
||||
using reference = T &;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
using iterator_concept = std::contiguous_iterator_tag;
|
||||
};
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class It>
|
||||
|
Loading…
x
Reference in New Issue
Block a user