refactor(*): use CAllocatableObject instead of CElementalObject
This commit is contained in:
@ -17,7 +17,7 @@ NAMESPACE_MODULE_BEGIN(Redcraft)
|
||||
NAMESPACE_MODULE_BEGIN(Utility)
|
||||
|
||||
/** Dynamic array. The elements are stored contiguously, which means that elements can be accessed not only through iterators, but also using offsets to regular pointers to elements. */
|
||||
template <CElementalObject T, CAllocator<T> Allocator = FHeapAllocator> requires (!CConst<T>)
|
||||
template <CAllocatableObject T, CAllocator<T> Allocator = FHeapAllocator>
|
||||
class TArray final
|
||||
{
|
||||
private:
|
||||
|
@ -14,10 +14,10 @@ NAMESPACE_REDCRAFT_BEGIN
|
||||
NAMESPACE_MODULE_BEGIN(Redcraft)
|
||||
NAMESPACE_MODULE_BEGIN(Utility)
|
||||
|
||||
template <CElementalObject T, size_t N>
|
||||
template <CObject T, size_t N>
|
||||
struct TStaticArray;
|
||||
|
||||
template <CElementalObject T, CAllocator<T> A> requires (!CConst<T>)
|
||||
template <CAllocatableObject T, CAllocator<T> A>
|
||||
class TArray;
|
||||
|
||||
inline constexpr size_t DynamicExtent = INDEX_NONE;
|
||||
@ -27,7 +27,7 @@ inline constexpr size_t DynamicExtent = INDEX_NONE;
|
||||
* the sequence at position zero. A TArrayView can either have a static extent, in which case the number of elements in the sequence
|
||||
* is known at compile-time and encoded in the type, or a dynamic extent.
|
||||
*/
|
||||
template <CElementalObject T, size_t InExtent = DynamicExtent>
|
||||
template <CObject T, size_t InExtent = DynamicExtent>
|
||||
class TArrayView final
|
||||
{
|
||||
public:
|
||||
|
@ -14,9 +14,6 @@ NAMESPACE_REDCRAFT_BEGIN
|
||||
NAMESPACE_MODULE_BEGIN(Redcraft)
|
||||
NAMESPACE_MODULE_BEGIN(Utility)
|
||||
|
||||
template <typename T>
|
||||
concept CElementalObject = CObject<T> && CDestructible<T>;
|
||||
|
||||
NAMESPACE_PRIVATE_BEGIN
|
||||
|
||||
template <typename T> using WithReference = T&;
|
||||
|
@ -17,7 +17,7 @@ NAMESPACE_MODULE_BEGIN(Redcraft)
|
||||
NAMESPACE_MODULE_BEGIN(Utility)
|
||||
|
||||
/** TStaticArray is a container that encapsulates fixed size arrays. */
|
||||
template <CElementalObject T, size_t N>
|
||||
template <CObject T, size_t N>
|
||||
struct TStaticArray final
|
||||
{
|
||||
private:
|
||||
|
Reference in New Issue
Block a user