You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ADT] Implement EnumeratedArray with std::array (NFC) (#158407)
EnumeratedArray provides an std::array-like interface except that you
access the array with an enum index. Now, the problem is that because
the underlying array is implemented as a C array, we have to mirror
what std::array would do:
iterator end() { return begin() + size(); }
reverse_iterator rbegin() { return reverse_iterator(end()); }
This patch switches to the std::array. This way, we just have to
"forward" calls to begin, end, rbegin, rend, etc. Also, we benefit
from std::array::fill in one of the constructors.
0 commit comments