refactor(templates): allow some template classes to derive and replace some using with inheritance

This commit is contained in:
2022-11-21 23:28:19 +08:00
parent e35fa9dd11
commit 058f07fedc
9 changed files with 128 additions and 102 deletions

View File

@ -102,6 +102,21 @@ struct FIgnore
inline constexpr FIgnore Ignore;
// This macro is used in place of using type aliases, see Atomic.h, etc
#define STRONG_INHERIT(...) /* BaseClass */ \
/* struct DerivedClass : */ public __VA_ARGS__ \
{ \
private: \
\
using BaseClassTypedef = __VA_ARGS__; \
\
public: \
\
using BaseClassTypedef::BaseClassTypedef; \
using BaseClassTypedef::operator=; \
\
}
NAMESPACE_MODULE_END(Utility)
NAMESPACE_MODULE_END(Redcraft)
NAMESPACE_REDCRAFT_END