process: prepare migration to allocator-aware model

This commit is contained in:
Michele Caini
2025-07-23 16:05:13 +02:00
parent fcd265a6ed
commit cbb50c1292
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -273,14 +273,14 @@ struct process_adaptor: public basic_process<Delta> {
/*! @brief Base type. */
using base_type = basic_process<Delta>;
/*! @brief Type used to provide elapsed time. */
using delta_type = typename basic_process<Delta>::delta_type;
using delta_type = typename base_type::delta_type;
/**
* @brief Constructs a process adaptor from a lambda or a functor.
* @param proc Actual process to use under the hood.
*/
process_adaptor(Func proc)
: basic_process<Delta>{},
: base_type{},
func{std::move(proc)} {}
/**
+4 -3
View File
@@ -34,13 +34,14 @@ namespace entt {
*/
template<typename Delta, typename Allocator>
class basic_scheduler {
using base_type = basic_process<Delta>;
using alloc_traits = std::allocator_traits<Allocator>;
using container_allocator = typename alloc_traits::template rebind_alloc<std::shared_ptr<basic_process<Delta>>>;
using container_type = std::vector<std::shared_ptr<basic_process<Delta>>, container_allocator>;
using container_allocator = typename alloc_traits::template rebind_alloc<std::shared_ptr<base_type>>;
using container_type = std::vector<std::shared_ptr<base_type>, container_allocator>;
public:
/*! @brief Process type. */
using type = basic_process<Delta>;
using type = base_type;
/*! @brief Allocator type. */
using allocator_type = Allocator;
/*! @brief Unsigned integer type. */