Skip to content

Conversation

@Thoemi09
Copy link
Contributor

  • use std::random_access_iterator_tag in const_iterator
  • add missing operations
    • --it, it--, it += n, it + n, n + it, it -= n, it - n, it1 - it2, it[n]
  • add missing comparisons
    • it1 < it2, it1 <= it2, it1 > it2, it1 >= it2
  • add reverse iterator
  • fix end iterator to have position first() + size() * step() instead of last()

- use std::random_access_iterator_tag in const_iterator
- add missing operations
  - --it, it--, it += n, it + n, n + it, it -= n, it - n, it1 - it2, it[n]
- add missing comparisons
  - it1 < it2, it1 <= it2, it1 > it2, it1 >= it2
- add reverse iterator
- fix end iterator to have position first() + size() * step() instead of last()
@Thoemi09 Thoemi09 force-pushed the DEV_RANDOM_ACCESS_RANGE branch from 796f596 to 4b5726e Compare April 11, 2025 18:06
Copy link
Member

@Wentzell Wentzell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you @Thoemi09 for this improvement!

@Wentzell Wentzell merged commit 913f1ef into TRIQS:unstable Apr 15, 2025
4 checks passed
@Thoemi09 Thoemi09 deleted the DEV_RANDOM_ACCESS_RANGE branch April 16, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants