libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::PoolIndexQueue Concept Reference

可作为对象池空闲索引队列的类型约束。 More...

#include <object_pool.hpp>

Concept definition

template<typename QueueType>
requires(QueueType queue, const typename QueueType::ValueType& index_const,
typename QueueType::ValueType& index_mut) {
typename QueueType::ValueType;
{ queue.Push(index_const) } -> std::same_as<ErrorCode>;
{ queue.Pop(index_mut) } -> std::same_as<ErrorCode>;
{ queue.Size() } -> std::convertible_to<size_t>;
}
可作为对象池空闲索引队列的类型约束。

Detailed Description

可作为对象池空闲索引队列的类型约束。

Type constraint for free-index queues used by object pools.

该约束只要求队列提供最小的强类型接口:

  • ValueType
  • Push(const ValueType&)
  • Pop(ValueType&)
  • Size()

This constraint requires only the minimal typed queue interface:

  • ValueType
  • Push(const ValueType&)
  • Pop(ValueType&)
  • Size()

Definition at line 32 of file object_pool.hpp.