llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.87k stars 11.92k forks source link

[libc++] Use a __bounded_iter flavor in std::array #70864

Open ldionne opened 1 year ago

ldionne commented 1 year ago

Just like we do for std::string_view and std::span. But we can hardcode the size information in the iterator type, leading to 2 pointers instead of needing 3 pointers like __bounded_iter.

philnik777 commented 1 year ago

We could also make it a single pointer and a counter. That would allow us to have a smaller fancy pointer or even bit-pack the count into the lower bits for small N.

ldionne commented 9 months ago

For information this will be blocked on https://github.com/llvm/llvm-project/pull/74482.