Skip to content

Commit f859633

Browse files
committed
CircularBuffer changes to make c++20 happy
1 parent 7255181 commit f859633

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎include/circular/circular.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,21 +366,21 @@ class circular_buffer
366366
}
367367
else
368368
{
369-
alloc_.construct(array_ + next, item);
369+
std::allocator_traits<Alloc>::construct(alloc_, array_ + next, item);
370370
}
371371
increment_tail();
372372
}
373373
void pop_front()
374374
{
375375
size_type destroy_pos = head_;
376376
increment_head();
377-
alloc_.destroy(array_ + destroy_pos);
377+
std::allocator_traits<Alloc>::destroy(alloc_, array_ + destroy_pos);
378378
}
379379
void clear()
380380
{
381381
for (size_type n = 0; n < contents_size_; ++n)
382382
{
383-
alloc_.destroy(array_ + index_to_subscript(n));
383+
std::allocator_traits<Alloc>::destroy(alloc_, array_ + index_to_subscript(n));
384384
}
385385
head_ = 1;
386386
tail_ = contents_size_ = 0;

0 commit comments

Comments
 (0)