refactor(templates): enhance encapsulation by changing part of the struct to a class

This commit is contained in:
2022-11-15 19:28:43 +08:00
parent 226f5a34e9
commit af07b1a134
7 changed files with 104 additions and 98 deletions

View File

@ -72,8 +72,10 @@ static_assert(CAnyCustomStorage<FAnyDefaultStorage>);
// You can add custom storage area through CustomStorage, such as TFunction.
// It is not recommended to use this, FAny is recommended.
template <CAnyCustomStorage CustomStorage = FAnyDefaultStorage>
struct TAny
class TAny
{
public:
inline static constexpr size_t InlineSize = CustomStorage::InlineSize;
inline static constexpr size_t InlineAlignment = CustomStorage::InlineAlignment;