diff --git a/Redcraft.Utility/Source/Public/Templates/Tuple.h b/Redcraft.Utility/Source/Public/Templates/Tuple.h index e004ffe..6696b97 100644 --- a/Redcraft.Utility/Source/Public/Templates/Tuple.h +++ b/Redcraft.Utility/Source/Public/Templates/Tuple.h @@ -480,6 +480,12 @@ public: template requires (CConstructibleFrom) NODISCARD FORCEINLINE constexpr T Construct() volatile&& { return Helper::template Construct(static_cast< volatile TTuple&&>(*this)); } template requires (CConstructibleFrom) NODISCARD FORCEINLINE constexpr T Construct() const volatile&& { return Helper::template Construct(static_cast(*this)); } + /** @return The number of elements in the tuple. */ + NODISCARD static FORCEINLINE constexpr size_t Num() { return sizeof...(Ts); } + + /** @return true if the tuple is empty, false otherwise. */ + NODISCARD static FORCEINLINE constexpr bool IsEmpty() { return Num() == 0; } + /** Overloads the GetTypeHash algorithm for TTuple. */ NODISCARD friend FORCEINLINE constexpr size_t GetTypeHash(const TTuple& A) requires (true && ... && CHashable) {