You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 18, 2024. It is now read-only.
Mark had mentioned earlier that supporting the memory resources in std::pmr was a hurdle that mdarray needed to get over;std::pmr::polymorphic_allocator follows the same scoped allocator model that is supported by std::scoped_allocator_adaptor and std::uses_allocator. Unless I'm missing something, the main things needed to fully support the scoped allocator model (when container_type::allocator_type exists) are:
Add a constructor to basic_mdarray that allows it to have an allocator passed in that passes the allocator to container_policy::create()
Support T(std::allocator_arg, alloc, size) as a possible container constructor and
Partial specialize std::uses_allocator to be based on basic_mdarray::container_type
I should be able to piece together most of a PR implementing uses allocator construction over the weekend.
Edit: got a bit ahead of myself and forgot that the relevant policy was specifically for vectors; supporting uses allocator construction for other containers would be the responsibility of the relevant policy.