refactor(containers): remove the container's final qualifier allows it to be inherited

This commit is contained in:
Redstone1024 2024-11-02 20:49:48 +08:00
parent 475b9e1958
commit 243076cfec
8 changed files with 8 additions and 8 deletions

View File

@ -18,7 +18,7 @@ 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. */ /** 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 <CAllocatableObject T, CAllocator<T> Allocator = FHeapAllocator> template <CAllocatableObject T, CAllocator<T> Allocator = FHeapAllocator>
class TArray final class TArray
{ {
private: private:

View File

@ -25,7 +25,7 @@ inline constexpr size_t DynamicExtent = INDEX_NONE;
* is known at compile-time and encoded in the type, or a dynamic extent. * is known at compile-time and encoded in the type, or a dynamic extent.
*/ */
template <CObject T, size_t InExtent = DynamicExtent> template <CObject T, size_t InExtent = DynamicExtent>
class TArrayView final class TArrayView
{ {
public: public:

View File

@ -21,7 +21,7 @@ template <CUnsignedIntegral InBlockType> requires (!CSameAs<InBlockType, bool>)
using TDefaultBitsetAllocator = TInlineAllocator<(40 - 3 * sizeof(size_t)) / sizeof(InBlockType)>; using TDefaultBitsetAllocator = TInlineAllocator<(40 - 3 * sizeof(size_t)) / sizeof(InBlockType)>;
template <CUnsignedIntegral InBlockType, CAllocator<InBlockType> Allocator = TDefaultBitsetAllocator<InBlockType>> requires (!CSameAs<InBlockType, bool>) template <CUnsignedIntegral InBlockType, CAllocator<InBlockType> Allocator = TDefaultBitsetAllocator<InBlockType>> requires (!CSameAs<InBlockType, bool>)
class TBitset final class TBitset
{ {
private: private:

View File

@ -17,7 +17,7 @@ NAMESPACE_MODULE_BEGIN(Redcraft)
NAMESPACE_MODULE_BEGIN(Utility) NAMESPACE_MODULE_BEGIN(Utility)
template <CAllocatableObject T, CMultipleAllocator<T> Allocator = FHeapAllocator> template <CAllocatableObject T, CMultipleAllocator<T> Allocator = FHeapAllocator>
class TList final class TList
{ {
private: private:

View File

@ -16,7 +16,7 @@ NAMESPACE_MODULE_BEGIN(Utility)
/** TStaticArray is a container that encapsulates fixed size arrays. */ /** TStaticArray is a container that encapsulates fixed size arrays. */
template <CObject T, size_t N> template <CObject T, size_t N>
struct TStaticArray final struct TStaticArray
{ {
private: private:

View File

@ -28,7 +28,7 @@ NAMESPACE_PRIVATE_END
#if 1 #if 1
template <size_t N, CUnsignedIntegral InBlockType = NAMESPACE_PRIVATE::TDefaultBitsetBlockType<N>> requires (!CSameAs<InBlockType, bool>) template <size_t N, CUnsignedIntegral InBlockType = NAMESPACE_PRIVATE::TDefaultBitsetBlockType<N>> requires (!CSameAs<InBlockType, bool>)
class TStaticBitset final class TStaticBitset
{ {
private: private:

View File

@ -721,7 +721,7 @@ public:
private: private:
NAMESPACE_PRIVATE::TUniqueStorage<T, E> Storage; NAMESPACE_PRIVATE::TUniqueStorage<T, E> Storage;
template <typename OtherT, CInvocable<TRemoveExtent<OtherT>*> OtherE> requires (CObject<OtherT> && !CBoundedArray<OtherT> && (CDestructible<OtherE> || CLValueReference<OtherE>)) template <typename OtherT, CInvocable<TRemoveExtent<OtherT>*> OtherE> requires (CObject<OtherT> && !CBoundedArray<OtherT> && (CDestructible<OtherE> || CLValueReference<OtherE>))
friend class TUniquePtr; friend class TUniquePtr;

View File

@ -22,7 +22,7 @@ template <CCharType T>
using TDefaultStringAllocator = TInlineAllocator<(40 - 3 * sizeof(size_t)) / sizeof(T)>; using TDefaultStringAllocator = TInlineAllocator<(40 - 3 * sizeof(size_t)) / sizeof(T)>;
template <CCharType T, CAllocator<T> Allocator = TDefaultStringAllocator<T>> template <CCharType T, CAllocator<T> Allocator = TDefaultStringAllocator<T>>
class TString final class TString
{ {
public: public: