Need for (C++20) Contiguous Range
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Thu Oct 8 13:43:01 UTC 2020
On Thursday, 8 October 2020 at 13:30:30 UTC, Per Nordlöw wrote:
> C++20 defines
>
> - std::ranges::contiguous_range [1] on top of
> - std::random_access_iterator [2]
>
> as specializations of
>
> - std::ranges::random_access_range on top of
> - std::random_access_iterator
>
> . A contiguous ranges has all its elements stored continuously
> (adjacently) in memory.
>
> Does anybody know the application for this concept/predicate?
>
> [1] https://en.cppreference.com/w/cpp/ranges/contiguous_range
> [2]
> https://en.cppreference.com/w/cpp/iterator/contiguous_iterator
Optimizations that require linear memory access, like SIMD. I
believe.
More information about the Digitalmars-d
mailing list