martinmoene / ring-span-lite

ring-span lite - A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library
Boost Software License 1.0
154 stars 12 forks source link

Iterator additions to match concept std::random_access_iterator #31

Closed Crzyrndm closed 1 year ago

Crzyrndm commented 1 year ago

Fixes #30

C++20 concept std::random_access_iterator requires that the iterator is indexable and that addition is commutative. These requirements are not currently met in master

Godbolt showing that the example used in the issue compiles when built from the fork

martinmoene commented 1 year ago

Thank you, @Crzyrndm