aboutsummaryrefslogtreecommitdiff
path: root/libc/src
diff options
context:
space:
mode:
authorPiJoules <6019989+PiJoules@users.noreply.github.com>2024-06-25 16:33:36 -0700
committerGitHub <noreply@github.com>2024-06-25 16:33:36 -0700
commit54ca5a800d12bf76dabc957163df02c3ea005627 (patch)
tree56bbb01a38ed402c4234036dc712bcb9c7f3f839 /libc/src
parent0d533665054c3a04681c46f3ed88960f28777be1 (diff)
downloadllvm-54ca5a800d12bf76dabc957163df02c3ea005627.zip
llvm-54ca5a800d12bf76dabc957163df02c3ea005627.tar.gz
llvm-54ca5a800d12bf76dabc957163df02c3ea005627.tar.bz2
[libc][fixedvector] Add const_iterator begin/end (#96714)
Diffstat (limited to 'libc/src')
-rw-r--r--libc/src/__support/fixedvector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/src/__support/fixedvector.h b/libc/src/__support/fixedvector.h
index 403b162..5161c0d 100644
--- a/libc/src/__support/fixedvector.h
+++ b/libc/src/__support/fixedvector.h
@@ -90,6 +90,11 @@ public:
LIBC_INLINE constexpr iterator begin() { return store.begin(); }
LIBC_INLINE constexpr iterator end() { return iterator{&store[item_count]}; }
+
+ LIBC_INLINE constexpr const_iterator begin() const { return store.begin(); }
+ LIBC_INLINE constexpr const_iterator end() const {
+ return const_iterator{&store[item_count]};
+ }
};
} // namespace LIBC_NAMESPACE