Skip to content

Commit

Permalink
Fix size type
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKutzner committed Oct 8, 2024
1 parent 9d7762a commit e347c31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/cista/containers/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ struct basic_vector {
return std::rotate(begin() + old_offset, begin() + old_size, end());
}

template <typename El, typename Size = std::size_t>
constexpr T* insert(T* it, Size const count, El const& value) {
template <typename El>
constexpr T* insert(T* it, size_type const count, El const& value) {
auto const old_offset = std::distance(begin(), it);
auto const old_size = used_size_;

reserve(used_size_ + count);
for (auto i = Size{0U}; i < count; ++i) {
for (auto i = size_type{0U}; i < count; ++i) {
new (el_ + used_size_) T{value};
++used_size_;
}
Expand Down

0 comments on commit e347c31

Please sign in to comment.