refactor(containers): disable container element types with cv-qualifiers

This commit is contained in:
Redstone1024 2024-12-18 11:31:44 +08:00
parent f54386d102
commit 80238de712
4 changed files with 4 additions and 8 deletions

View File

@ -20,7 +20,7 @@ NAMESPACE_MODULE_BEGIN(Utility)
template <CUnsignedIntegral InBlockType> requires (!CSameAs<InBlockType, bool>) 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 (CAllocatableObject<InBlockType> && !CSameAs<InBlockType, bool>)
class TBitset class TBitset
{ {
private: private:

View File

@ -15,7 +15,7 @@ NAMESPACE_MODULE_BEGIN(Redcraft)
NAMESPACE_MODULE_BEGIN(Utility) 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> requires (!CConst<T> && !CVolatile<T>)
struct TStaticArray struct TStaticArray
{ {
private: private:

View File

@ -25,9 +25,7 @@ using TDefaultBitsetBlockType =
NAMESPACE_PRIVATE_END NAMESPACE_PRIVATE_END
#if 1 template <size_t N, CUnsignedIntegral InBlockType = NAMESPACE_PRIVATE::TDefaultBitsetBlockType<N>> requires (!CConst<InBlockType> && !CVolatile<InBlockType> && !CSameAs<InBlockType, bool>)
template <size_t N, CUnsignedIntegral InBlockType = NAMESPACE_PRIVATE::TDefaultBitsetBlockType<N>> requires (!CSameAs<InBlockType, bool>)
class TStaticBitset class TStaticBitset
{ {
private: private:
@ -617,8 +615,6 @@ private:
}; };
#endif
NAMESPACE_MODULE_END(Utility) NAMESPACE_MODULE_END(Utility)
NAMESPACE_MODULE_END(Redcraft) NAMESPACE_MODULE_END(Redcraft)
NAMESPACE_REDCRAFT_END NAMESPACE_REDCRAFT_END

View File

@ -85,7 +85,7 @@ private:
public: public:
using FElementType = TRemoveCV<T>; using FElementType = T;
using FReference = typename FSuper::FReference; using FReference = typename FSuper::FReference;