File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
include/beman/inplace_vector Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ struct inplace_vector_type_based_storage {
6969 inplace_vector_array_type<T, Capacity> elems{};
7070
7171 constexpr T *begin () { return elems.data (); }
72+ constexpr const T *begin () const { return elems.data (); }
7273};
7374
7475// byte array based storage is used for non-constexpr environment, where default
@@ -80,6 +81,9 @@ struct inplace_vector_bytes_based_storage {
8081 alignas (T) inplace_vector_array_type<std::byte, Capacity * sizeof (T)> elems;
8182
8283 T *begin () { return std::launder (reinterpret_cast <const T *>(elems)); }
84+ const T *begin () const {
85+ return std::launder (reinterpret_cast <const T *>(elems));
86+ }
8387};
8488
8589// Base class for inplace_vector
You can’t perform that action at this time.
0 commit comments