47 if(slots > size_ || begin >= size_)
55 std::size_t remainder{};
57 if(begin + slots > size_)
59 remainder = (begin + slots) % size_;
62 for(std::size_t i = begin; i < begin + slots - remainder; ++i)
69 for(std::size_t i = 0; i < remainder; ++i)
79 if(slots > size_ || begin >= size_)
87 std::size_t remainder{};
89 if(begin + slots > size_)
91 remainder = (begin + slots) % size_;
95 for(std::size_t i = begin; i < begin + slots - remainder; ++i)
102 for(std::size_t i = 0; i < remainder; ++i)
113 if(slots > size_ || begin >= size_)
118 std::vector<T> values(slots);
120 if(begin >= slots - 1)
122 std::memcpy(&values[0],&store_[begin - slots + 1],slots *
sizeof(T));
126 std::size_t remainder = slots - begin -1;
128 std::memcpy(&values[0],&store_[size_ - remainder],remainder *
sizeof(T));
130 std::memcpy(&values[remainder],&store_[0],(begin + 1) *
sizeof(T));
140 if(slots > size_ || begin >= size_)
145 if(begin >= slots - 1)
147 std::memset(&store_[begin - slots + 1],0,slots *
sizeof(T));
151 std::size_t remainder = slots - begin -1;
153 std::memset(&store_[size_ - remainder],0,remainder *
sizeof(T));
155 std::memset(&store_[0],0,(begin + 1) *
sizeof(T));
void set(std::size_t begin, std::size_t slots, T value)
std::vector< T > get(std::size_t begin, std::size_t slots)
void add(std::size_t begin, std::size_t slots, T value)
void clear(std::size_t begin, std::size_t slots)
const std::vector< T > & dump() const