GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
InplaceBuffer.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Ivar Härnqvist
2// SPDX-License-Identifier: MIT
3
4#ifndef GREM_CORE_DATA_INPLACE_BUFFER_HPP
5#define GREM_CORE_DATA_INPLACE_BUFFER_HPP
6
8
10
11#include <algorithm> // std::rotate, std::equal, std::lexicographical_compare, std::remove, std::remove_if, std::move, std::copy, std::fill_n
12#include <cstddef> // std::size_t, std::ptrdiff_t
13#include <cstdint> // std::uint8_t, std::uint16_t, std::uint32_t, std::uint64_t
14#include <cstring> // std::memcpy
15#include <initializer_list> // std::initializer_list
16#include <iterator> // std::reverse_iterator, std::input_iterator, std::sentinel_for, std::iterator_traits, std::random_access_iterator_tag, std::begin, std::end
17#include <stdexcept> // std::out_of_range, std::length_error
18#include <type_traits> // std::is_..._v, std::conditional_t
19#include <utility> // std::move, std::exchange, std::forward
20
21namespace grem {
22
23template <typename T, std::size_t N>
25private:
26 // clang-format off
27 using Size =
28 std::conditional_t<N <= 255ull, std::uint8_t,
29 std::conditional_t<N <= 65535ull, std::uint16_t,
30 std::conditional_t<N <= 4294967295ull, std::uint32_t,
31 std::uint64_t>>>;
32 // clang-format on
33
34public:
35 using value_type = T;
36 using size_type = std::size_t;
37 using difference_type = std::ptrdiff_t;
41 using const_pointer = const value_type*;
44 using reverse_iterator = std::reverse_iterator<iterator>;
45 using const_reverse_iterator = std::reverse_iterator<const_iterator>;
46
47 constexpr InplaceBuffer() noexcept = default;
48
49 constexpr InplaceBuffer(size_type count, const T& value) {
50 resize(count, value);
51 }
52
53 constexpr explicit InplaceBuffer(size_type count) {
55 }
56
57 template <std::input_iterator InputIterator, std::sentinel_for<InputIterator> Sentinel>
58 constexpr InplaceBuffer(InputIterator first, Sentinel last) {
59 assign(first, last);
60 }
61
62 constexpr InplaceBuffer(std::initializer_list<T> ilist)
63 : InplaceBuffer(ilist.begin(), ilist.end()) {}
64
65 constexpr ~InplaceBuffer() = default;
66
67 constexpr ~InplaceBuffer() requires(!std::is_trivially_destructible_v<T>) {
68 clear();
69 }
70
71 constexpr InplaceBuffer(const InplaceBuffer&) = default;
72
73 constexpr InplaceBuffer(const InplaceBuffer& other) requires(!std::is_trivially_copyable_v<T>)
74 : InplaceBuffer(other.begin(), other.end()) {}
75
76 constexpr InplaceBuffer(InplaceBuffer&&) noexcept = default;
77
78 constexpr InplaceBuffer(InplaceBuffer&& other) noexcept(
79 std::is_nothrow_move_constructible_v<T>) // NOLINT(performance-noexcept-move-constructor, cppcoreguidelines-noexcept-move-operations)
80 requires(!std::is_trivially_copyable_v<T>) {
81 *this = std::move(other);
82 }
83
84 constexpr InplaceBuffer& operator=(const InplaceBuffer&) = default;
85
86 constexpr InplaceBuffer& operator=(const InplaceBuffer& other) requires(!std::is_trivially_copyable_v<T>) {
87 if (this == &other) {
88 return *this;
89 }
90 assign(other.begin(), other.end());
91 return *this;
92 }
93
94 constexpr InplaceBuffer& operator=(InplaceBuffer&&) noexcept = default;
95
96 constexpr InplaceBuffer& operator=(InplaceBuffer&& other) noexcept(
97 std::is_nothrow_move_constructible_v<T> && // NOLINT(performance-noexcept-move-constructor, cppcoreguidelines-noexcept-move-operations)
98 std::is_nothrow_move_assignable_v<T>) requires(!std::is_trivially_copyable_v<T>) {
99 if (this == &other) {
100 return *this;
101 }
102 if (size() == other.size()) {
103 std::move(other.begin(), other.end(), begin());
104 other.clear();
105 return *this;
106 }
107 clear();
108 std::move(other.begin(), other.end(), elements);
109 elementCount = std::exchange(other.elementCount, Size{0});
110 return *this;
111 }
112
113 constexpr InplaceBuffer& operator=(std::initializer_list<T> ilist) {
114 assign(ilist);
115 return *this;
116 }
117
118 constexpr void assign(size_type count, const T& value) {
119 if constexpr (std::is_copy_assignable_v<T>) {
120 if (count < size()) {
121 elementCount = static_cast<Size>(count);
122 }
123 std::fill_n(begin(), size(), value);
124 } else {
125 clear();
126 }
127 for (size_type index = size(); index < count; ++index) {
128 push_back(value);
129 }
130 }
131
132 template <std::input_iterator InputIterator, std::sentinel_for<InputIterator> Sentinel>
133 constexpr void assign(InputIterator first, Sentinel last) {
134 if constexpr (std::is_convertible_v<typename std::iterator_traits<InputIterator>::iterator_category, std::random_access_iterator_tag>) {
135 const size_type count = static_cast<size_type>(last - first);
136 if constexpr (std::is_copy_assignable_v<T>) {
137 if (count < size()) {
138 elementCount = static_cast<Size>(count);
139 }
140 for (size_type index = 0; index < size(); ++index) {
141#if defined(__GNUC__) && !defined(__clang__)
142#pragma GCC diagnostic push
143#pragma GCC diagnostic ignored "-Wstringop-overflow"
144#endif
145 elements[index] = *first++;
146#if defined(__GNUC__) && !defined(__clang__)
147#pragma GCC diagnostic pop
148#endif
149 }
150 } else {
151 clear();
152 }
153 insert(end(), first, last);
154 } else {
155 clear();
156 insert(end(), first, last);
157 }
158 }
159
160 constexpr void assign(std::initializer_list<T> ilist) {
161 assign(ilist.begin(), ilist.end());
162 }
163
164 template <typename R>
165 constexpr void assign_range(R&& r) { // NOLINT(cppcoreguidelines-missing-std-forward)
166 assign(std::begin(r), std::end(r));
167 }
168
169 [[nodiscard]] constexpr reference at(size_type pos) {
170 if (pos >= size()) {
171 throw std::out_of_range{"pos >= size()"};
172 }
173 return elements[pos];
174 }
175
176 [[nodiscard]] constexpr const_reference at(size_type pos) const {
177 if (pos >= size()) {
178 throw std::out_of_range{"pos >= size()"};
179 }
180 return elements[pos];
181 }
182
183 [[nodiscard]] constexpr reference operator[](size_type pos) {
184 GREM_ASSERT(pos < size());
185 return elements[pos];
186 }
187
188 [[nodiscard]] constexpr const_reference operator[](size_type pos) const {
189 GREM_ASSERT(pos < size());
190 return elements[pos];
191 }
192
193 [[nodiscard]] constexpr reference front() {
194 GREM_ASSERT(!empty());
195 return elements[0];
196 }
197
198 [[nodiscard]] constexpr const_reference front() const {
199 GREM_ASSERT(!empty());
200 return elements[0];
201 }
202
203 [[nodiscard]] constexpr reference back() {
204 GREM_ASSERT(!empty());
205 return elements[size() - 1];
206 }
207
208 [[nodiscard]] constexpr const_reference back() const {
209 GREM_ASSERT(!empty());
210 return elements[size() - 1];
211 }
212
213 [[nodiscard]] constexpr pointer data() noexcept {
214 return elements;
215 }
216
217 [[nodiscard]] constexpr const_pointer data() const noexcept {
218 return elements;
219 }
220
221 [[nodiscard]] constexpr iterator begin() noexcept {
222 return elements;
223 }
224
225 [[nodiscard]] constexpr const_iterator begin() const noexcept {
226 return elements;
227 }
228
229 [[nodiscard]] constexpr const_iterator cbegin() const noexcept {
230 return begin();
231 }
232
233 [[nodiscard]] constexpr iterator end() noexcept {
234 return elements + size();
235 }
236
237 [[nodiscard]] constexpr const_iterator end() const noexcept {
238 return elements + size();
239 }
240
241 [[nodiscard]] constexpr const_iterator cend() const noexcept {
242 return end();
243 }
244
245 [[nodiscard]] constexpr reverse_iterator rbegin() noexcept {
246 return reverse_iterator{end()};
247 }
248
249 [[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept {
250 return const_reverse_iterator{end()};
251 }
252
253 [[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept {
255 }
256
257 [[nodiscard]] constexpr reverse_iterator rend() noexcept {
258 return reverse_iterator{begin()};
259 }
260
261 [[nodiscard]] constexpr const_reverse_iterator rend() const noexcept {
263 }
264
265 [[nodiscard]] constexpr const_reverse_iterator crend() const noexcept {
267 }
268
269 [[nodiscard]] constexpr bool empty() const noexcept {
270 return size() == 0;
271 }
272
273 [[nodiscard]] constexpr size_type size() const noexcept {
274 return static_cast<size_type>(elementCount);
275 }
276
277 [[nodiscard]] constexpr size_type max_size() const noexcept {
278 return N;
279 }
280
281 [[nodiscard]] constexpr size_type capacity() const noexcept {
282 return N;
283 }
284
285 constexpr void clear() noexcept {
286 elementCount = 0;
287 }
288
289 constexpr iterator insert(const_iterator pos, const T& value) {
290 const difference_type offset = pos - cbegin();
291 push_back(value);
292 const iterator it = begin() + offset;
293 std::rotate(it, end() - 1, end());
294 return it;
295 }
296
297 constexpr iterator insert(const_iterator pos, T&& value) {
298 const difference_type offset = pos - cbegin();
299 push_back(std::move(value));
300 const iterator it = begin() + offset;
301 std::rotate(it, end() - 1, end());
302 return it;
303 }
304
305 constexpr iterator insert(const_iterator pos, size_type count, const T& value) {
306 const difference_type offset = pos - cbegin();
307 if (count > max_size() - size()) {
308 throw std::length_error{"count > max_size() - size()"};
309 }
310 for (size_type i = 0; i < count; ++i) {
311 push_back(value);
312 }
313 const iterator it = begin() + offset;
314 std::rotate(it, end() - static_cast<difference_type>(count), end());
315 return it;
316 }
317
318 template <std::input_iterator InputIterator, std::sentinel_for<InputIterator> Sentinel>
319 constexpr iterator insert(const_iterator pos, InputIterator first, Sentinel last) {
320 const difference_type offset = pos - cbegin();
321 copyAppend(first, last);
322 const size_type count = size() - static_cast<size_type>(offset);
323 const iterator it = begin() + offset;
324 std::rotate(it, end() - static_cast<difference_type>(count), end());
325 return it;
326 }
327
328 constexpr iterator insert(const_iterator pos, std::initializer_list<T> ilist) {
329 return insert(pos, ilist.begin(), ilist.end());
330 }
331
332 template <typename R>
333 constexpr iterator insert_range(const_iterator pos, R&& r) { // NOLINT(cppcoreguidelines-missing-std-forward)
334 return insert(pos, std::begin(r), std::end(r));
335 }
336
337 template <typename R>
338 constexpr void append_range(R&& r) {
339 insert_range(end(), std::forward<R>(r));
340 }
341
343 const difference_type offset = pos - cbegin();
345 const iterator it = begin() + offset;
346 std::rotate(it, end() - 1, end());
347 return it;
348 }
349
351 const difference_type offset = pos - cbegin();
352 if (count > max_size() - size()) {
353 throw std::length_error{"count > max_size() - size()"};
354 }
355 elementCount = static_cast<Size>(size() + count);
356 const iterator it = begin() + offset;
357 std::rotate(it, end() - static_cast<difference_type>(count), end());
358 return it;
359 }
360
362 GREM_ASSERT(!empty());
363 const difference_type offset = pos - cbegin();
364 const iterator it = begin() + offset;
365 std::rotate(it, it + 1, end());
366 --elementCount;
367 return it;
368 }
369
371 const difference_type offset = first - cbegin();
372 const difference_type count = last - first;
373 GREM_ASSERT(offset <= static_cast<difference_type>(size()));
374 GREM_ASSERT(count >= 0);
375 GREM_ASSERT(offset + count <= static_cast<difference_type>(size()));
376 const iterator it = begin() + offset;
377 std::rotate(it, it + count, end());
378 elementCount -= count;
379 return it;
380 }
381
382 constexpr reference push_back_and_overwrite(auto overwrite) {
383 if (size() >= max_size()) {
384 throw std::length_error{"size() >= max_size()"};
385 }
386 T& result = elements[elementCount];
387 overwrite(result);
388 ++elementCount;
389 return result;
390 }
391
393 return push_back_and_overwrite([](T&) -> void {});
394 }
395
396 constexpr void push_back(const T& value) {
397 push_back_and_overwrite([&](T& storage) { storage = value; });
398 }
399
400 constexpr void push_back(T&& value) {
401 push_back_and_overwrite([&](T& storage) { storage = std::move(value); });
402 }
403
404 constexpr void pop_back() {
405 GREM_ASSERT(!empty());
406 --elementCount;
407 }
408
409 constexpr void resize(size_type count) {
410 if (count > max_size()) {
411 throw std::length_error{"count > max_size()"};
412 }
413 elementCount = static_cast<Size>(count);
414 }
415
416 constexpr void resize(size_type count, const value_type& value) {
417 if (count > size()) {
418 if (count > max_size()) {
419 throw std::length_error{"count > max_size()"};
420 }
421 std::fill_n(elements + size(), count - size(), value);
422 }
423 elementCount = static_cast<Size>(count);
424 }
425
426 constexpr void resize_and_overwrite_added_values(size_type count, auto overwrite) {
427 if (count > size()) {
428 if (count > max_size()) {
429 throw std::length_error{"count > max_size()"};
430 }
431 for (Size i = elementCount; i < count; ++i) {
432 overwrite(elements[i]);
433 }
434 }
435 elementCount = static_cast<Size>(count);
436 }
437
438 constexpr void swap(InplaceBuffer& other) noexcept(std::is_nothrow_move_constructible_v<T>) { // NOLINT(cppcoreguidelines-noexcept-swap, performance-noexcept-swap)
439 if (this == &other) {
440 return;
441 }
442 InplaceBuffer temporary = std::move(*this);
443 *this = std::move(other);
444 other = std::move(temporary);
445 }
446
447 [[nodiscard]] constexpr bool operator==(const InplaceBuffer& other) const {
448 return std::equal(begin(), end(), other.begin(), other.end());
449 }
450
451 [[nodiscard]] constexpr bool operator<(const InplaceBuffer& other) const {
452 return std::lexicographical_compare(begin(), end(), other.begin(), other.end());
453 }
454
455 [[nodiscard]] constexpr bool operator<=(const InplaceBuffer& other) const {
456 return !(other < *this);
457 }
458
459 [[nodiscard]] constexpr bool operator>(const InplaceBuffer& other) const {
460 return other < *this;
461 }
462
463 [[nodiscard]] constexpr bool operator>=(const InplaceBuffer& other) const {
464 return !(*this < other);
465 }
466
467 friend constexpr void swap(InplaceBuffer& a, InplaceBuffer& b) noexcept(noexcept(a.swap(b))) { // NOLINT(cppcoreguidelines-noexcept-swap, performance-noexcept-swap)
468 a.swap(b);
469 }
470
471 template <typename U>
472 friend constexpr size_type erase(InplaceBuffer& c, const U& value) {
473 const iterator it = std::remove(c.begin(), c.end(), value);
474 const size_type result = static_cast<size_type>(c.end() - it);
475 c.erase(it, c.end());
476 return result;
477 }
478
479 template <typename Predicate>
480 friend constexpr size_type erase_if(InplaceBuffer& c, Predicate predicate) {
481 const iterator it = std::remove_if(c.begin(), c.end(), predicate);
482 const size_type result = static_cast<size_type>(c.end() - it);
483 c.erase(it, c.end());
484 return result;
485 }
486
487private:
488 template <typename InputIterator, typename Sentinel>
489 void copyAppend(InputIterator first, Sentinel last) {
490 if constexpr (
491 std::is_convertible_v<typename std::iterator_traits<InputIterator>::iterator_category, std::random_access_iterator_tag> && std::is_nothrow_copy_assignable_v<T>) {
492 const size_type count = static_cast<size_type>(last - first);
493 if (count == 0) {
494 return;
495 }
496 const size_type offset = size();
497 if (count > max_size() - offset) {
498 throw std::length_error{"count > max_size() - size()"};
499 }
500 const size_type newSize = offset + count;
501 if constexpr (std::is_trivially_copyable_v<T> && requires { std::to_address(first); }) {
502 std::memcpy(data() + offset, std::to_address(first), count * sizeof(T));
503 } else {
504 std::copy(first, last, data() + offset);
505 }
506 elementCount = static_cast<Size>(newSize);
507 } else {
508 while (first != last) {
509 push_back(*first++);
510 }
511 }
512 }
513
514 Size elementCount = 0;
515 T elements[N];
516};
517
518} // namespace grem
519
520#endif
#define GREM_ASSERT(expression)
Definition assertions.hpp:77
constexpr void clear() noexcept
Definition InplaceBuffer.hpp:285
const_pointer const_iterator
Definition InplaceBuffer.hpp:43
constexpr void append_range(R &&r)
Definition InplaceBuffer.hpp:338
constexpr InplaceBuffer & operator=(const InplaceBuffer &)=default
friend constexpr size_type erase(InplaceBuffer &c, const U &value)
Definition InplaceBuffer.hpp:472
constexpr void push_back(T &&value)
Definition InplaceBuffer.hpp:400
std::ptrdiff_t difference_type
Definition InplaceBuffer.hpp:37
constexpr const_reverse_iterator crend() const noexcept
Definition InplaceBuffer.hpp:265
std::size_t size_type
Definition InplaceBuffer.hpp:36
constexpr size_type capacity() const noexcept
Definition InplaceBuffer.hpp:281
constexpr InplaceBuffer & operator=(InplaceBuffer &&) noexcept=default
constexpr InplaceBuffer(size_type count)
Definition InplaceBuffer.hpp:53
constexpr const_iterator cbegin() const noexcept
Definition InplaceBuffer.hpp:229
constexpr size_type max_size() const noexcept
Definition InplaceBuffer.hpp:277
constexpr void resize_and_overwrite_added_values(size_type count, auto overwrite)
Definition InplaceBuffer.hpp:426
T value_type
Definition InplaceBuffer.hpp:35
constexpr iterator end() noexcept
Definition InplaceBuffer.hpp:233
constexpr pointer data() noexcept
Definition InplaceBuffer.hpp:213
constexpr iterator insert(const_iterator pos, T &&value)
Definition InplaceBuffer.hpp:297
constexpr void swap(InplaceBuffer &other) noexcept(std::is_nothrow_move_constructible_v< T >)
Definition InplaceBuffer.hpp:438
pointer iterator
Definition InplaceBuffer.hpp:42
constexpr iterator insert(const_iterator pos, InputIterator first, Sentinel last)
Definition InplaceBuffer.hpp:319
constexpr const_reverse_iterator crbegin() const noexcept
Definition InplaceBuffer.hpp:253
constexpr InplaceBuffer(const InplaceBuffer &)=default
const value_type & const_reference
Definition InplaceBuffer.hpp:39
constexpr bool operator<=(const InplaceBuffer &other) const
Definition InplaceBuffer.hpp:455
constexpr const_iterator begin() const noexcept
Definition InplaceBuffer.hpp:225
constexpr reference push_back_and_overwrite(auto overwrite)
Definition InplaceBuffer.hpp:382
friend constexpr void swap(InplaceBuffer &a, InplaceBuffer &b) noexcept(noexcept(a.swap(b)))
Definition InplaceBuffer.hpp:467
constexpr void pop_back()
Definition InplaceBuffer.hpp:404
constexpr reference operator[](size_type pos)
Definition InplaceBuffer.hpp:183
constexpr const_iterator cend() const noexcept
Definition InplaceBuffer.hpp:241
constexpr InplaceBuffer(const InplaceBuffer &other)
Definition InplaceBuffer.hpp:73
constexpr bool operator>=(const InplaceBuffer &other) const
Definition InplaceBuffer.hpp:463
constexpr InplaceBuffer & operator=(const InplaceBuffer &other)
Definition InplaceBuffer.hpp:86
constexpr const_reference operator[](size_type pos) const
Definition InplaceBuffer.hpp:188
constexpr iterator erase(const_iterator first, const_iterator last)
Definition InplaceBuffer.hpp:370
constexpr InplaceBuffer(InputIterator first, Sentinel last)
Definition InplaceBuffer.hpp:58
constexpr void push_back(const T &value)
Definition InplaceBuffer.hpp:396
constexpr void assign(size_type count, const T &value)
Definition InplaceBuffer.hpp:118
constexpr const_reverse_iterator rbegin() const noexcept
Definition InplaceBuffer.hpp:249
value_type & reference
Definition InplaceBuffer.hpp:38
constexpr const_reference back() const
Definition InplaceBuffer.hpp:208
constexpr const_reference front() const
Definition InplaceBuffer.hpp:198
constexpr ~InplaceBuffer()
Definition InplaceBuffer.hpp:67
constexpr size_type size() const noexcept
Definition InplaceBuffer.hpp:273
constexpr bool operator>(const InplaceBuffer &other) const
Definition InplaceBuffer.hpp:459
constexpr iterator insert_unspecified_value(const_iterator pos)
Definition InplaceBuffer.hpp:342
constexpr iterator insert_range(const_iterator pos, R &&r)
Definition InplaceBuffer.hpp:333
constexpr reference front()
Definition InplaceBuffer.hpp:193
constexpr void resize(size_type count)
Definition InplaceBuffer.hpp:409
constexpr iterator erase(const_iterator pos)
Definition InplaceBuffer.hpp:361
constexpr InplaceBuffer(InplaceBuffer &&) noexcept=default
constexpr iterator begin() noexcept
Definition InplaceBuffer.hpp:221
constexpr const_iterator end() const noexcept
Definition InplaceBuffer.hpp:237
constexpr bool operator<(const InplaceBuffer &other) const
Definition InplaceBuffer.hpp:451
constexpr reverse_iterator rbegin() noexcept
Definition InplaceBuffer.hpp:245
constexpr InplaceBuffer & operator=(std::initializer_list< T > ilist)
Definition InplaceBuffer.hpp:113
constexpr void resize(size_type count, const value_type &value)
Definition InplaceBuffer.hpp:416
constexpr const_reverse_iterator rend() const noexcept
Definition InplaceBuffer.hpp:261
constexpr void assign(std::initializer_list< T > ilist)
Definition InplaceBuffer.hpp:160
constexpr reference back()
Definition InplaceBuffer.hpp:203
constexpr ~InplaceBuffer()=default
constexpr const_reference at(size_type pos) const
Definition InplaceBuffer.hpp:176
constexpr reverse_iterator rend() noexcept
Definition InplaceBuffer.hpp:257
friend constexpr size_type erase_if(InplaceBuffer &c, Predicate predicate)
Definition InplaceBuffer.hpp:480
constexpr InplaceBuffer() noexcept=default
constexpr const_pointer data() const noexcept
Definition InplaceBuffer.hpp:217
constexpr reference push_back_unspecified_value()
Definition InplaceBuffer.hpp:392
constexpr iterator insert(const_iterator pos, const T &value)
Definition InplaceBuffer.hpp:289
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition InplaceBuffer.hpp:45
constexpr iterator insert(const_iterator pos, size_type count, const T &value)
Definition InplaceBuffer.hpp:305
const value_type * const_pointer
Definition InplaceBuffer.hpp:41
constexpr void assign(InputIterator first, Sentinel last)
Definition InplaceBuffer.hpp:133
constexpr InplaceBuffer(std::initializer_list< T > ilist)
Definition InplaceBuffer.hpp:62
constexpr void assign_range(R &&r)
Definition InplaceBuffer.hpp:165
constexpr iterator insert(const_iterator pos, std::initializer_list< T > ilist)
Definition InplaceBuffer.hpp:328
constexpr reference at(size_type pos)
Definition InplaceBuffer.hpp:169
std::reverse_iterator< iterator > reverse_iterator
Definition InplaceBuffer.hpp:44
constexpr bool operator==(const InplaceBuffer &other) const
Definition InplaceBuffer.hpp:447
constexpr bool empty() const noexcept
Definition InplaceBuffer.hpp:269
constexpr iterator insert_unspecified_value(const_iterator pos, size_type count)
Definition InplaceBuffer.hpp:350
Definition concepts.hpp:106
@ N
'n'
Definition keyboard.hpp:84
@ T
't'
Definition keyboard.hpp:90
Definition aliases.hpp:9
constexpr auto count(input_range auto &&range, const auto &value)
Definition algorithms.hpp:234