73 auto size = std::ranges::size(range);
75 auto storage = allocator_traits_type::allocate(allocator_, size);
77 for (
auto ptr = storage, ptr_end = storage + size; ptr < ptr_end; ++ptr) {
78 std::construct_at(ptr);
81 std::shared_ptr<T> buffer{storage, [size, allocator = allocator_](T* inner)
mutable {
82 std::destroy(inner, inner + size);
83 allocator_traits_type::deallocate(allocator, inner, size);
86 std::ranges::copy(range, buffer.get());
89 std::atomic_store_explicit(&buffer_, buffer, std::memory_order::release);