From fd61eb53415226a0bfc0d13a32cc6c5a4e367601 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Wed, 3 Jul 2024 11:39:09 +0000 Subject: [PATCH] Add Size function for TypeList --- include/utempl/type_list.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/utempl/type_list.hpp b/include/utempl/type_list.hpp index 552a54f..840afde 100644 --- a/include/utempl/type_list.hpp +++ b/include/utempl/type_list.hpp @@ -98,4 +98,10 @@ consteval auto FilterTypeList(TypeList, auto&& f) { }; +template +consteval auto Size(TypeList) -> std::size_t { + return sizeof...(Ts); +}; + + } // namespace utempl