Skip to content

Commit

Permalink
default initialize array
Browse files Browse the repository at this point in the history
  • Loading branch information
wusatosi committed Nov 26, 2024
1 parent 6b75318 commit 8dbc733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/beman/inplace_vector/inplace_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ template <typename T, std::size_t Capacity>
struct inplace_vector_type_based_storage {
using array_type = If<!std::is_const_v<T>, std::array<T, Capacity>,
const std::array<std::remove_const_t<T>, Capacity>>;
array_type elems{};
array_type elems;

constexpr T *begin() { return elems.data(); }
constexpr const T *begin() const { return elems.data(); }
Expand Down

0 comments on commit 8dbc733

Please sign in to comment.