File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,6 @@ namespace STDEXEC {
7979 struct __any_alloc final : __any_alloc_base {
8080 using value_type = std::allocator_traits<_PAlloc>::value_type;
8181 static_assert (__same_as<value_type, __memblock>);
82- // Number of __memblock-sized chunks we needed store the allocator:
83- static constexpr size_t __alloc_blocks =
84- __task::__divmod (sizeof (__any_alloc<_PAlloc>), sizeof (__memblock));
8582
8683 explicit __any_alloc (_PAlloc __alloc)
8784 : __alloc_(std::move(__alloc)) {
@@ -94,6 +91,9 @@ namespace STDEXEC {
9491 // memory:
9592 size_t const __promise_blocks = __task::__divmod (__bytes, sizeof (__memblock));
9693 void * const __alloc_loc = static_cast <__memblock*>(__ptr) + __promise_blocks;
94+ // the number of blocks needed to store an object of type __palloc_t:
95+ static constexpr size_t __alloc_blocks =
96+ __task::__divmod (sizeof (__task::__any_alloc<_PAlloc>), sizeof (__task::__memblock));
9797
9898 // Quick sanity check to make sure the allocator is where we expect it to be.
9999 STDEXEC_ASSERT (__alloc_loc == static_cast <void *>(this ));
You can’t perform that action at this time.
0 commit comments