Skip to content

Commit

Permalink
Update iterator_category of Vec iterators in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 8, 2025
1 parent c6bb3b9 commit 99b7cb5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions book/src/binding/vec.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ public:
...template <typename T>
...class Vec<T>::iterator final {
...public:
...#if __cplusplus >= 202002L
... using iterator_category = std::contiguous_iterator_tag;
...#else
... using iterator_category = std::random_access_iterator_tag;
...#endif
... using value_type = T;
... using pointer = T *;
... using reference = T &;
Expand Down Expand Up @@ -97,7 +101,11 @@ public:
...template <typename T>
...class Vec<T>::const_iterator final {
...public:
...#if __cplusplus >= 202002L
... using iterator_category = std::contiguous_iterator_tag;
...#else
... using iterator_category = std::random_access_iterator_tag;
...#endif
... using value_type = const T;
... using pointer = const T *;
... using reference = const T &;
Expand Down

0 comments on commit 99b7cb5

Please sign in to comment.