refactor(templates): add final specifier for template class
This commit is contained in:
parent
9368a49806
commit
e4d59b9832
@ -32,7 +32,7 @@ NAMESPACE_PRIVATE_END
|
|||||||
* An object of class any stores an instance of any type that satisfies the constructor requirements or is empty,
|
* An object of class any stores an instance of any type that satisfies the constructor requirements or is empty,
|
||||||
* and this is referred to as the state of the class any object. The stored instance is called the contained object.
|
* and this is referred to as the state of the class any object. The stored instance is called the contained object.
|
||||||
*/
|
*/
|
||||||
class alignas(16) FAny
|
class alignas(16) FAny final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -287,10 +287,10 @@ NAMESPACE_PRIVATE_END
|
|||||||
template <typename T> requires (CTriviallyCopyable<T>
|
template <typename T> requires (CTriviallyCopyable<T>
|
||||||
&& CCopyConstructible<T> && CMoveConstructible<T>
|
&& CCopyConstructible<T> && CMoveConstructible<T>
|
||||||
&& CCopyAssignable<T> && CMoveAssignable<T>)
|
&& CCopyAssignable<T> && CMoveAssignable<T>)
|
||||||
struct TAtomic : STRONG_INHERIT(NAMESPACE_PRIVATE::TAtomicImpl<T, false>);
|
struct TAtomic final : STRONG_INHERIT(NAMESPACE_PRIVATE::TAtomicImpl<T, false>);
|
||||||
|
|
||||||
template <typename T> requires (CTriviallyCopyable<T>)
|
template <typename T> requires (CTriviallyCopyable<T>)
|
||||||
struct TAtomicRef : STRONG_INHERIT(NAMESPACE_PRIVATE::TAtomicImpl<T, true>);
|
struct TAtomicRef final : STRONG_INHERIT(NAMESPACE_PRIVATE::TAtomicImpl<T, true>);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
TAtomic(T) -> TAtomic<T>;
|
TAtomic(T) -> TAtomic<T>;
|
||||||
@ -304,7 +304,7 @@ static_assert(sizeof(TAtomic<int32>) == sizeof(int32), "The byte size of TAtomic
|
|||||||
* FAtomicFlag is an atomic boolean type. Unlike all specializations of TAtomic, it is guaranteed to be lock-free.
|
* FAtomicFlag is an atomic boolean type. Unlike all specializations of TAtomic, it is guaranteed to be lock-free.
|
||||||
* Unlike TAtomic<bool>, FAtomicFlag does not provide load or store operations.
|
* Unlike TAtomic<bool>, FAtomicFlag does not provide load or store operations.
|
||||||
*/
|
*/
|
||||||
struct FAtomicFlag : FSingleton
|
struct FAtomicFlag final : FSingleton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ NAMESPACE_PRIVATE_END
|
|||||||
* without making it a template.
|
* without making it a template.
|
||||||
*/
|
*/
|
||||||
template <CFunction F>
|
template <CFunction F>
|
||||||
class TFunctionRef
|
class TFunctionRef final
|
||||||
: public NAMESPACE_PRIVATE::TFunctionImpl<
|
: public NAMESPACE_PRIVATE::TFunctionImpl<
|
||||||
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::Fn,
|
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::Fn,
|
||||||
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::CVRef,
|
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::CVRef,
|
||||||
@ -599,7 +599,7 @@ public:
|
|||||||
* objects without caring about the lifetime of the original object being bound.
|
* objects without caring about the lifetime of the original object being bound.
|
||||||
*/
|
*/
|
||||||
template <CFunction F>
|
template <CFunction F>
|
||||||
class TFunction
|
class TFunction final
|
||||||
: public NAMESPACE_PRIVATE::TFunctionImpl<
|
: public NAMESPACE_PRIVATE::TFunctionImpl<
|
||||||
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::Fn,
|
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::Fn,
|
||||||
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::CVRef,
|
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::CVRef,
|
||||||
@ -698,7 +698,7 @@ public:
|
|||||||
* objects without caring about the lifetime of the original object being bound.
|
* objects without caring about the lifetime of the original object being bound.
|
||||||
*/
|
*/
|
||||||
template <CFunction F>
|
template <CFunction F>
|
||||||
class TUniqueFunction
|
class TUniqueFunction final
|
||||||
: public NAMESPACE_PRIVATE::TFunctionImpl<
|
: public NAMESPACE_PRIVATE::TFunctionImpl<
|
||||||
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::Fn,
|
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::Fn,
|
||||||
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::CVRef,
|
typename NAMESPACE_PRIVATE::TFunctionInfo<F>::CVRef,
|
||||||
|
@ -40,7 +40,7 @@ template <typename T> concept CTOptional = NAMESPACE_PRIVATE::TIsTOptional<TRemo
|
|||||||
|
|
||||||
/** The class template manages an optional contained value, i.e. a value that may or may not be present. */
|
/** The class template manages an optional contained value, i.e. a value that may or may not be present. */
|
||||||
template <typename OptionalType> requires (CDestructible<OptionalType>)
|
template <typename OptionalType> requires (CDestructible<OptionalType>)
|
||||||
class TOptional
|
class TOptional final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ NAMESPACE_MODULE_BEGIN(Utility)
|
|||||||
* containers which cannot normally hold references.
|
* containers which cannot normally hold references.
|
||||||
*/
|
*/
|
||||||
template <typename ReferencedType> requires (CObject<ReferencedType> || CFunction<ReferencedType>)
|
template <typename ReferencedType> requires (CObject<ReferencedType> || CFunction<ReferencedType>)
|
||||||
class TReferenceWrapper
|
class TReferenceWrapper final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ template <size_t I, CTTuple U>
|
|||||||
using TTupleElement = TCopyCV<U, typename NAMESPACE_PRIVATE::TTupleElementImpl<I, TRemoveCV<U>>::Type>;
|
using TTupleElement = TCopyCV<U, typename NAMESPACE_PRIVATE::TTupleElementImpl<I, TRemoveCV<U>>::Type>;
|
||||||
|
|
||||||
template <typename... Ts>
|
template <typename... Ts>
|
||||||
class TTuple : public NAMESPACE_PRIVATE::TTupleImpl<TIndexSequenceFor<Ts...>, Ts...>
|
class TTuple final : public NAMESPACE_PRIVATE::TTupleImpl<TIndexSequenceFor<Ts...>, Ts...>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ FORCEINLINE constexpr T* AddressOf(T& Object)
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
const T* AddressOf(const T&&) = delete;
|
const T* AddressOf(const T&&) = delete;
|
||||||
|
|
||||||
struct FIgnore
|
struct FIgnore final
|
||||||
{
|
{
|
||||||
template <typename T>
|
template <typename T>
|
||||||
FORCEINLINE constexpr void operator=(T&&) const { }
|
FORCEINLINE constexpr void operator=(T&&) const { }
|
||||||
@ -145,7 +145,7 @@ inline constexpr FIgnore Ignore;
|
|||||||
* }, Target);
|
* }, Target);
|
||||||
*/
|
*/
|
||||||
template <typename... Ts>
|
template <typename... Ts>
|
||||||
struct TOverloaded : Ts...
|
struct TOverloaded final : Ts...
|
||||||
{
|
{
|
||||||
using Ts::operator()...;
|
using Ts::operator()...;
|
||||||
};
|
};
|
||||||
|
@ -84,7 +84,7 @@ using TVariantAlternative = TCopyCV<U, typename NAMESPACE_PRIVATE::TVariantAlter
|
|||||||
* holds a value of one of its alternative types, or in the case of invalid - no value.
|
* holds a value of one of its alternative types, or in the case of invalid - no value.
|
||||||
*/
|
*/
|
||||||
template <typename... Ts> requires (sizeof...(Ts) > 0 && (true && ... && CDestructible<Ts>))
|
template <typename... Ts> requires (sizeof...(Ts) > 0 && (true && ... && CDestructible<Ts>))
|
||||||
class TVariant
|
class TVariant final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user